all repos — openbox @ a09984bbc076bc37b11058237f51fa15114129e2

openbox fork - make it a bit more like ryudo

add an obscured flag that tracks if the frame is at all obscured
Dana Jansens danakj@orodu.net
commit

a09984bbc076bc37b11058237f51fa15114129e2

parent

888df2e10cbb751dbfb3bc03e88fd9846ca47c1c

3 files changed, 10 insertions(+), 1 deletions(-)

jump to
M openbox/event.copenbox/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.copenbox/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.hopenbox/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;