X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fprop.c;h=5cc101092a2819ebfeaecc7ff29a38929c3dac2b;hb=35418ca0fcd3fd28ef579f4435b8bad3b7c87f04;hp=f3afc6faa66af667abd7f55b6a35ac9677c76e72;hpb=7837faa3402faf2eff48adc5024509deb2be98ac;p=chaz%2Fopenbox diff --git a/openbox/prop.c b/openbox/prop.c index f3afc6fa..5cc10109 100644 --- a/openbox/prop.c +++ b/openbox/prop.c @@ -282,7 +282,7 @@ gboolean prop_get_strings_locale(Window win, Atom prop, char ***ret) char *raw, *p; guint num, i, count = 0; - if (get_all(win, prop, prop_atoms.utf8, 8, (guchar**)&raw, &num)) { + if (get_all(win, prop, prop_atoms.string, 8, (guchar**)&raw, &num)) { p = raw; while (p < raw + num - 1) { @@ -294,7 +294,7 @@ gboolean prop_get_strings_locale(Window win, Atom prop, char ***ret) *ret = g_new0(char*, count + 1); (*ret)[count] = NULL; /* null terminated list */ - for (it = strs; it; it = g_slist_next(it)) { + 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); /* make sure translation did not fail */ @@ -343,7 +343,7 @@ gboolean prop_get_strings_utf8(Window win, Atom prop, char ***ret) *ret = g_new0(char*, count + 1); - for (it = strs; it; it = g_slist_next(it)) { + for (i = 0, it = strs; it; ++i, it = g_slist_next(it)) { if (g_utf8_validate(it->data, -1, NULL)) (*ret)[i] = g_strdup(it->data); else @@ -407,6 +407,6 @@ void prop_message(Window about, Atom messagetype, long data0, long data1, ce.xclient.data.l[1] = data1; ce.xclient.data.l[2] = data2; ce.xclient.data.l[3] = data3; - XSendEvent(ob_display, ob_root, FALSE, + XSendEvent(ob_display, RootWindow(ob_display, ob_screen), FALSE, SubstructureNotifyMask | SubstructureRedirectMask, &ce); }