]> Dogcows Code - chaz/openbox/blobdiff - openbox/prop.c
yay. way way cleaner code for iconify animations. let people show/hide the frame...
[chaz/openbox] / openbox / prop.c
index 655fd07b9b8cb02903698d0b9072116972dbc606..e622c7dd74572d19a0fc31057494670b8dba7063 100644 (file)
@@ -85,13 +85,18 @@ void prop_startup()
     CREATE(net_wm_strut, "_NET_WM_STRUT");
     CREATE(net_wm_strut_partial, "_NET_WM_STRUT_PARTIAL");
     CREATE(net_wm_icon, "_NET_WM_ICON");
+    CREATE(net_wm_icon_geometry, "_NET_WM_ICON_GEOMETRY");
 /*   CREATE(net_wm_pid, "_NET_WM_PID"); */
     CREATE(net_wm_allowed_actions, "_NET_WM_ALLOWED_ACTIONS");
     CREATE(net_wm_user_time, "_NET_WM_USER_TIME");
     CREATE(net_frame_extents, "_NET_FRAME_EXTENTS");
 
 /*   CREATE(net_wm_ping, "_NET_WM_PING"); */
-  
+#ifdef SYNC
+    CREATE(net_wm_sync_request, "_NET_WM_SYNC_REQUEST");
+    CREATE(net_wm_sync_request_counter, "_NET_WM_SYNC_REQUEST_COUNTER");
+#endif
+
     CREATE(net_wm_window_type_desktop, "_NET_WM_WINDOW_TYPE_DESKTOP");
     CREATE(net_wm_window_type_dock, "_NET_WM_WINDOW_TYPE_DOCK");
     CREATE(net_wm_window_type_toolbar, "_NET_WM_WINDOW_TYPE_TOOLBAR");
@@ -118,7 +123,6 @@ void prop_startup()
     CREATE(net_wm_action_resize, "_NET_WM_ACTION_RESIZE");
     CREATE(net_wm_action_minimize, "_NET_WM_ACTION_MINIMIZE");
     CREATE(net_wm_action_shade, "_NET_WM_ACTION_SHADE");
-    CREATE(net_wm_action_stick, "_NET_WM_ACTION_STICK");
     CREATE(net_wm_action_maximize_horz, "_NET_WM_ACTION_MAXIMIZE_HORZ");
     CREATE(net_wm_action_maximize_vert, "_NET_WM_ACTION_MAXIMIZE_VERT");
     CREATE(net_wm_action_fullscreen, "_NET_WM_ACTION_FULLSCREEN");
@@ -299,8 +303,7 @@ gboolean prop_get_string_locale(Window win, Atom prop, gchar **ret)
     gchar *s;
 
     if (get_stringlist(win, prop, &list, &nstr) && nstr) {
-        s = g_convert(list[0], strlen(list[0]), "UTF-8", "ISO-8859-1",
-                      NULL, NULL, NULL);
+        s = g_locale_to_utf8(list[0], -1, NULL, NULL, NULL);
         XFreeStringList(list);
         if (s) {
             *ret = s;
@@ -329,8 +332,7 @@ gboolean prop_get_strings_locale(Window win, Atom prop, gchar ***ret)
         (*ret)[count] = NULL; /* null terminated list */
 
         for (i = 0, it = strs; it; ++i, it = g_slist_next(it)) {
-            (*ret)[i] = g_convert(it->data, -1, "UTF-8", "ISO-8859-1",
-                                  NULL, NULL, NULL);
+            (*ret)[i] = g_locale_to_utf8(it->data, -1, NULL, NULL, NULL);
             /* make sure translation did not fail */
             if (!(*ret)[i])
                 (*ret)[i] = g_strdup("");
@@ -406,7 +408,7 @@ void prop_set_array32(Window win, Atom prop, Atom type, gulong *val,
 void prop_set_string_utf8(Window win, Atom prop, const gchar *val)
 {
     XChangeProperty(ob_display, win, prop, prop_atoms.utf8, 8,
-                    PropModeReplace, (guchar*)val, strlen(val));
+                    PropModeReplace, (const guchar*)val, strlen(val));
 }
 
 void prop_set_strings_utf8(Window win, Atom prop, gchar **strs)
@@ -442,6 +444,7 @@ void prop_message(Window about, Atom messagetype, glong data0, glong data1,
     ce.xclient.data.l[1] = data1;
     ce.xclient.data.l[2] = data2;
     ce.xclient.data.l[3] = data3;
+    ce.xclient.data.l[4] = 0;
     XSendEvent(ob_display, RootWindow(ob_display, ob_screen), FALSE,
                mask, &ce);
 }
This page took 0.022762 seconds and 4 git commands to generate.