X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fframe.c;h=880ab1b552cc20952166a685ef491871b73e8825;hb=eb2a0feb0154e86a1c6c117fd0f6d1a18959b694;hp=183260e1accfd01ccfe9a66fac18e75baaabeb05;hpb=35ab1264ee5efe0c0a5458329f4e7d2ebda43b98;p=chaz%2Fopenbox diff --git a/openbox/frame.c b/openbox/frame.c index 183260e1..880ab1b5 100644 --- a/openbox/frame.c +++ b/openbox/frame.c @@ -2,7 +2,7 @@ frame.c for the Openbox window manager Copyright (c) 2006 Mikael Magnusson - Copyright (c) 2003 Ben Jansens + Copyright (c) 2003-2007 Dana Jansens This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -29,7 +29,8 @@ #include "moveresize.h" #include "render/theme.h" -#define PLATE_EVENTMASK (SubstructureRedirectMask | ButtonPressMask) +#define PLATE_EVENTMASK (SubstructureRedirectMask | ButtonPressMask | \ + FocusChangeMask) #define FRAME_EVENTMASK (EnterWindowMask | LeaveWindowMask | \ ButtonPressMask | ButtonReleaseMask | \ VisibilityChangeMask) @@ -233,6 +234,8 @@ static void frame_free(ObFrame *self) void frame_show(ObFrame *self) { + ob_debug("frame_show for window 0x%x : %d\n", self->client->window, + self->visible); if (!self->visible) { self->visible = TRUE; XMapWindow(ob_display, self->client->window); @@ -242,9 +245,11 @@ void frame_show(ObFrame *self) void frame_hide(ObFrame *self) { + ob_debug("frame_hide for window 0x%x : %d\n", self->client->window, + self->visible); if (self->visible) { self->visible = FALSE; - self->client->ignore_unmaps += 2; + self->client->ignore_unmaps += 1; /* we unmap the client itself so that we can get MapRequest events, and because the ICCCM tells us to! */ XUnmapWindow(ob_display, self->window); @@ -530,11 +535,11 @@ void frame_grab_client(ObFrame *self, ObClient *client) req's) the ButtonPress is to catch clicks on the client border */ XSelectInput(ob_display, self->plate, PLATE_EVENTMASK); + frame_adjust_area(self, TRUE, TRUE, FALSE); + /* map the client so it maps when the frame does */ XMapWindow(ob_display, client->window); - frame_adjust_area(self, TRUE, TRUE, FALSE); - /* set all the windows for the frame in the window_map */ g_hash_table_insert(window_map, &self->window, client); g_hash_table_insert(window_map, &self->plate, client);