LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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


Reply
  Search this Thread
Old 10-15-2007, 07:17 PM   #1
mirsoft
LQ Newbie
 
Registered: Oct 2007
Posts: 15

Rep: Reputation: 0
Unhappy 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!
 
Old 10-16-2007, 01:46 AM   #2
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
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.
 
Old 10-16-2007, 02:32 AM   #3
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,516

Rep: Reputation: 240Reputation: 240Reputation: 240
maybe XtAddEventHandler

http://www.xfree86.org/current/XtAddEventHandler.3.html

what exactly are you trying to do?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Xlib: connection to ":0.0" refused by server Xlib: No protocol specified eyalkz Linux - Newbie 12 11-27-2018 01:30 PM
Xlib problem trican Linux - Newbie 5 10-23-2004 08:32 AM
Xlib: connection to ":0.0" refused by server Xlib: No protocol specified eyalkz Programming 1 03-02-2004 08:22 AM
Xlib help what to do? micxz Linux - General 4 03-10-2003 01:39 PM
Xlib js72 Linux - Software 0 02-19-2003 11:09 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration