diff options
| author | Dana Jansens <danakj@orodu.net> | 2007-05-28 22:30:59 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2007-05-28 22:30:59 +0000 |
| commit | 2aa0a6b01ba718217e2b10107abbcd4236ba5a8f (patch) | |
| tree | 04dee4a3dbba6bce3e4a3605013536c70d9534b0 /openbox/frame.c | |
| parent | a1511e465550501dee66c0474d3e3867b97fd1fb (diff) | |
get rid of the plate window
Diffstat (limited to 'openbox/frame.c')
| -rw-r--r-- | openbox/frame.c | 42 |
1 files changed, 8 insertions, 34 deletions
diff --git a/openbox/frame.c b/openbox/frame.c index 51de9321..687ecbbe 100644 --- a/openbox/frame.c +++ b/openbox/frame.c @@ -31,9 +31,9 @@ #include "screen.h" #include "render/theme.h" -#define PLATE_EVENTMASK (SubstructureRedirectMask | FocusChangeMask) #define FRAME_EVENTMASK (EnterWindowMask | LeaveWindowMask | \ - ButtonPressMask | ButtonReleaseMask) + ButtonPressMask | ButtonReleaseMask | \ + SubstructureRedirectMask | FocusChangeMask) #define ELEMENT_EVENTMASK (ButtonPressMask | ButtonReleaseMask | \ ButtonMotionMask | PointerMotionMask | \ EnterWindowMask | LeaveWindowMask) @@ -95,7 +95,7 @@ ObFrame *frame_new(ObClient *client) /* create the non-visible decor windows */ - mask = CWEventMask; + mask = 0; if (visual) { /* client has a 32-bit visual */ mask |= CWColormap | CWBackPixel | CWBorderPixel; @@ -107,13 +107,9 @@ ObFrame *frame_new(ObClient *client) attrib.background_pixel = BlackPixel(ob_display, ob_screen); attrib.border_pixel = BlackPixel(ob_display, ob_screen); } - attrib.event_mask = FRAME_EVENTMASK; self->window = createWindow(RootWindow(ob_display, ob_screen), visual, mask, &attrib); - mask &= ~CWEventMask; - self->plate = createWindow(self->window, visual, mask, &attrib); - /* create the visible decor windows */ mask = CWEventMask; @@ -172,7 +168,6 @@ ObFrame *frame_new(ObClient *client) self->focused = FALSE; /* the other stuff is shown based on decor settings */ - XMapWindow(ob_display, self->plate); XMapWindow(ob_display, self->label); self->max_press = self->close_press = self->desk_press = @@ -710,14 +705,10 @@ void frame_adjust_area(ObFrame *self, gboolean moved, } else XUnmapWindow(ob_display, self->right); - /* move the plate */ - XMoveWindow(ob_display, self->plate, - self->size.left, self->size.top); - /* when the client has StaticGravity, it likes to move around. */ XMoveWindow(ob_display, self->client->window, - -self->client->border_width, - -self->client->border_width); + self->size.left - self->client->border_width, + self->size.top - self->client->border_width); } } @@ -836,13 +827,6 @@ static void frame_adjust_cursors(ObFrame *self) } } -void frame_adjust_client_area(ObFrame *self) -{ - /* resize the plate */ - XResizeWindow(ob_display, self->plate, - self->client->area.width, self->client->area.height); -} - void frame_adjust_state(ObFrame *self) { framerender_frame(self); @@ -873,8 +857,7 @@ void frame_grab_client(ObFrame *self) */ /* reparent the client to the frame */ - XReparentWindow(ob_display, self->client->window, self->plate, - -self->client->border_width, -self->client->border_width); + XReparentWindow(ob_display, self->client->window, self->window, 0, 0); /* When reparenting the client window, it is usually not mapped yet, since @@ -887,11 +870,10 @@ void frame_grab_client(ObFrame *self) /* select the event mask on the client's parent (to receive config/map req's) the ButtonPress is to catch clicks on the client border */ - XSelectInput(ob_display, self->plate, PLATE_EVENTMASK); + XSelectInput(ob_display, self->window, FRAME_EVENTMASK); /* set all the windows for the frame in the window_map */ g_hash_table_insert(window_map, &self->window, self->client); - g_hash_table_insert(window_map, &self->plate, self->client); g_hash_table_insert(window_map, &self->innerleft, self->client); g_hash_table_insert(window_map, &self->innertop, self->client); g_hash_table_insert(window_map, &self->innerright, self->client); @@ -952,7 +934,7 @@ void frame_release_client(ObFrame *self) Reparent events that are generated by us are just discarded here. They are of no consequence to us anyhow. */ - if (ev.xreparent.parent != self->plate) { + if (ev.xreparent.parent != self->window) { reparent = FALSE; XPutBackEvent(ob_display, &ev); break; @@ -970,7 +952,6 @@ void frame_release_client(ObFrame *self) /* remove all the windows for the frame from the window_map */ g_hash_table_remove(window_map, &self->window); - g_hash_table_remove(window_map, &self->plate); g_hash_table_remove(window_map, &self->innerleft); g_hash_table_remove(window_map, &self->innertop); g_hash_table_remove(window_map, &self->innerright); @@ -1250,13 +1231,6 @@ ObFrameContext frame_context(ObClient *client, Window win, gint x, gint y) } self = client->frame; - if (win == self->plate) { - /* conceptually, this is the desktop, as far as users are - concerned */ - if (client->type == OB_CLIENT_TYPE_DESKTOP) - return OB_FRAME_CONTEXT_DESKTOP; - return OB_FRAME_CONTEXT_CLIENT; - } /* when the user clicks in the corners of the titlebar and the client is fully maximized, then treat it like they clicked in the |
