diff options
| author | Mikael Magnusson <mikachu@gmail.com> | 2010-06-26 15:55:40 +0200 |
|---|---|---|
| committer | Mikael Magnusson <mikachu@gmail.com> | 2010-09-16 17:24:11 +0200 |
| commit | 1ffc0021325e30db7bb7f8b2a17ca7f5546b3324 (patch) | |
| tree | bbbb0794f66b06f3c10b914160be2d6e240fc2f9 /openbox/frame.c | |
| parent | 48d36cd587e70b9680f65811d08038496a9ccc12 (diff) | |
Make the dock a context and add actions LowerDock and RaiseDock
Diffstat (limited to 'openbox/frame.c')
| -rw-r--r-- | openbox/frame.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/openbox/frame.c b/openbox/frame.c index 9c065c7d..bd9527b0 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 |
