]> Dogcows Code - chaz/openbox/commitdiff
add _NET_WM_FULL_PLACEMENT, cuz openbox does do placement, even tho it can be sucky...
authorDana Jansens <danakj@orodu.net>
Sun, 11 Mar 2007 05:00:56 +0000 (05:00 +0000)
committerDana Jansens <danakj@orodu.net>
Sun, 11 Mar 2007 05:00:56 +0000 (05:00 +0000)
also add _NET_WM_MOVERESIZE_CANCEL.

openbox/event.c
openbox/prop.c
openbox/prop.h
openbox/screen.c

index 1988f108ab45f108eed34c3d269cd3df7556cf23..6d1fa8dc39f92c41f12f95da3780408c250b3ba2 100644 (file)
@@ -1009,7 +1009,8 @@ static void event_handle_client(ObClient *client, XEvent *e)
                              e->xclient.data.l[0] == 2),
                             e->xclient.data.l[1]);
         } else if (msgtype == prop_atoms.net_wm_moveresize) {
-            ob_debug("net_wm_moveresize for 0x%lx\n", client->window);
+            ob_debug("net_wm_moveresize for 0x%lx direction %d\n",
+                     client->window, e->xclient.data.l[2]);
             if ((Atom)e->xclient.data.l[2] ==
                 prop_atoms.net_wm_moveresize_size_topleft ||
                 (Atom)e->xclient.data.l[2] ==
@@ -1039,6 +1040,9 @@ static void event_handle_client(ObClient *client, XEvent *e)
                                  e->xclient.data.l[1], e->xclient.data.l[3],
                                  e->xclient.data.l[2]);
             }
+            else if ((Atom)e->xclient.data.l[2] ==
+                     prop_atoms.net_wm_moveresize_cancel)
+                moveresize_end(TRUE);
         } else if (msgtype == prop_atoms.net_moveresize_window) {
             gint oldg = client->gravity;
             gint tmpg, x, y, w, h;
index 686404d43889986851d8ceb1c88f6a58b37e91d4..91dca5cb2bc6ca17925fb79a06f0bfc1e2ac9b7a 100644 (file)
@@ -52,6 +52,8 @@ void prop_startup()
 
     CREATE(sm_client_id, "SM_CLIENT_ID");
 
+    CREATE(net_wm_full_placement, "_NET_WM_FULL_PLACEMENT");
+
     CREATE(net_supported, "_NET_SUPPORTED");
     CREATE(net_client_list, "_NET_CLIENT_LIST");
     CREATE(net_client_list_stacking, "_NET_CLIENT_LIST_STACKING");
@@ -109,6 +111,7 @@ void prop_startup()
     prop_atoms.net_wm_moveresize_move = 8;
     prop_atoms.net_wm_moveresize_size_keyboard = 9;
     prop_atoms.net_wm_moveresize_move_keyboard = 10;
+    prop_atoms.net_wm_moveresize_cancel = 11;
 
     CREATE(net_wm_action_move, "_NET_WM_ACTION_MOVE");
     CREATE(net_wm_action_resize, "_NET_WM_ACTION_RESIZE");
index 1931cb658dbf23776d054f8e24573ea232b9a9e1..08aa83bb00ba415bf8a55ad101b25110b2bfeca1 100644 (file)
@@ -56,7 +56,9 @@ typedef struct Atoms {
     Atom sm_client_id;
 
     /* NETWM atoms */
-     
+
+    Atom net_wm_full_placement;
+
     /* root window properties */
     Atom net_supported;
     Atom net_client_list;
@@ -118,6 +120,7 @@ typedef struct Atoms {
     Atom net_wm_moveresize_move;
     Atom net_wm_moveresize_size_keyboard;
     Atom net_wm_moveresize_move_keyboard;
+    Atom net_wm_moveresize_cancel;
 
     Atom net_wm_action_move;
     Atom net_wm_action_resize;
index a4dfb76eb02f1efd9a50e34789ecc1636f2a2744..ca3e12731e971960f511ac6195f6ef8d8e93718f 100644 (file)
@@ -204,9 +204,10 @@ gboolean screen_annex()
                window, screen_support_win);
 
     /* set the _NET_SUPPORTED_ATOMS hint */
-    num_support = 54;
+    num_support = 55;
     i = 0;
     supported = g_new(gulong, num_support);
+    supported[i++] = prop_atoms.net_wm_full_placement;
     supported[i++] = prop_atoms.net_current_desktop;
     supported[i++] = prop_atoms.net_number_of_desktops;
     supported[i++] = prop_atoms.net_desktop_geometry;
This page took 0.032311 seconds and 4 git commands to generate.