]> Dogcows Code - chaz/openbox/commitdiff
add a root context that only applies to the root window. it fallsback to the desktop...
authorDana Jansens <danakj@orodu.net>
Sat, 19 May 2007 22:07:15 +0000 (22:07 +0000)
committerDana Jansens <danakj@orodu.net>
Sat, 19 May 2007 22:07:15 +0000 (22:07 +0000)
data/rc.xml
openbox/frame.c
openbox/frame.h
openbox/mouse.c

index d963936f241253843a81bd4c65ec647a2a977b6d..42d629ffe5fdda2e82d96780c0530ce25b583fac 100644 (file)
     <mousebind button="Left" action="Press">
       <action name="Activate"/>
     </mousebind>
+  </context>
 
+  <context name="Root">
     <!-- Menus -->
     <mousebind button="Middle" action="Press">
       <action name="ShowMenu"><menu>client-list-combined-menu</menu></action>
index c9c1543d9d31854319fa36736261a089c65b2ddc..df5e60169d95af9acd27d52e9d90d2e7365fa377 100644 (file)
@@ -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
index 28ad2755e5d5a7cd3c5ac28494b6415e9f671819..13e49564eabe8da9c8f0a5180b797c3003f79649 100644 (file)
@@ -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,
index a96b02b9ca586e73af98009fedda7bd5126d965d..850fb337cb99e964ae9144bf3525aad97652cc6f 100644 (file)
@@ -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:
This page took 0.030129 seconds and 4 git commands to generate.