add an obscured flag that tracks if the frame is at all obscured
Dana Jansens danakj@orodu.net
3 files changed,
10 insertions(+),
1 deletions(-)
M
openbox/event.c
→
openbox/event.c
@@ -621,6 +621,9 @@ int i=0;
ObFrameContext con; switch (e->type) { + case VisibilityNotify: + client->frame->obscured = e->xvisibility.state != VisibilityUnobscured; + break; case ButtonPress: case ButtonRelease: /* Wheel buttons don't draw because they are an instant click, so it
M
openbox/frame.c
→
openbox/frame.c
@@ -8,7 +8,8 @@ #include "render/theme.h"
#define PLATE_EVENTMASK (SubstructureRedirectMask | ButtonPressMask) #define FRAME_EVENTMASK (EnterWindowMask | LeaveWindowMask | \ - ButtonPressMask | ButtonReleaseMask) + ButtonPressMask | ButtonReleaseMask | \ + VisibilityChangeMask) #define ELEMENT_EVENTMASK (ButtonPressMask | ButtonReleaseMask | \ ButtonMotionMask | ExposureMask | \ EnterWindowMask | LeaveWindowMask)@@ -36,6 +37,7 @@
self = g_new(ObFrame, 1); self->visible = FALSE; + self->obscured = TRUE; self->decorations = 0; /* create all of the decor windows */
M
openbox/frame.h
→
openbox/frame.h
@@ -54,6 +54,10 @@
Strut size; Rect area; gboolean visible; + + /*! Whether the window is obscured at all or fully visible. */ + gboolean obscured; + guint decorations; Window title;