X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;ds=sidebyside;f=openbox%2Fframe.c;h=8a9a5a6462800b7aad364ab6a39a05b1163279f2;hb=a8dbf2e74ea967158db754e383a88c84c331f97c;hp=c6a47b0859ffee452ec7340e3ba1396088075d10;hpb=fd77a0a7b3f892925f203287b8b46c6ec9be94ea;p=chaz%2Fopenbox diff --git a/openbox/frame.c b/openbox/frame.c index c6a47b08..8a9a5a64 100644 --- a/openbox/frame.c +++ b/openbox/frame.c @@ -190,7 +190,7 @@ ObFrame *frame_new(ObClient *client) /* make sure the size will be different the first time, so the extent hints will be set */ - STRUT_SET(self->size, -1, -1, -1, -1); + STRUT_SET(self->oldsize, -1, -1, -1, -1); set_theme_statics(self); @@ -330,10 +330,6 @@ void frame_adjust_shape(ObFrame *self) void frame_adjust_area(ObFrame *self, gboolean moved, gboolean resized, gboolean fake) { - Strut oldsize; - - oldsize = self->size; - if (resized) { /* do this before changing the frame's status like max_horz max_vert */ frame_adjust_cursors(self); @@ -849,7 +845,7 @@ void frame_adjust_area(ObFrame *self, gboolean moved, frame_adjust_shape(self); } - if (!STRUT_EQUAL(self->size, oldsize)) { + if (!STRUT_EQUAL(self->size, self->oldsize)) { gulong vals[4]; vals[0] = self->size.left; vals[1] = self->size.right; @@ -859,6 +855,7 @@ void frame_adjust_area(ObFrame *self, gboolean moved, CARDINAL, vals, 4); OBT_PROP_SETA32(self->client->window, KDE_NET_WM_FRAME_STRUT, CARDINAL, vals, 4); + self->oldsize = self->size; } /* if this occurs while we are focus cycling, the indicator needs to @@ -1371,18 +1368,27 @@ ObFrameContext frame_context_from_string(const gchar *name) return OB_FRAME_CONTEXT_CLOSE; else if (!g_ascii_strcasecmp("MoveResize", name)) return OB_FRAME_CONTEXT_MOVE_RESIZE; + else if (!g_ascii_strcasecmp("Dock", name)) + return OB_FRAME_CONTEXT_DOCK; + return OB_FRAME_CONTEXT_NONE; } ObFrameContext frame_context(ObClient *client, Window win, gint x, gint y) { ObFrame *self; + ObWindow *obwin; if (moveresize_in_progress) return OB_FRAME_CONTEXT_MOVE_RESIZE; if (win == obt_root(ob_screen)) - return OB_FRAME_CONTEXT_ROOT ; + return OB_FRAME_CONTEXT_ROOT; + if ((obwin = window_find(win))) { + if (WINDOW_IS_DOCK(obwin)) { + return OB_FRAME_CONTEXT_DOCK; + } + } if (client == NULL) return OB_FRAME_CONTEXT_NONE; if (win == client->window) { /* conceptually, this is the desktop, as far as users are