summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>1998-12-29 14:07:14 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>1998-12-29 14:07:14 +0000
commit3b1a191025e21a88e367ae2967a32233a5c8129f (patch)
tree903e81812a3913f549e4944ebf4719a0192b264f /src
parent0aa5899fbe04082c8649eade9fc8c17c7b592539 (diff)
More subwindow event handling fixes.
git-svn-id: file:///fltk/svn/fltk/trunk@174 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/Fl_x.cxx34
1 files changed, 26 insertions, 8 deletions
diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx
index 7b80a6566..9e375044e 100644
--- a/src/Fl_x.cxx
+++ b/src/Fl_x.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_x.cxx,v 1.15 1998/12/29 14:06:08 mike Exp $"
+// "$Id: Fl_x.cxx,v 1.16 1998/12/29 14:07:14 mike Exp $"
//
// X specific code for the Fast Light Tool Kit (FLTK).
//
@@ -330,8 +330,11 @@ static Fl_Window* resize_bug_fix;
int fl_handle(const XEvent& xevent)
{
fl_xevent = &xevent;
+ Window xid = xevent.xany.window;
- switch (xevent.type) { // events where we don't care about window
+ switch (xevent.type) {
+
+ // events where we don't care about window:
case KeymapNotify:
memcpy(fl_key_vector, xevent.xkeymap.key_vector, 32);
@@ -340,10 +343,25 @@ int fl_handle(const XEvent& xevent)
case MappingNotify:
XRefreshKeyboardMapping((XMappingEvent*)&xevent.xmapping);
return 0;
+
+ // events where interesting window id is in a different place:
+ case CirculateNotify:
+ case CirculateRequest:
+ case ConfigureNotify:
+ case ConfigureRequest:
+ case CreateNotify:
+ case DestroyNotify:
+ case GravityNotify:
+ case MapNotify:
+ case MapRequest:
+ case ReparentNotify:
+ case UnmapNotify:
+ xid = xevent.xmaprequest.window;
+ break;
}
int event = 0;
- Fl_Window* window = fl_find(xevent.xany.window);
+ Fl_Window* window = fl_find(xid);
if (window) switch (xevent.type) {
@@ -522,10 +540,6 @@ Fl_X* Fl_X::set_xid(Fl_Window* w, Window xid) {
x->region = 0;
x->wait_for_expose = 1;
Fl_X::first = x;
- w->set_visible();
- w->handle(FL_SHOW); // get child windows to appear
- w->redraw();
- fl_fix_focus(); // if this is modal we must fix focus now
return x;
}
@@ -608,6 +622,10 @@ void Fl_X::make_xid(Fl_Window* w, XVisualInfo *visual, Colormap colormap)
InputOutput,
visual->visual,
mask, &attr));
+ w->set_visible();
+ w->handle(FL_SHOW); // get child windows to appear
+ w->redraw();
+ fl_fix_focus(); // if this is modal we must fix focus now
//XInstallColormap(fl_display, colormap);
if (!w->parent() && !attr.override_redirect) {
@@ -798,5 +816,5 @@ void Fl_Window::make_current() {
#endif
//
-// End of "$Id: Fl_x.cxx,v 1.15 1998/12/29 14:06:08 mike Exp $".
+// End of "$Id: Fl_x.cxx,v 1.16 1998/12/29 14:07:14 mike Exp $".
//