The gtk+ and XConfigureEvent
- From: thhsieh linux org tw
- To: gtk-list gnome org
- Cc: gtk-app-devel-list gnome org, xcin linux org tw
- Subject: The gtk+ and XConfigureEvent
- Date: Thu, 6 Dec 2001 08:40:36 +0800
Hello,
I am writing a X Window program based directly on Xlib. This program
need to trace the positions of other windows. This program seems worked
very well with the most X Apps which are based directly on Xlib. However,
I suddently found that it will fault to the X Apps which are based on
gtk+.
I looked into this problem for a while, and I found that the gtk+ based
X Apps will not emit the XConfigureEvent when its window moved. More
explicitly, if in my program I have the following codes:
Window client_win;
/* get the client_win which I want to monitor by some ways. */
XSelectInput(display, client_win, StructureNotifyMask);
/* event loop */
while (1) {
XNextEvent(display, &event);
if (XFilterEvent(&event, None) == True)
continue;
switch (event.type) {
case Expose:
....
case ConfigureNotify:
....
case DestroyNotify:
....
}
}
then I will have the ability to monitor the position of the window of
client_win, i.e., everytime when the client_win calls XMoveWindow() or
XMoveResizeWindow(), it will emit the XConfigureEvent and will be captured
by my program. This is the X11R6 standard. However, I found that somehow
the gtk+ based X App does not follow this standard. :-(((
So, my question is: Is this the spec or feature of gtk+? Or just a simple
bug of gtk+? Will gtk+ follow this standard? If gtk+ will NEVER follow
this standard, how could I write a 3rd party program to trace the
positions of the gtk+ based X Apps?
Thank you very much for your reply. :-))
Best Regards,
T.H.Hsieh
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]