add an obscured flag that tracks if the frame is at all obscured
This commit is contained in:
parent
888df2e10c
commit
a09984bbc0
3 changed files with 10 additions and 1 deletions
|
@ -621,6 +621,9 @@ static void event_handle_client(ObClient *client, XEvent *e)
|
||||||
ObFrameContext con;
|
ObFrameContext con;
|
||||||
|
|
||||||
switch (e->type) {
|
switch (e->type) {
|
||||||
|
case VisibilityNotify:
|
||||||
|
client->frame->obscured = e->xvisibility.state != VisibilityUnobscured;
|
||||||
|
break;
|
||||||
case ButtonPress:
|
case ButtonPress:
|
||||||
case ButtonRelease:
|
case ButtonRelease:
|
||||||
/* Wheel buttons don't draw because they are an instant click, so it
|
/* Wheel buttons don't draw because they are an instant click, so it
|
||||||
|
|
|
@ -8,7 +8,8 @@
|
||||||
|
|
||||||
#define PLATE_EVENTMASK (SubstructureRedirectMask | ButtonPressMask)
|
#define PLATE_EVENTMASK (SubstructureRedirectMask | ButtonPressMask)
|
||||||
#define FRAME_EVENTMASK (EnterWindowMask | LeaveWindowMask | \
|
#define FRAME_EVENTMASK (EnterWindowMask | LeaveWindowMask | \
|
||||||
ButtonPressMask | ButtonReleaseMask)
|
ButtonPressMask | ButtonReleaseMask | \
|
||||||
|
VisibilityChangeMask)
|
||||||
#define ELEMENT_EVENTMASK (ButtonPressMask | ButtonReleaseMask | \
|
#define ELEMENT_EVENTMASK (ButtonPressMask | ButtonReleaseMask | \
|
||||||
ButtonMotionMask | ExposureMask | \
|
ButtonMotionMask | ExposureMask | \
|
||||||
EnterWindowMask | LeaveWindowMask)
|
EnterWindowMask | LeaveWindowMask)
|
||||||
|
@ -36,6 +37,7 @@ ObFrame *frame_new()
|
||||||
self = g_new(ObFrame, 1);
|
self = g_new(ObFrame, 1);
|
||||||
|
|
||||||
self->visible = FALSE;
|
self->visible = FALSE;
|
||||||
|
self->obscured = TRUE;
|
||||||
self->decorations = 0;
|
self->decorations = 0;
|
||||||
|
|
||||||
/* create all of the decor windows */
|
/* create all of the decor windows */
|
||||||
|
|
|
@ -54,6 +54,10 @@ struct _ObFrame
|
||||||
Strut size;
|
Strut size;
|
||||||
Rect area;
|
Rect area;
|
||||||
gboolean visible;
|
gboolean visible;
|
||||||
|
|
||||||
|
/*! Whether the window is obscured at all or fully visible. */
|
||||||
|
gboolean obscured;
|
||||||
|
|
||||||
guint decorations;
|
guint decorations;
|
||||||
|
|
||||||
Window title;
|
Window title;
|
||||||
|
|
Loading…
Reference in a new issue