]> Dogcows Code - chaz/openbox/commitdiff
Merge branch 'backport' into work
authorMikael Magnusson <mikachu@gmail.com>
Thu, 29 Jan 2009 21:45:47 +0000 (22:45 +0100)
committerMikael Magnusson <mikachu@gmail.com>
Thu, 29 Jan 2009 21:45:47 +0000 (22:45 +0100)
Conflicts:
openbox/event.c
openbox/frame.c

1  2 
openbox/client.h
openbox/event.c
openbox/frame.c

Simple merge
diff --cc openbox/event.c
index 30bc656fbfb641724746a47ec6d655bb970a04c2,8eb612a11859f1e9705198a129f44eaa882f5326..f69267db60c63f1dcfed979fd567ad41a2345fed
@@@ -1576,11 -1567,22 +1576,24 @@@ static void event_handle_client(ObClien
      default:
          ;
  #ifdef SHAPE
-         if (obt_display_extension_shape &&
-             e->type == obt_display_extension_shape_basep)
          {
-             client->shaped = ((XShapeEvent*)e)->shaped;
-             frame_adjust_shape(client->frame);
+             int kind;
 -            if (extensions_shape && e->type == extensions_shape_event_basep) {
++            if (obt_display_extension_shape &&
++                e->type == obt_display_extension_shape_basep)
++            {
+                 switch (((XShapeEvent*)e)->kind) {
+                     case ShapeBounding:
+                     case ShapeClip:
+                         client->shaped = ((XShapeEvent*)e)->shaped;
+                         kind = ShapeBounding;
+                         break;
+                     case ShapeInput:
+                         client->shaped_input = ((XShapeEvent*)e)->shaped;
+                         kind = ShapeInput;
+                         break;
+                 }
+                 frame_adjust_shape_kind(client->frame, kind);
+             }
          }
  #endif
      }
diff --cc openbox/frame.c
index 30630fbb53c3806598026d367c48b281e0c61ba2,5e60d11c21437bf38cc0e9bd3b3a6d8266982899..c633fa6d1285b729781ba78e8fa1badfd657f33e
@@@ -271,15 -273,16 +271,16 @@@ void frame_adjust_shape_kind(ObFrame *s
      gint num;
      XRectangle xrect[2];
  
-     if (!self->client->shaped) {
+     if (!((kind == ShapeBounding && self->client->shaped) ||
+           (kind == ShapeInput && self->client->shaped_input))) {
          /* clear the shape on the frame window */
-         XShapeCombineMask(obt_display, self->window, ShapeBounding,
 -        XShapeCombineMask(ob_display, self->window, kind,
++        XShapeCombineMask(obt_display, self->window, kind,
                            self->size.left,
                            self->size.top,
                            None, ShapeSet);
      } else {
          /* make the frame's shape match the clients */
-         XShapeCombineShape(obt_display, self->window, ShapeBounding,
 -        XShapeCombineShape(ob_display, self->window, kind,
++        XShapeCombineShape(obt_display, self->window, kind,
                             self->size.left,
                             self->size.top,
                             self->client->window,
              ++num;
          }
  
 -        XShapeCombineRectangles(ob_display, self->window,
 -                                kind, 0, 0, xrect, num,
 +        XShapeCombineRectangles(obt_display, self->window,
 +                                ShapeBounding, 0, 0, xrect, num,
                                  ShapeUnion, Unsorted);
      }
+ }
+ #endif
+ void frame_adjust_shape(ObFrame *self)
+ {
+ #ifdef SHAPE
+   frame_adjust_shape_kind(self, ShapeBounding);
+   frame_adjust_shape_kind(self, ShapeInput);
  #endif
  }
  
This page took 0.035828 seconds and 4 git commands to generate.