]> Dogcows Code - chaz/openbox/commitdiff
make the obt library branch compile again with all the changes merged in from backport
authorDana Jansens <danakj@orodu.net>
Sun, 20 Jan 2008 06:34:58 +0000 (01:34 -0500)
committerDana Jansens <danakj@orodu.net>
Sun, 20 Jan 2008 06:36:56 +0000 (01:36 -0500)
12 files changed:
obt/keyboard.c
obt/keyboard.h
obt/mainloop.c
obt/prop.h
openbox/client.c
openbox/config.c
openbox/event.c
openbox/openbox.c
openbox/ping.c
openbox/resist.h
openbox/screen.c
openbox/stacking.c

index 397504fb6b4af493af2425012804b407f19715c2..a93c07d080d5a37f9f5d48d0a326cb47b9c4efca 100644 (file)
@@ -197,7 +197,7 @@ KeyCode obt_keyboard_keysym_to_keycode(KeySym sym)
     return 0;
 }
 
-const gchar *obt_keyboard_keycode_to_string(guint keycode)
+gchar *obt_keyboard_keycode_to_string(guint keycode)
 {
     KeySym sym;
     const gchar *ret = NULL;
@@ -211,7 +211,7 @@ gunichar obt_keyboard_keycode_to_unichar(guint keycode)
 {
     gunichar unikey = 0;
 
-    const char *key;
+    char *key;
     if ((key = obt_keyboard_keycode_to_string(keycode)) != NULL &&
         /* don't accept keys that aren't a single letter, like "space" */
         key[1] == '\0')
index bfe0e92508b35648fd69a0c0556272db8d3db26f..a9029df39bd7337c7805778301078abcea7432fe 100644 (file)
@@ -59,7 +59,7 @@ guint obt_keyboard_modkey_to_modmask(ObtModkeysKey key);
 KeyCode obt_keyboard_keysym_to_keycode(KeySym sym);
 
 /*! Give the string form of a KeyCode */
-const gchar *obt_keyboard_keycode_to_string(guint keycode);
+gchar *obt_keyboard_keycode_to_string(guint keycode);
 
 /*! Translate a KeyCode to the unicode character it represents */
 gunichar obt_keyboard_keycode_to_unichar(guint keycode);
index f6f2fa07b76349c982a8c874af9097899a8590ac..64972dd708eb17aecec0fae7fa9190d6c1be12aa 100644 (file)
@@ -536,7 +536,7 @@ static void insert_timer(ObtMainLoop *loop, ObtMainLoopTimer *ins)
 {
     GSList *it;
     for (it = loop->timers; it; it = g_slist_next(it)) {
-        ObMainLoopTimer *t = it->data;
+        ObtMainLoopTimer *t = it->data;
         if (timecompare(&ins->timeout, &t->timeout) <= 0) {
             loop->timers = g_slist_insert_before(loop->timers, it, ins);
             break;
@@ -553,7 +553,7 @@ void obt_main_loop_timeout_add(ObtMainLoop *loop,
                                GEqualFunc cmp,
                                GDestroyNotify notify)
 {
-    ObMainLoopTimer *t = g_new(ObMainLoopTimer, 1);
+    ObtMainLoopTimer *t = g_new(ObtMainLoopTimer, 1);
 
     g_assert(microseconds > 0); /* if it's 0 it'll cause an infinite loop */
 
index 55a36793df00db218dcedec2d879d6ac8f9050f2..4de3111dbec5f9e3c4b17798298c0bcc30201825 100644 (file)
@@ -267,10 +267,10 @@ void obt_prop_message_to(Window to, Window about, Atom messagetype,
                       data0, data1, data2, data3, data4, \
                       SubstructureNotifyMask | SubstructureRedirectMask))
 
-#define OBT_PROP_MSG(to, about, msgtype, data0, data1, data2, data3, \
-                     data4, mask) \
-    (obt_prop_message_to(to, OBT_PROP_ATOM(msgtype), \
-                      data0, data1, data2, data3, data4, mask))
+#define OBT_PROP_MSG_TO(to, about, msgtype, data0, data1, data2, data3, \
+                        data4, mask) \
+    (obt_prop_message_to(to, about, OBT_PROP_ATOM(msgtype), \
+                         data0, data1, data2, data3, data4, mask))
 
 G_END_DECLS
 
index 281883b14b8a6ed288cd2b172a915364be31d030..c91d6e3b00a7f9ee1981e0e88697479f29657a80 100644 (file)
@@ -783,8 +783,8 @@ void client_unmanage(ObClient *self)
 
     /* these should not be left on the window ever.  other window managers
        don't necessarily use them and it will mess them up (like compiz) */
-    PROP_ERASE(self->window, net_wm_visible_name);
-    PROP_ERASE(self->window, net_wm_visible_icon_name);
+    OBT_PROP_ERASE(self->window, NET_WM_VISIBLE_NAME);
+    OBT_PROP_ERASE(self->window, NET_WM_VISIBLE_ICON_NAME);
 
     /* update the list hints */
     client_set_list();
@@ -1528,7 +1528,7 @@ void client_update_protocols(ObClient *self)
                 /* if this protocol is requested, then the window will be
                    notified whenever we want it to receive focus */
                 self->focus_notify = TRUE;
-            else if (proto[i] == prop_atoms.net_wm_ping)
+            else if (proto[i] == OBT_PROP_ATOM(NET_WM_PING))
                 /* if this protocol is requested, then the window will allow
                    pings to determine if it is still alive */
                 self->ping = TRUE;
@@ -2282,7 +2282,7 @@ static void client_get_session_ids(ObClient *self)
 
         /* see if it has the PID set too (the PID requires that the
            WM_CLIENT_MACHINE be set) */
-        if (PROP_GET32(self->window, net_wm_pid, cardinal, &pid))
+        if (OBT_PROP_GET32(self->window, NET_WM_PID, CARDINAL, &pid))
             self->pid = pid;
     }
 }
@@ -3240,8 +3240,8 @@ void client_close(ObClient *self)
     else
         /* request the client to close with WM_DELETE_WINDOW */
         OBT_PROP_MSG_TO(self->window, self->window, WM_PROTOCOLS,
-                        OBT_PROP_ATOM(WM_DELETE_WINDOW), event_curtime, 0, 0,
-                        NoEventMask);
+                        OBT_PROP_ATOM(WM_DELETE_WINDOW), event_curtime,
+                        0, 0, 0, NoEventMask);
 }
 
 void client_kill(ObClient *self)
index b2bfd8dbfb7cbd7bdee6c3a717acb1e46747afff..ce3649d914e829618cd1a8bff8b5fbcbe558fcb9 100644 (file)
@@ -226,7 +226,7 @@ static void parse_per_app_settings(xmlNodePtr node, gpointer d)
                     }
 
                 if (x_pos_given && (c = obt_parse_find_node(n->children, "y")))
-                    if (!obt_parse_node_contains("default", doc, c)) {
+                    if (!obt_parse_node_contains(c, "default")) {
                         config_parse_gravity_coord(c, &settings->position.y);
                         settings->pos_given = TRUE;
                     }
index 79ead346b2c32a10b3d2aaa7562807012cf8d10a..bbaf11c5e62891c1e9b3616da81195050687978e 100644 (file)
@@ -644,8 +644,7 @@ static void event_process(const XEvent *ec, gpointer data)
         /* keyboard layout changes for modifier mapping changes. reload the
            modifier map, and rebind all the key bindings as appropriate */
         ob_debug("Kepboard map changed. Reloading keyboard bindings.\n");
-        modkeys_shutdown(TRUE);
-        modkeys_startup(TRUE);
+        obt_keyboard_reload();
         keyboard_rebind();
     }
     else if (e->type == ClientMessage) {
@@ -769,8 +768,8 @@ static void event_handle_root(XEvent *e)
                 ob_restart();
             else if (e->xclient.data.l[0] == 3)
                 ob_exit(0);
-        } else if (msgtype == prop_atoms.wm_protocols) {
-            if ((Atom)e->xclient.data.l[0] == prop_atoms.net_wm_ping)
+        } else if (msgtype == OBT_PROP_ATOM(WM_PROTOCOLS)) {
+            if ((Atom)e->xclient.data.l[0] == OBT_PROP_ATOM(NET_WM_PING))
                 ping_got_pong(e->xclient.data.l[1]);
         }
         break;
index 8aefd76adcee0b9d26939eb41a9a23f9fc7cc427..e2897e7d4e250a43d678333aad7bca5241424d1c 100644 (file)
@@ -40,7 +40,6 @@
 #include "group.h"
 #include "config.h"
 #include "ping.h"
-#include "mainloop.h"
 #include "gettext.h"
 #include "render/render.h"
 #include "render/theme.h"
index 37b5d30c84b6ae72d2902eec68def036acdf4300..8bd333d395cf096454cee83d5b40289f74ddcfed 100644 (file)
 
 #include "ping.h"
 #include "client.h"
-#include "prop.h"
 #include "event.h"
 #include "debug.h"
-#include "mainloop.h"
 #include "openbox.h"
+#include "obt/mainloop.h"
+#include "obt/prop.h"
 
 typedef struct _ObPingTarget
 {
@@ -78,8 +78,8 @@ void ping_start(struct _ObClient *client, ObPingEventHandler h)
     t->client = client;
     t->h = h;
 
-    ob_main_loop_timeout_add(ob_main_loop, PING_TIMEOUT, ping_timeout,
-                             t, g_direct_equal, NULL);
+    obt_main_loop_timeout_add(ob_main_loop, PING_TIMEOUT, ping_timeout,
+                              t, g_direct_equal, NULL);
     /* act like we just timed out immediately, to start the pinging process
        now instead of after the first delay.  this makes sure the client
        ends up in the ping_ids hash table now. */
@@ -132,9 +132,9 @@ static void ping_send(ObPingTarget *t)
     }
 
     /*ob_debug("+PING: '%s' (id %u)\n", t->client->title, t->id);*/
-    PROP_MSG_TO(t->client->window, t->client->window, wm_protocols,
-                prop_atoms.net_wm_ping, t->id, t->client->window, 0, 0,
-                NoEventMask);
+    OBT_PROP_MSG_TO(t->client->window, t->client->window, WM_PROTOCOLS,
+                    OBT_PROP_ATOM(NET_WM_PING), t->id, t->client->window, 0, 0,
+                    NoEventMask);
 }
 
 static gboolean ping_timeout(gpointer data)
@@ -159,7 +159,8 @@ static void ping_end(ObClient *client, gpointer data)
     if ((t = g_hash_table_find(ping_ids, find_client, client))) {
         g_hash_table_remove(ping_ids, &t->id);
 
-        ob_main_loop_timeout_remove_data(ob_main_loop, ping_timeout, t, FALSE);
+        obt_main_loop_timeout_remove_data(ob_main_loop, ping_timeout,
+                                          t, FALSE);
 
         g_free(t);
     }
index a2b3f1602c1fd52574830ff092b66d942a775dc5..31cc7177e06422e72276b6bb427ec8ce5df7dc36 100644 (file)
 #ifndef ob__resist_h
 #define ob__resist_h
 
-struct _ObClient;
+#include "misc.h"
 
 #include <glib.h>
 
+struct _ObClient;
+
 /*! @x The client's x destination (in the client's coordinates, not the frame's
     @y The client's y destination (in the client's coordinates, not the frame's
 */
index ef98446b7163d713407c95a0dd5d3ad30c5f7035..1d617e7aca675f9ef509761a215da67c0b21414f 100644 (file)
@@ -24,7 +24,6 @@
 #include "startupnotify.h"
 #include "moveresize.h"
 #include "config.h"
-#include "mainloop.h"
 #include "screen.h"
 #include "client.h"
 #include "session.h"
@@ -36,6 +35,7 @@
 #include "gettext.h"
 #include "obt/display.h"
 #include "obt/prop.h"
+#include "obt/mainloop.h"
 
 #include <X11/Xlib.h>
 #ifdef HAVE_UNISTD_H
@@ -661,9 +661,9 @@ void screen_set_desktop(guint num, gboolean dofocus)
         }
     }
     screen_desktop_timeout = FALSE;
-    ob_main_loop_timeout_remove(ob_main_loop, last_desktop_func);
-    ob_main_loop_timeout_add(ob_main_loop, REMEMBER_LAST_DESKTOP_TIME,
-                             last_desktop_func, NULL, NULL, NULL);
+    obt_main_loop_timeout_remove(ob_main_loop, last_desktop_func);
+    obt_main_loop_timeout_add(ob_main_loop, REMEMBER_LAST_DESKTOP_TIME,
+                              last_desktop_func, NULL, NULL, NULL);
 
     ob_debug("Moving to desktop %d\n", num+1);
 
@@ -922,15 +922,15 @@ void screen_show_desktop_popup(guint d)
                           MAX(a->width/3, POPUP_WIDTH));
     pager_popup_show(desktop_popup, screen_desktop_names[d], d);
 
-    ob_main_loop_timeout_remove(ob_main_loop, hide_desktop_popup_func);
-    ob_main_loop_timeout_add(ob_main_loop, config_desktop_popup_time * 1000,
-                             hide_desktop_popup_func, NULL, NULL, NULL);
+    obt_main_loop_timeout_remove(ob_main_loop, hide_desktop_popup_func);
+    obt_main_loop_timeout_add(ob_main_loop, config_desktop_popup_time * 1000,
+                              hide_desktop_popup_func, NULL, NULL, NULL);
     g_free(a);
 }
 
 void screen_hide_desktop_popup(void)
 {
-    ob_main_loop_timeout_remove(ob_main_loop, hide_desktop_popup_func);
+    obt_main_loop_timeout_remove(ob_main_loop, hide_desktop_popup_func);
     pager_popup_hide(desktop_popup);
 }
 
index a18eb29ead16e84055c84639fd1a45e3ce7a41f2..b44b98196d3f884cd265ca50a3d64bfe1b445254 100644 (file)
@@ -129,7 +129,7 @@ void stacking_temp_raise(ObWindow *window)
     }
 
     win[1] = window_top(window);
-    XRestackWindows(ob_display, win, 2);
+    XRestackWindows(obt_display, win, 2);
 
     pause_changes = TRUE;
 }
@@ -144,7 +144,7 @@ void stacking_restore(void)
     win[0] = screen_support_win;
     for (i = 1, it = stacking_list; it; ++i, it = g_list_next(it))
         win[i] = window_top(it->data);
-    XRestackWindows(ob_display, win, i);
+    XRestackWindows(obt_display, win, i);
     g_free(win);
 
     pause_changes = FALSE;
This page took 0.042106 seconds and 4 git commands to generate.