summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--netwm.txt19
-rw-r--r--src/bin/e_border.c67
-rw-r--r--src/bin/e_border.h17
-rw-r--r--src/bin/e_hints.c10
4 files changed, 102 insertions, 11 deletions
diff --git a/netwm.txt b/netwm.txt
index f95dcd482..9c3d318e4 100644
--- a/netwm.txt
+++ b/netwm.txt
@@ -7,13 +7,16 @@
7 * E can have multiple virtual roots AND multiple desktops AND several 7 * E can have multiple virtual roots AND multiple desktops AND several
8 * zones when using xinerama 8 * zones when using xinerama
9 */ 9 */
10/*
11 * T = For taskbar
12 */
10 13
11_NET_ACTIVE_WINDOW [?] /* Listen to active window requests */ 14_NET_ACTIVE_WINDOW [?] /* Listen to active window requests */
12_NET_CLIENT_LIST [X] 15_NET_CLIENT_LIST [X]
13_NET_CLIENT_LIST_STACKING [X] 16_NET_CLIENT_LIST_STACKING [X]
14_NET_CLOSE_WINDOW [P] 17_NET_CLOSE_WINDOW [P]
15_NET_CURRENT_DESKTOP [P] 18_NET_CURRENT_DESKTOP [P]
16_NET_DESKTOP_GEOMETRY [?] /* Listen to _NET_DESKTOP_GEOMETRY requests */ 19_NET_DESKTOP_GEOMETRY [P]
17_NET_DESKTOP_LAYOUT [P] 20_NET_DESKTOP_LAYOUT [P]
18_NET_DESKTOP_NAMES [ ] 21_NET_DESKTOP_NAMES [ ]
19_NET_DESKTOP_VIEWPORT [P] 22_NET_DESKTOP_VIEWPORT [P]
@@ -37,10 +40,10 @@ _NET_WM_ACTION_RESIZE [ ]
37_NET_WM_ACTION_SHADE [ ] 40_NET_WM_ACTION_SHADE [ ]
38_NET_WM_ACTION_STICK [ ] 41_NET_WM_ACTION_STICK [ ]
39_NET_WM_ALLOWED_ACTIONS [ ] 42_NET_WM_ALLOWED_ACTIONS [ ]
40_NET_WM_DESKTOP [?] /* Remove this property on unmap */ 43_NET_WM_DESKTOP [ ]
41_NET_WM_HANDLED_ICONS [ ] 44_NET_WM_HANDLED_ICONS [T]
42_NET_WM_ICON [X] 45_NET_WM_ICON [X]
43_NET_WM_ICON_GEOMETRY [ ] 46_NET_WM_ICON_GEOMETRY [T]
44_NET_WM_ICON_NAME [X] 47_NET_WM_ICON_NAME [X]
45_NET_WM_MOVERESIZE [ ] 48_NET_WM_MOVERESIZE [ ]
46_NET_WM_NAME [X] 49_NET_WM_NAME [X]
@@ -63,11 +66,11 @@ _NET_WM_STATE_FULLSCREEN [X]
63_NET_WM_STATE_ABOVE [X] 66_NET_WM_STATE_ABOVE [X]
64_NET_WM_STATE_BELOW [X] 67_NET_WM_STATE_BELOW [X]
65_NET_WM_STATE_DEMANDS_ATTENTION [ ] 68_NET_WM_STATE_DEMANDS_ATTENTION [ ]
66_NET_WM_STRUT [ ] 69_NET_WM_STRUT [X]
67_NET_WM_STRUT_PARTIAL [ ] 70_NET_WM_STRUT_PARTIAL [X]
68_NET_WM_SYNC_REQUEST [ ] 71_NET_WM_SYNC_REQUEST [ ]
69_NET_WM_SYNC_REQUEST_COUNTER [ ] 72_NET_WM_SYNC_REQUEST_COUNTER [ ]
70_NET_WM_USER_TIME [ ] 73_NET_WM_USER_TIME [X]
71_NET_WM_VISIBLE_ICON_NAME [X] /* E uses _NET_WM_ICON_NAME, doesn't need to set this */ 74_NET_WM_VISIBLE_ICON_NAME [X] /* E uses _NET_WM_ICON_NAME, doesn't need to set this */
72_NET_WM_VISIBLE_NAME [X] /* E uses _NET_WM_NAME, doesn't need to set this */ 75_NET_WM_VISIBLE_NAME [X] /* E uses _NET_WM_NAME, doesn't need to set this */
73/* Do we have to do anything special with these, except 76/* Do we have to do anything special with these, except
@@ -81,4 +84,4 @@ _NET_WM_WINDOW_TYPE_UTILITY [X]
81_NET_WM_WINDOW_TYPE_SPLASH [X] 84_NET_WM_WINDOW_TYPE_SPLASH [X]
82_NET_WM_WINDOW_TYPE_DIALOG [X] 85_NET_WM_WINDOW_TYPE_DIALOG [X]
83_NET_WM_WINDOW_TYPE_NORMAL [X] 86_NET_WM_WINDOW_TYPE_NORMAL [X]
84_NET_WORKAREA [ ] 87_NET_WORKAREA [X]
diff --git a/src/bin/e_border.c b/src/bin/e_border.c
index 1e4fbf64d..663cdd2f2 100644
--- a/src/bin/e_border.c
+++ b/src/bin/e_border.c
@@ -355,6 +355,20 @@ e_border_new(E_Container *con, Ecore_X_Window win, int first_map)
355 { 355 {
356 bd->client.netwm.fetch.icon = 1; 356 bd->client.netwm.fetch.icon = 1;
357 } 357 }
358 else if (atoms[i] == ECORE_X_ATOM_NET_WM_USER_TIME)
359 {
360 bd->client.netwm.fetch.user_time = 1;
361 }
362 else if (atoms[i] == ECORE_X_ATOM_NET_WM_STRUT)
363 {
364 printf("ECORE_X_ATOM_NET_WM_STRUT\n");
365 bd->client.netwm.fetch.strut = 1;
366 }
367 else if (atoms[i] == ECORE_X_ATOM_NET_WM_STRUT_PARTIAL)
368 {
369 printf("ECORE_X_ATOM_NET_WM_STRUT_PARTIAL\n");
370 bd->client.netwm.fetch.strut = 1;
371 }
358 } 372 }
359 free(atoms); 373 free(atoms);
360 } 374 }
@@ -1971,6 +1985,21 @@ _e_border_cb_window_property(void *data, int ev_type, void *ev)
1971 bd->client.netwm.fetch.icon = 1; 1985 bd->client.netwm.fetch.icon = 1;
1972 bd->changed = 1; 1986 bd->changed = 1;
1973 } 1987 }
1988 else if (e->atom == ECORE_X_ATOM_NET_WM_USER_TIME)
1989 {
1990 bd->client.netwm.fetch.user_time = 1;
1991 bd->changed = 1;
1992 }
1993 else if (e->atom == ECORE_X_ATOM_NET_WM_STRUT)
1994 {
1995 bd->client.netwm.fetch.strut = 1;
1996 bd->changed = 1;
1997 }
1998 else if (e->atom == ECORE_X_ATOM_NET_WM_STRUT_PARTIAL)
1999 {
2000 bd->client.netwm.fetch.strut = 1;
2001 bd->changed = 1;
2002 }
1974 */ 2003 */
1975 return 1; 2004 return 1;
1976} 2005}
@@ -2944,6 +2973,44 @@ _e_border_eval(E_Border *bd)
2944 bd->changes.icon = 1; 2973 bd->changes.icon = 1;
2945 bd->client.netwm.fetch.icon = 0; 2974 bd->client.netwm.fetch.icon = 0;
2946 } 2975 }
2976 if (bd->client.netwm.fetch.user_time)
2977 {
2978 ecore_x_netwm_user_time_get(bd->client.win, &bd->client.netwm.user_time);
2979
2980 bd->client.netwm.fetch.user_time = 0;
2981 }
2982 if (bd->client.netwm.fetch.strut)
2983 {
2984 if (!ecore_x_netwm_strut_partial_get(bd->client.win,
2985 &bd->client.netwm.strut.left,
2986 &bd->client.netwm.strut.right,
2987 &bd->client.netwm.strut.top,
2988 &bd->client.netwm.strut.bottom,
2989 &bd->client.netwm.strut.left_start_y,
2990 &bd->client.netwm.strut.left_end_y,
2991 &bd->client.netwm.strut.right_start_y,
2992 &bd->client.netwm.strut.right_end_y,
2993 &bd->client.netwm.strut.top_start_x,
2994 &bd->client.netwm.strut.top_end_x,
2995 &bd->client.netwm.strut.bottom_start_x,
2996 &bd->client.netwm.strut.bottom_end_x))
2997 {
2998 ecore_x_netwm_strut_get(bd->client.win,
2999 &bd->client.netwm.strut.left, &bd->client.netwm.strut.right,
3000 &bd->client.netwm.strut.top, &bd->client.netwm.strut.bottom);
3001
3002 bd->client.netwm.strut.left_start_y = 0;
3003 bd->client.netwm.strut.left_end_y = 0;
3004 bd->client.netwm.strut.right_start_y = 0;
3005 bd->client.netwm.strut.right_end_y = 0;
3006 bd->client.netwm.strut.top_start_x = 0;
3007 bd->client.netwm.strut.top_end_x = 0;
3008 bd->client.netwm.strut.bottom_start_x = 0;
3009 bd->client.netwm.strut.bottom_end_x = 0;
3010 }
3011
3012 bd->client.netwm.fetch.strut = 0;
3013 }
2947 if (bd->changes.icon) 3014 if (bd->changes.icon)
2948 { 3015 {
2949 if (bd->icon_object) 3016 if (bd->icon_object)
diff --git a/src/bin/e_border.h b/src/bin/e_border.h
index cbb61bdaa..b8a17c853 100644
--- a/src/bin/e_border.h
+++ b/src/bin/e_border.h
@@ -168,6 +168,21 @@ struct _E_Border
168 int height; 168 int height;
169 int size; 169 int size;
170 } icon; 170 } icon;
171 unsigned int user_time;
172 struct {
173 int left;
174 int right;
175 int top;
176 int bottom;
177 int left_start_y;
178 int left_end_y;
179 int right_start_y;
180 int right_end_y;
181 int top_start_x;
182 int top_end_x;
183 int bottom_start_x;
184 int bottom_end_x;
185 } strut;
171 186
172 /* NetWM Window state */ 187 /* NetWM Window state */
173 struct { 188 struct {
@@ -189,6 +204,8 @@ struct _E_Border
189 unsigned char name : 1; 204 unsigned char name : 1;
190 unsigned char icon_name : 1; 205 unsigned char icon_name : 1;
191 unsigned char icon : 1; 206 unsigned char icon : 1;
207 unsigned char user_time : 1;
208 unsigned char strut : 1;
192 /* No, fetch on new_client, shouldn't be changed after map. 209 /* No, fetch on new_client, shouldn't be changed after map.
193 unsigned char pid : 1; 210 unsigned char pid : 1;
194 */ 211 */
diff --git a/src/bin/e_hints.c b/src/bin/e_hints.c
index ad371d2b8..60932c75a 100644
--- a/src/bin/e_hints.c
+++ b/src/bin/e_hints.c
@@ -43,8 +43,6 @@ e_hints_init(void)
43 ecore_x_netwm_supported(roots[i], ECORE_X_ATOM_NET_CLIENT_LIST, 1); 43 ecore_x_netwm_supported(roots[i], ECORE_X_ATOM_NET_CLIENT_LIST, 1);
44 ecore_x_netwm_supported(roots[i], ECORE_X_ATOM_NET_CLIENT_LIST_STACKING, 1); 44 ecore_x_netwm_supported(roots[i], ECORE_X_ATOM_NET_CLIENT_LIST_STACKING, 1);
45 45
46 ecore_x_netwm_supported(roots[i], ECORE_X_ATOM_NET_DESKTOP_GEOMETRY, 1);
47
48 ecore_x_netwm_supported(roots[i], ECORE_X_ATOM_NET_FRAME_EXTENTS, 1); 46 ecore_x_netwm_supported(roots[i], ECORE_X_ATOM_NET_FRAME_EXTENTS, 1);
49 47
50 ecore_x_netwm_supported(roots[i], ECORE_X_ATOM_NET_SUPPORTED, 1); 48 ecore_x_netwm_supported(roots[i], ECORE_X_ATOM_NET_SUPPORTED, 1);
@@ -68,6 +66,10 @@ e_hints_init(void)
68 ecore_x_netwm_supported(roots[i], ECORE_X_ATOM_NET_WM_STATE_ABOVE, 1); 66 ecore_x_netwm_supported(roots[i], ECORE_X_ATOM_NET_WM_STATE_ABOVE, 1);
69 ecore_x_netwm_supported(roots[i], ECORE_X_ATOM_NET_WM_STATE_BELOW, 1); 67 ecore_x_netwm_supported(roots[i], ECORE_X_ATOM_NET_WM_STATE_BELOW, 1);
70 68
69 ecore_x_netwm_supported(roots[i], ECORE_X_ATOM_NET_WM_STRUT, 1);
70 ecore_x_netwm_supported(roots[i], ECORE_X_ATOM_NET_WM_STRUT_PARTIAL, 1);
71
72 ecore_x_netwm_supported(roots[i], ECORE_X_ATOM_NET_WM_USER_TIME, 1);
71 ecore_x_netwm_supported(roots[i], ECORE_X_ATOM_NET_WM_VISIBLE_ICON_NAME, 1); 73 ecore_x_netwm_supported(roots[i], ECORE_X_ATOM_NET_WM_VISIBLE_ICON_NAME, 1);
72 ecore_x_netwm_supported(roots[i], ECORE_X_ATOM_NET_WM_VISIBLE_NAME, 1); 74 ecore_x_netwm_supported(roots[i], ECORE_X_ATOM_NET_WM_VISIBLE_NAME, 1);
73 75
@@ -80,6 +82,7 @@ e_hints_init(void)
80 ecore_x_netwm_supported(roots[i], ECORE_X_ATOM_NET_WM_WINDOW_TYPE_SPLASH, 1); 82 ecore_x_netwm_supported(roots[i], ECORE_X_ATOM_NET_WM_WINDOW_TYPE_SPLASH, 1);
81 ecore_x_netwm_supported(roots[i], ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DIALOG, 1); 83 ecore_x_netwm_supported(roots[i], ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DIALOG, 1);
82 ecore_x_netwm_supported(roots[i], ECORE_X_ATOM_NET_WM_WINDOW_TYPE_NORMAL, 1); 84 ecore_x_netwm_supported(roots[i], ECORE_X_ATOM_NET_WM_WINDOW_TYPE_NORMAL, 1);
85 ecore_x_netwm_supported(roots[i], ECORE_X_ATOM_NET_WORKAREA, 1);
83 } 86 }
84 free(roots); 87 free(roots);
85 } 88 }
@@ -108,7 +111,6 @@ e_hints_e16_comms_pretend(E_Manager *man)
108void 111void
109e_hints_manager_init(E_Manager *man) 112e_hints_manager_init(E_Manager *man)
110{ 113{
111 ecore_x_netwm_desk_size_set(man->root, man->w, man->h);
112 e_hints_e16_comms_pretend(man); 114 e_hints_e16_comms_pretend(man);
113} 115}
114 116
@@ -1033,7 +1035,9 @@ e_hints_window_desktop_set(E_Border *bd)
1033 deskpos[1] = bd->desk->y; 1035 deskpos[1] = bd->desk->y;
1034 ecore_x_window_prop_card32_set(bd->client.win, E_ATOM_DESK, deskpos, 2); 1036 ecore_x_window_prop_card32_set(bd->client.win, E_ATOM_DESK, deskpos, 2);
1035 1037
1038#if 0
1036 ecore_x_netwm_desktop_set(bd->client.win, current); 1039 ecore_x_netwm_desktop_set(bd->client.win, current);
1040#endif
1037 bd->client.netwm.desktop = current; 1041 bd->client.netwm.desktop = current;
1038 } 1042 }
1039} 1043}