X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fframe.c;h=8a9a5a6462800b7aad364ab6a39a05b1163279f2;hb=6d0f44e1d15b258fb29f303e2799b3184e4dcb3a;hp=9c065c7dcdf4fbe70ce9ee9e91cd5ad154784559;hpb=aa3685d16af4a565eecdc39047ee8d140ef5cd99;p=chaz%2Fopenbox diff --git a/openbox/frame.c b/openbox/frame.c index 9c065c7d..8a9a5a64 100644 --- a/openbox/frame.c +++ b/openbox/frame.c @@ -1368,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 @@ -1663,7 +1672,6 @@ static gboolean flash_timeout(gpointer data) self->focused = FALSE; } - XFlush(obt_display); return TRUE; /* go again */ } @@ -1761,11 +1769,11 @@ static gboolean frame_animate_iconify(gpointer p) } XMoveResizeWindow(obt_display, self->window, x, y, w, h); + XFlush(obt_display); if (time == 0) frame_end_iconify_animation(self); - XFlush(obt_display); return time > 0; /* repeat until we're out of time */ }