Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
10-15-2007, 07:17 PM
|
#1
|
LQ Newbie
Registered: Oct 2007
Posts: 15
Rep:
|
xlib
(this is a topic about xlib events)
who can teach me how to deal this?
first, hold up a message from the event queue;
second, add our code(or not);
third, call the default message process function(or put back the event to the message pump).
this may work like the win32's function: DefWindowProc().
Example(a xlib code):
{
....
XSelectInput(dpy, win, ResizeRedirectMask) ; //hold up ResizeRequest mask
while(1) {
...
switch(e.type)
{
case ResizeRequest: //process it here,
this is my problem //we want back to the pump, let the pump do the default process
break;
}
}
}
hay, who can do this for me? thanks!
|
|
|
10-16-2007, 01:46 AM
|
#2
|
Senior Member
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038
Rep:
|
perhaps im misunderstanding your bad english, but it sounds like you want to toss a event back into the queue?
There should be no need to do this, why cant you handle the event right there. If you cant handle it, then you shouldent have requested it. Also, the only way i know to place a even onto the queue is to generate a fake event, and send it to yourself, but then you would only have to deal with it again, and it would be a nasty memory leak in your program as the queue fills with fake events your code doesnt properly handle.
Another way to read what you have, is that you are expecting multiple programs to be gathering events for the same window. I dont recall this ever being possible either, nore should it be necessary.
Odds are, you are trying to place a event that was sent to you back onto the queue (or anywhere, really), you have a bad architecture designed for your program.
|
|
|
All times are GMT -5. The time now is 08:59 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|