From bf701a2010c8f0d2ad83553adf9cd668178a88be Mon Sep 17 00:00:00 2001 From: sebastid Date: Sat, 28 May 2005 12:50:22 +0000 Subject: [PATCH] ecore update. netwm update. SVN revision: 14986 --- TODO | 1 + netwm.txt | 27 +++++++++++++++------------ src/bin/e_border.c | 11 +++++------ src/bin/e_hints.c | 9 +++++++-- 4 files changed, 28 insertions(+), 20 deletions(-) diff --git a/TODO b/TODO index 7ea6d7f07..56242d20c 100644 --- a/TODO +++ b/TODO @@ -55,6 +55,7 @@ Also look at all the .c files - they have their own localized TODO lists These are in no particular order: +* don't show borders before window * double check edje and evas image caches are working * breaking out config via ipc / e_remote is too much work. this needs to get easier. diff --git a/netwm.txt b/netwm.txt index fc4aa4fce..fd4c7d40d 100644 --- a/netwm.txt +++ b/netwm.txt @@ -2,22 +2,26 @@ * Not all of these are hints, just copied out * everything with _NET in it from the spec. */ +/* + * P = For pagers, and extern pager wont work with E's desktop setup + * E can have multiple virtual roots AND multiple desktops AND several + * zones when using xinerama + */ _NET_ACTIVE_WINDOW [?] /* Listen to active window requests */ _NET_CLIENT_LIST [X] _NET_CLIENT_LIST_STACKING [X] -_NET_CLOSE_WINDOW [ ] -_NET_CURRENT_DESKTOP [ ] +_NET_CLOSE_WINDOW [P] +_NET_CURRENT_DESKTOP [P] _NET_DESKTOP_GEOMETRY [?] /* Listen to _NET_DESKTOP_GEOMETRY requests */ -_NET_DESKTOP_LAYOUT [ ] -_NET_DESKTOP_LAYOUT_S [ ] +_NET_DESKTOP_LAYOUT [P] _NET_DESKTOP_NAMES [ ] -_NET_DESKTOP_VIEWPORT [ ] +_NET_DESKTOP_VIEWPORT [P] _NET_FRAME_EXTENTS [X] -_NET_MOVERESIZE_WINDOW [ ] -_NET_NUMBER_OF_DESKTOPS [ ] +_NET_MOVERESIZE_WINDOW [P] +_NET_NUMBER_OF_DESKTOPS [P] _NET_REQUEST_FRAME_EXTENTS [ ] -_NET_RESTACK_WINDOW [ ] +_NET_RESTACK_WINDOW [P] _NET_SHOWING_DESKTOP [ ] _NET_SUPPORTED [X] _NET_SUPPORTING_WM_CHECK [X] @@ -37,7 +41,7 @@ _NET_WM_DESKTOP [?] /* Remove this property on unmap */ _NET_WM_HANDLED_ICONS [ ] _NET_WM_ICON [ ] _NET_WM_ICON_GEOMETRY [ ] -_NET_WM_ICON_NAME [ ] +_NET_WM_ICON_NAME [X] _NET_WM_MOVERESIZE [ ] _NET_WM_NAME [X] _NET_WM_PID [X] @@ -64,9 +68,8 @@ _NET_WM_STRUT_PARTIAL [ ] _NET_WM_SYNC_REQUEST [ ] _NET_WM_SYNC_REQUEST_COUNTER [ ] _NET_WM_USER_TIME [ ] -_NET_WM_VISIBLE_ICON_NAME [ ] -_NET_WM_VISIBLE_NAME [ ] -_NET_WM_VISIBLE_NAME_STRING [ ] +_NET_WM_VISIBLE_ICON_NAME [X] /* E uses _NET_WM_ICON_NAME, doesn't need to set this */ +_NET_WM_VISIBLE_NAME [X] /* E uses _NET_WM_NAME, doesn't need to set this */ /* Do we have to do anything special with these, except * stacking order? */ _NET_WM_WINDOW_TYPE [X] diff --git a/src/bin/e_border.c b/src/bin/e_border.c index 07c229ab9..c06d216eb 100644 --- a/src/bin/e_border.c +++ b/src/bin/e_border.c @@ -36,7 +36,7 @@ static int _e_border_cb_window_colormap(void *data, int ev_type, void *ev); static int _e_border_cb_window_shape(void *data, int ev_type, void *ev); static int _e_border_cb_window_focus_in(void *data, int ev_type, void *ev); static int _e_border_cb_window_focus_out(void *data, int ev_type, void *ev); -static int _e_border_cb_window_state(void *data, int ev_type, void *ev); +static int _e_border_cb_window_state_request(void *data, int ev_type, void *ev); static int _e_border_cb_desktop_change(void *data, int ev_type, void *ev); static int _e_border_cb_client_message(void *data, int ev_type, void *ev); @@ -162,7 +162,7 @@ e_border_init(void) handlers = evas_list_append(handlers, ecore_event_handler_add(ECORE_X_EVENT_WINDOW_SHAPE, _e_border_cb_window_shape, NULL)); handlers = evas_list_append(handlers, ecore_event_handler_add(ECORE_X_EVENT_WINDOW_FOCUS_IN, _e_border_cb_window_focus_in, NULL)); handlers = evas_list_append(handlers, ecore_event_handler_add(ECORE_X_EVENT_WINDOW_FOCUS_OUT, _e_border_cb_window_focus_out, NULL)); - handlers = evas_list_append(handlers, ecore_event_handler_add(ECORE_X_EVENT_WINDOW_STATE, _e_border_cb_window_state, NULL)); + handlers = evas_list_append(handlers, ecore_event_handler_add(ECORE_X_EVENT_WINDOW_STATE_REQUEST, _e_border_cb_window_state_request, NULL)); handlers = evas_list_append(handlers, ecore_event_handler_add(ECORE_X_EVENT_DESKTOP_CHANGE, _e_border_cb_desktop_change, NULL)); handlers = evas_list_append(handlers, ecore_event_handler_add(ECORE_X_EVENT_CLIENT_MESSAGE, _e_border_cb_client_message, NULL)); ecore_x_passive_grab_replay_func_set(_e_border_cb_grab_replay, NULL); @@ -1986,10 +1986,10 @@ _e_border_cb_window_focus_out(void *data, int ev_type, void *ev) } static int -_e_border_cb_window_state(void *data, int ev_type, void *ev) +_e_border_cb_window_state_request(void *data, int ev_type, void *ev) { E_Border *bd; - Ecore_X_Event_Window_State *e; + Ecore_X_Event_Window_State_Request *e; int i, on; e = ev; @@ -2792,8 +2792,7 @@ _e_border_eval(E_Border *bd) } if (bd->client.icccm.fetch.icon_name) { - if (bd->client.icccm.icon_name) free(bd->client.icccm.icon_name); - bd->client.icccm.icon_name = ecore_x_window_prop_icon_name_get(bd->client.win); + e_hints_window_icon_name_get(bd); bd->client.icccm.fetch.icon_name = 0; } if (bd->client.icccm.fetch.machine) diff --git a/src/bin/e_hints.c b/src/bin/e_hints.c index f071c5012..aa970aaa5 100644 --- a/src/bin/e_hints.c +++ b/src/bin/e_hints.c @@ -1025,9 +1025,14 @@ e_hints_window_icon_name_get(E_Border *bd) { char *name; + if (bd->client.icccm.icon_name) free(bd->client.icccm.icon_name); + name = ecore_x_netwm_icon_name_get(bd->client.win); - if (bd->client.icccm.icon_name) - free(bd->client.icccm.icon_name); + if (!name) + name = ecore_x_icccm_icon_name_get(bd->client.win); + if (!name) + name = strdup(""); + bd->client.icccm.icon_name = name; bd->changed = 1; }