diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-08-20 23:01:56 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-08-20 23:01:56 +0000 |
| commit | a09984bbc076bc37b11058237f51fa15114129e2 (patch) | |
| tree | 38f96eba3d598dd29f25ebc7fad22d92039ad0f5 /openbox | |
| parent | 888df2e10cbb751dbfb3bc03e88fd9846ca47c1c (diff) | |
add an obscured flag that tracks if the frame is at all obscured
Diffstat (limited to 'openbox')
| -rw-r--r-- | openbox/event.c | 3 | ||||
| -rw-r--r-- | openbox/frame.c | 4 | ||||
| -rw-r--r-- | openbox/frame.h | 4 |
3 files changed, 10 insertions, 1 deletions
diff --git a/openbox/event.c b/openbox/event.c index ed0e0965..8c640522 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -621,6 +621,9 @@ static void event_handle_client(ObClient *client, XEvent *e) 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 diff --git a/openbox/frame.c b/openbox/frame.c index 0d5ddb2e..a38bcfbe 100644 --- a/openbox/frame.c +++ b/openbox/frame.c @@ -8,7 +8,8 @@ #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 @@ ObFrame *frame_new() self = g_new(ObFrame, 1); self->visible = FALSE; + self->obscured = TRUE; self->decorations = 0; /* create all of the decor windows */ diff --git a/openbox/frame.h b/openbox/frame.h index 6bb69599..5072d091 100644 --- a/openbox/frame.h +++ b/openbox/frame.h @@ -54,6 +54,10 @@ struct _ObFrame Strut size; Rect area; gboolean visible; + + /*! Whether the window is obscured at all or fully visible. */ + gboolean obscured; + guint decorations; Window title; |
