updated on Sun Jan 15 04:04:02 UTC 2012
[aur-mirror.git] / wmctrl-with-undecorated-support / wmctrl_undecorated.patch
blob9da7ef4aa25777478bae5ea36e93e7ea79dd62b1
1 --- main.org.c 2003-10-04 02:19:23.000000000 +0200
2 +++ main.c 2004-01-04 22:26:26.724016128 +0100
3 @@ -144,6 +144,8 @@
4 " shaded, skip_taskbar, skip_pager, hidden,\n" \
5 " fullscreen, above, below\n" \
6 "\n" \
7 +" With Openbox3 you can additionaly use \"undecorated\".\n" \
8 +"\n" \
9 "Workarounds:\n" \
10 "\n" \
11 " DESKTOP_TITLES_INVALID_UTF8 Print non-ASCII desktop titles correctly\n" \
12 @@ -731,7 +733,12 @@
13 fputs("Invalid zero length property.\n", stderr);
14 return EXIT_FAILURE;
16 - tmp_prop2 = g_strdup_printf("_NET_WM_STATE_%s", tmp2 = g_ascii_strup(p2, -1));
17 + if (strcmp(p2,"undecorated") == 0) {
18 + tmp_prop2 = g_strdup_printf("_OB_WM_STATE_%s", tmp2 = g_ascii_strup(p2, -1));
19 + }
20 + else {
21 + tmp_prop2 = g_strdup_printf("_NET_WM_STATE_%s", tmp2 = g_ascii_strup(p2, -1));
22 + }
23 p_verbose("State 2: %s\n", tmp_prop2);
24 prop2 = XInternAtom(disp, tmp_prop2, False);
25 g_free(tmp2);
26 @@ -743,7 +750,12 @@
27 fputs("Invalid zero length property.\n", stderr);
28 return EXIT_FAILURE;
30 - tmp_prop1 = g_strdup_printf("_NET_WM_STATE_%s", tmp1 = g_ascii_strup(p1, -1));
31 + if (strcmp(p1,"undecorated") == 0) {
32 + tmp_prop1 = g_strdup_printf("_OB_WM_STATE_%s", tmp1 = g_ascii_strup(p1, -1));
33 + }
34 + else {
35 + tmp_prop1 = g_strdup_printf("_NET_WM_STATE_%s", tmp1 = g_ascii_strup(p1, -1));
36 + }
37 p_verbose("State 1: %s\n", tmp_prop1);
38 prop1 = XInternAtom(disp, tmp_prop1, False);
39 g_free(tmp1);