diff options
author | sabetts <sabetts> | 2001-05-24 21:01:10 +0000 |
---|---|---|
committer | sabetts <sabetts> | 2001-05-24 21:01:10 +0000 |
commit | 7329ec0e6d192dc8f4046e3776d5a3bc07cd3f12 (patch) | |
tree | 380b4f0f2a93e311d717ce3d12ce3f7169c29ae3 | |
parent | ddb4778ed4b9487c503ff65e39df08efe2835655 (diff) | |
download | ratpoison-7329ec0e6d192dc8f4046e3776d5a3bc07cd3f12.zip |
* src/events.c (colormap_notify): ignore badwindows when
retrieving and installing the colormap.
* src/manage.c (withdraw_window): ignore badwindows during all
Xlib calls.
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | src/events.c | 7 | ||||
-rw-r--r-- | src/manage.c | 5 |
3 files changed, 18 insertions, 2 deletions
@@ -1,3 +1,11 @@ +2001-05-24 Shawn Betts <sabetts@van.gobasis.com> + + * src/events.c (colormap_notify): ignore badwindows when + retrieving and installing the colormap. + + * src/manage.c (withdraw_window): ignore badwindows during all + Xlib calls. + 2001-05-22 Shawn Betts <sabetts@van.gobasis.com> * src/actions.c (cmd_generate): only generate the event if there diff --git a/src/events.c b/src/events.c index b75f055..26edccb 100644 --- a/src/events.c +++ b/src/events.c @@ -102,6 +102,7 @@ unmap_notify (XEvent *ev) if (frame) cleanup_frame (frame); if (frame == rp_current_frame) set_active_frame (frame); + withdraw_window (win); break; } @@ -557,6 +558,10 @@ colormap_notify (XEvent *ev) { XWindowAttributes attr; + /* SDL sets the colormap just before destroying the window, so + ignore BadWindow errors. */ + ignore_badwindow++; + XGetWindowAttributes (dpy, win->w, &attr); win->colormap = attr.colormap; @@ -564,6 +569,8 @@ colormap_notify (XEvent *ev) { XInstallColormap (dpy, win->colormap); } + + ignore_badwindow--; } } diff --git a/src/manage.c b/src/manage.c index b379069..11fbfd9 100644 --- a/src/manage.c +++ b/src/manage.c @@ -530,10 +530,11 @@ withdraw_window (rp_window *win) remove_from_list (win); append_to_list (win, rp_unmapped_window_sentinel); + ignore_badwindow++; + XRemoveFromSaveSet (dpy, win->w); set_state (win, WithdrawnState); - - ignore_badwindow++; XSync (dpy, False); + ignore_badwindow--; } |