From 813d5c2ec963b3a108b2cbe8efcb9572934d8f59 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sat, 19 May 2007 22:07:15 +0000 Subject: [PATCH] add a root context that only applies to the root window. it fallsback to the desktop context, so desktop stuff applies to it too. --- data/rc.xml | 2 ++ openbox/frame.c | 4 +++- openbox/frame.h | 1 + openbox/mouse.c | 3 +++ 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/data/rc.xml b/data/rc.xml index d963936f..42d629ff 100644 --- a/data/rc.xml +++ b/data/rc.xml @@ -462,7 +462,9 @@ + + client-list-combined-menu diff --git a/openbox/frame.c b/openbox/frame.c index c9c1543d..df5e6016 100644 --- a/openbox/frame.c +++ b/openbox/frame.c @@ -861,6 +861,8 @@ ObFrameContext frame_context_from_string(const gchar *name) { if (!g_ascii_strcasecmp("Desktop", name)) return OB_FRAME_CONTEXT_DESKTOP; + else if (!g_ascii_strcasecmp("Root", name)) + return OB_FRAME_CONTEXT_ROOT; else if (!g_ascii_strcasecmp("Client", name)) return OB_FRAME_CONTEXT_CLIENT; else if (!g_ascii_strcasecmp("Titlebar", name)) @@ -908,7 +910,7 @@ ObFrameContext frame_context(ObClient *client, Window win, gint x, gint y) return OB_FRAME_CONTEXT_MOVE_RESIZE; if (win == RootWindow(ob_display, ob_screen)) - return OB_FRAME_CONTEXT_DESKTOP; + return OB_FRAME_CONTEXT_ROOT ; if (client == NULL) return OB_FRAME_CONTEXT_NONE; if (win == client->window) { /* conceptually, this is the desktop, as far as users are diff --git a/openbox/frame.h b/openbox/frame.h index 28ad2755..13e49564 100644 --- a/openbox/frame.h +++ b/openbox/frame.h @@ -32,6 +32,7 @@ typedef void (*ObFrameIconifyAnimateFunc)(gpointer data); typedef enum { OB_FRAME_CONTEXT_NONE, OB_FRAME_CONTEXT_DESKTOP, + OB_FRAME_CONTEXT_ROOT, OB_FRAME_CONTEXT_CLIENT, OB_FRAME_CONTEXT_TITLEBAR, OB_FRAME_CONTEXT_FRAME, diff --git a/openbox/mouse.c b/openbox/mouse.c index a96b02b9..850fb337 100644 --- a/openbox/mouse.c +++ b/openbox/mouse.c @@ -71,6 +71,9 @@ ObFrameContext mouse_button_frame_context(ObFrameContext context, case OB_FRAME_CONTEXT_LEFT: case OB_FRAME_CONTEXT_RIGHT: break; + case OB_FRAME_CONTEXT_ROOT: + x = OB_FRAME_CONTEXT_DESKTOP; + break; case OB_FRAME_CONTEXT_BOTTOM: case OB_FRAME_CONTEXT_BLCORNER: case OB_FRAME_CONTEXT_BRCORNER: -- 2.45.2