]> Dogcows Code - chaz/openbox/commitdiff
add an obscured flag that tracks if the frame is at all obscured
authorDana Jansens <danakj@orodu.net>
Wed, 20 Aug 2003 23:01:56 +0000 (23:01 +0000)
committerDana Jansens <danakj@orodu.net>
Wed, 20 Aug 2003 23:01:56 +0000 (23:01 +0000)
openbox/event.c
openbox/frame.c
openbox/frame.h

index ed0e0965b733d41b4b55b726c758f9629d0a46e7..8c64052275ece34e21983f25d764f5adde59858a 100644 (file)
@@ -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
index 0d5ddb2e6ac2592b96835750c69e8d83d4981bc2..a38bcfbed5d084f49902a34a9149a3fa2f77d294 100644 (file)
@@ -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 */
index 6bb69599b8648d26d73152350533fd8df61c00fe..5072d091926e8a47650395df23d3728ea76157f2 100644 (file)
@@ -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;
This page took 0.02633 seconds and 4 git commands to generate.