only bump unmaps_pending if the window was mapped
2002-01-10 Havoc Pennington <hp@pobox.com> * src/frame.c (meta_window_destroy_frame): only bump unmaps_pending if the window was mapped (meta_window_ensure_frame): ditto * src/keybindings.c: change arrow key bindings to use Ctrl+Alt not just Alt, and add debug mode key bindings * src/stack.c (meta_stack_get_default_focus_window): don't choose a default focus window with unmaps pending, since we probably just unmapped it. * src/display.c (event_callback): move notify_focus on UnmapNotify after the window_free check, so we can move focus to another window when we unmanage * src/window.c (meta_window_hide): invalidate work areas when hiding a window with struts (meta_window_free): invalidate work areas when unmanaging a window with struts
This commit is contained in:

committed by
Havoc Pennington

parent
b2bbb306f4
commit
229589616f
26
src/frame.c
26
src/frame.c
@ -100,10 +100,14 @@ meta_window_ensure_frame (MetaWindow *window)
|
||||
* a grab.
|
||||
*/
|
||||
meta_error_trap_push (window->display);
|
||||
window->mapped = FALSE; /* the reparent will unmap the window,
|
||||
* we don't want to take that as a withdraw
|
||||
*/
|
||||
window->unmaps_pending += 1;
|
||||
if (window->mapped)
|
||||
{
|
||||
window->mapped = FALSE; /* the reparent will unmap the window,
|
||||
* we don't want to take that as a withdraw
|
||||
*/
|
||||
meta_verbose ("Incrementing unmaps_pending on %s for reparent\n", window->desc);
|
||||
window->unmaps_pending += 1;
|
||||
}
|
||||
/* window was reparented to this position */
|
||||
window->rect.x = 0;
|
||||
window->rect.y = 0;
|
||||
@ -148,11 +152,15 @@ meta_window_destroy_frame (MetaWindow *window)
|
||||
* thus the error trap.
|
||||
*/
|
||||
meta_error_trap_push (window->display);
|
||||
window->mapped = FALSE; /* Keep track of unmapping it, so we
|
||||
* can identify a withdraw initiated
|
||||
* by the client.
|
||||
*/
|
||||
window->unmaps_pending += 1;
|
||||
if (window->mapped)
|
||||
{
|
||||
window->mapped = FALSE; /* Keep track of unmapping it, so we
|
||||
* can identify a withdraw initiated
|
||||
* by the client.
|
||||
*/
|
||||
meta_verbose ("Incrementing unmaps_pending on %s for reparent back to root\n", window->desc);
|
||||
window->unmaps_pending += 1;
|
||||
}
|
||||
XReparentWindow (window->display->xdisplay,
|
||||
window->xwindow,
|
||||
window->screen->xroot,
|
||||
|
Reference in New Issue
Block a user