kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=8b553d3d979557cf3c34c2029b888f7b778f2fad
commit 8b553d3d979557cf3c34c2029b888f7b778f2fad Author: Kim Woelders <k...@woelders.dk> Date: Mon Feb 14 07:15:09 2022 +0100 Remove gnome1 hint support Probably about time - obsolete and disabled by default for almost 20 years. --- configure.ac | 11 - src/Makefile.am | 3 - src/ewin-ops.c | 14 - src/gnome.c | 826 -------------------------------------------------------- src/hints.c | 48 +--- src/hints.h | 22 +- 6 files changed, 2 insertions(+), 922 deletions(-) diff --git a/configure.ac b/configure.ac index 8ecb38d0..d5cb8b6a 100644 --- a/configure.ac +++ b/configure.ac @@ -68,16 +68,6 @@ if test "x$have_clock_gettime" != xno; then fi fi -AC_ARG_ENABLE(hints-gnome, - AS_HELP_STRING([--enable-hints-gnome], - [compile with GNOME(<2.0) hints support @<:@default=no@:>@]),, - enable_hints_gnome=no) - -if test "x$enable_hints_gnome" = "xyes"; then - AC_DEFINE(ENABLE_GNOME, 1, [GNOME(<2.0) Hints]) -fi -AM_CONDITIONAL(ENABLE_GNOME, test "x$enable_hints_gnome" = "xyes") - AC_ARG_WITH(evhan, AS_HELP_STRING([--with-evhan], [select event handling api (poll/select)@<:@default=auto@:>@]),, @@ -567,7 +557,6 @@ echo " sndio ...................... $enable_sound_sndio" echo " player ..................... $enable_sound_player ($with_sound_player)" echo " Sound loader ................. $with_sndldr" fi -echo " Old GNOME hints .............. $enable_hints_gnome" echo " Session management ........... $enable_sm" echo " Zoom ......................... $enable_zoom" echo " Pango ........................ $enable_pango" diff --git a/src/Makefile.am b/src/Makefile.am index 173291f0..0dfcfe1e 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -2,9 +2,6 @@ SUBDIRS = bin_PROGRAMS = e16 -if ENABLE_GNOME -SRCS_GNOME = gnome.c -endif if ENABLE_ZOOM SRCS_ZOOM = zoom.c endif diff --git a/src/ewin-ops.c b/src/ewin-ops.c index a5fdff72..4180c073 100644 --- a/src/ewin-ops.c +++ b/src/ewin-ops.c @@ -574,10 +574,6 @@ EwinIconify(EWin * ewin) EwinIconify(e); } -#if ENABLE_GNOME - if (lst && call_depth == 1) - GNOME_SetClientList(); -#endif Efree(lst); EwinStateUpdate(ewin); @@ -669,10 +665,6 @@ EwinDeIconify1(EWin * ewin, int dx, int dy) EwinDeIconify1(e, dx, dy); } -#if ENABLE_GNOME - if (lst && call_depth == 1) - GNOME_SetClientList(); -#endif Efree(lst); EwinStateUpdate(ewin); @@ -1472,9 +1464,6 @@ EwinOpSkipLists(EWin * ewin, int source __UNUSED__, int skip) EwinStateUpdate(ewin); HintsSetWindowState(ewin); -#if ENABLE_GNOME - GNOME_SetClientList(); -#endif SnapshotEwinUpdate(ewin, SNAP_USE_SKIP_LISTS); } @@ -1486,9 +1475,6 @@ EwinOpSkipTask(EWin * ewin, int skip) EwinStateUpdate(ewin); HintsSetWindowState(ewin); -#if ENABLE_GNOME - GNOME_SetClientList(); -#endif SnapshotEwinUpdate(ewin, SNAP_USE_SKIP_LISTS); } diff --git a/src/gnome.c b/src/gnome.c deleted file mode 100644 index e5b82e36..00000000 --- a/src/gnome.c +++ /dev/null @@ -1,826 +0,0 @@ -/* - * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors - * Copyright (C) 2004-2014 Kim Woelders - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies of the Software, its documentation and marketing & publicity - * materials, and acknowledgment shall be given in the documentation, materials - * and software packages that this Software was used. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ -#include "E.h" -#include "desktops.h" -#include "ewins.h" -#include "hints.h" -#include "xprop.h" -#include "xwin.h" - -/* WIN_WM_NAME STRING - contains a string identifier for the WM's name */ -#define XA_WIN_WM_NAME "_WIN_WM_NAME" - -/* WIN_WM_NAME VERSION - contains a string identifier for the WM's version */ -#define XA_WIN_WM_VERSION "_WIN_WM_VERSION" - -/* WIN_AREA CARD32[2] contains the current desktop area X,Y */ -#define XA_WIN_AREA "_WIN_AREA" - -/* WIN_AREA CARD32[2] contains the current desktop area size WxH */ -#define XA_WIN_AREA_COUNT "_WIN_AREA_COUNT" - -/* array of atoms - atom being one of the following atoms */ -#define XA_WIN_PROTOCOLS "_WIN_PROTOCOLS" - -/* array of iocn in various sizes */ -/* Type: array of CARD32 */ -/* first item is icon count (n) */ -/* second item is icon record length (in CARD32s) */ -/* this is followed by (n) icon records as follows */ -/* pixmap (XID) */ -/* mask (XID) */ -/* width (CARD32) */ -/* height (CARD32) */ -/* depth (of pixmap, mask is assumed to be of depth 1) (CARD32) */ -/* drawable (screen root drawable of pixmap) (XID) */ -/* ... additional fields can be added at the end of this list */ -#define XA_WIN_ICONS "_WIN_ICONS" - -/* WIN_WORKSPACE CARD32 contains the current desktop number */ -#define XA_WIN_WORKSPACE "_WIN_WORKSPACE" -/* WIN_WORKSPACE_COUNT CARD32 contains the number of desktops */ -#define XA_WIN_WORKSPACE_COUNT "_WIN_WORKSPACE_COUNT" - -/* WIN_WORKSPACE_NAMES StringList (Text Property) of workspace names */ -/* unused by enlightenment */ -#define XA_WIN_WORKSPACE_NAMES "_WIN_WORKSPACE_NAMES" - -/* ********** Don't use this.. iffy at best. *********** */ -/* The available work area for client windows. The WM can set this and the WM */ -/* and/or clients may change it at any time. If it is changed the WM and/or */ -/* clients should honor the changes. If this property does not exist a client */ -/* or WM can create it. */ -/* - * CARD32 min_x; - * CARD32 min_y; - * CARD32 max_x; - * CARD32 max_y; - */ -#define XA_WIN_WORKAREA "_WIN_WORKAREA" -/* array of 4 CARD32's */ - -/* This is a list of window id's the WM is currently managing - primarily */ -/* for being able to have external "tasklist" apps */ -#define XA_WIN_CLIENT_LIST "_WIN_CLIENT_LIST" -/* array of N XID's */ - -/*********************************************************/ -/* Properties on client windows */ -/*********************************************************/ - -/* The layer the window exists in */ -/* 0 = Desktop */ -/* 1 = Below */ -/* 2 = Normal (default app layer) */ -/* 4 = OnTop */ -/* 6 = Dock (always on top - for panel) */ -/* The app sets this alone, not the WM. If this property changes the WM */ -/* should comply and change the appearance/behavior of the Client window */ -/* if this hint does not exist the WM Will create it on the Client window */ -#define WIN_LAYER_DESKTOP 0 -#define WIN_LAYER_BELOW 2 -#define WIN_LAYER_NORMAL 4 -#define WIN_LAYER_ONTOP 6 -#define WIN_LAYER_DOCK 8 -#define WIN_LAYER_ABOVE_DOCK 10 -#define WIN_LAYER_MENU 12 -#define XA_WIN_LAYER "_WIN_LAYER" -/* WIN_LAYER = CARD32 */ - -/* flags for the window's state. The WM will change these as needed when */ -/* state changes. If the property contains info on client map, E will modify */ -/* the windows state accordingly. if the Hint does not exist the WM will */ -/* create it on the client window. 0 for the bit means off, 1 means on. */ -/* unused (default) values are 0 */ - -/* removed Minimized - no explanation of what it really means - ambiguity */ -/* should not be here if not clear */ -#define WIN_STATE_STICKY (1<<0) /* everyone knows sticky */ -#define WIN_STATE_RESERVED_BIT1 (1<<1) /* removed minimize here */ -#define WIN_STATE_MAXIMIZED_VERT (1<<2) /* window in maximized V state */ -#define WIN_STATE_MAXIMIZED_HORIZ (1<<3) /* window in maximized H state */ -#define WIN_STATE_HIDDEN (1<<4) /* not on taskbar but window visible */ -#define WIN_STATE_SHADED (1<<5) /* shaded (NeXT style) */ -#define WIN_STATE_HID_WORKSPACE (1<<6) /* not on current desktop */ -#define WIN_STATE_HID_TRANSIENT (1<<7) /* owner of transient is hidden */ -#define WIN_STATE_FIXED_POSITION (1<<8) /* window is fixed in position even */ -#define WIN_STATE_ARRANGE_IGNORE (1<<9) /* ignore for auto arranging */ - /* when scrolling about large */ - /* virtual desktops ala fvwm */ -#define XA_WIN_STATE "_WIN_STATE" -/* WIN_STATE = CARD32 */ - -/* Preferences for behavior for app */ -/* ONLY the client sets this */ -#define WIN_HINTS_SKIP_FOCUS (1<<0) /* "alt-tab" skips this win */ -#define WIN_HINTS_SKIP_WINLIST (1<<1) /* not in win list */ -#define WIN_HINTS_SKIP_TASKBAR (1<<2) /* not on taskbar */ -#define WIN_HINTS_GROUP_TRANSIENT (1<<3) /* ??????? */ -#define WIN_HINTS_FOCUS_ON_CLICK (1<<4) /* app only accepts focus when clicked */ -#define WIN_HINTS_DO_NOT_COVER (1<<5) /* attempt to not cover this window */ -#define XA_WIN_HINTS "_WIN_HINTS" -/* WIN_HINTS = CARD32 */ - -/* Application state - also "color reactiveness" - the app can keep changing */ -/* this property when it changes its state and the WM or monitoring program */ -/* will pick this up and display somehting accordingly. ONLY the client sets */ -/* this. */ -#define WIN_APP_STATE_NONE 0 -#define WIN_APP_STATE_ACTIVE1 1 -#define WIN_APP_STATE_ACTIVE2 2 -#define WIN_APP_STATE_ERROR1 3 -#define WIN_APP_STATE_ERROR2 4 -#define WIN_APP_STATE_FATAL_ERROR1 5 -#define WIN_APP_STATE_FATAL_ERROR2 6 -#define WIN_APP_STATE_IDLE1 7 -#define WIN_APP_STATE_IDLE2 8 -#define WIN_APP_STATE_WAITING1 9 -#define WIN_APP_STATE_WAITING2 10 -#define WIN_APP_STATE_WORKING1 11 -#define WIN_APP_STATE_WORKING2 12 -#define WIN_APP_STATE_NEED_USER_INPUT1 13 -#define WIN_APP_STATE_NEED_USER_INPUT2 14 -#define WIN_APP_STATE_STRUGGLING1 15 -#define WIN_APP_STATE_STRUGGLING2 16 -#define WIN_APP_STATE_DISK_TRAFFIC1 17 -#define WIN_APP_STATE_DISK_TRAFFIC2 18 -#define WIN_APP_STATE_NETWORK_TRAFFIC1 19 -#define WIN_APP_STATE_NETWORK_TRAFFIC2 20 -#define WIN_APP_STATE_OVERLOADED1 21 -#define WIN_APP_STATE_OVERLOADED2 22 -#define WIN_APP_STATE_PERCENT000_1 23 -#define WIN_APP_STATE_PERCENT000_2 24 -#define WIN_APP_STATE_PERCENT010_1 25 -#define WIN_APP_STATE_PERCENT010_2 26 -#define WIN_APP_STATE_PERCENT020_1 27 -#define WIN_APP_STATE_PERCENT020_2 28 -#define WIN_APP_STATE_PERCENT030_1 29 -#define WIN_APP_STATE_PERCENT030_2 30 -#define WIN_APP_STATE_PERCENT040_1 31 -#define WIN_APP_STATE_PERCENT040_2 32 -#define WIN_APP_STATE_PERCENT050_1 33 -#define WIN_APP_STATE_PERCENT050_2 34 -#define WIN_APP_STATE_PERCENT060_1 35 -#define WIN_APP_STATE_PERCENT060_2 36 -#define WIN_APP_STATE_PERCENT070_1 37 -#define WIN_APP_STATE_PERCENT070_2 38 -#define WIN_APP_STATE_PERCENT080_1 39 -#define WIN_APP_STATE_PERCENT080_2 40 -#define WIN_APP_STATE_PERCENT090_1 41 -#define WIN_APP_STATE_PERCENT090_2 42 -#define WIN_APP_STATE_PERCENT100_1 43 -#define WIN_APP_STATE_PERCENT100_2 44 -#define XA_WIN_APP_STATE "_WIN_APP_STATE" -/* WIN_APP_STATE = CARD32 */ - -/* Expanded space occupied - this is the area on screen the app's window */ -/* will occupy when "expanded" - ie if you have a button on an app that */ -/* "hides" it by reducing its size, this is the geometry of the expanded */ -/* window - so the window manager can allow for this when doign auto */ -/* positioing of client windows assuming the app can at any point use this */ -/* this area and thus try and keep it clear. ONLY the client sets this */ -/* - * CARD32 x; - * CARD32 y; - * CARD32 width; - * CARD32 height; - */ -#define XA_WIN_EXPANDED_SIZE "_WIN_EXPANDED_SIZE" -/* array of 4 CARD32's */ - -/* CARD32 that contians the desktop number the application is on If the */ -/* application's state is "sticky" it is irrelevant. Only the WM should */ -/* change this. */ -#define XA_WIN_WORKSPACE "_WIN_WORKSPACE" - -/* This atom is a 32-bit integer that is either 0 or 1 (currently). */ -/* 0 denotes everything is as per usual but 1 denotes that ALL configure */ -/* requests by the client on the client window with this property are */ -/* not just a simple "moving" of the window, but the result of a user */ -/* moving the window BUT the client handling that interaction by moving */ -/* its own window. The window manager should respond accordingly by assuming */ -/* any configure requests for this window whilst this atom is "active" in */ -/* the "1" state are a client move and should handle flipping desktops if */ -/* the window is being dragged "off screem" or across desktop boundaries */ -/* etc. This atom is ONLY ever set by the client */ -#define XA_WIN_CLIENT_MOVING "_WIN_CLIENT_MOVING" -/* WIN_CLIENT_MOVING = CARD32 */ - -/* Designed for checking if the WIN_ supporting WM is still there */ -/* and kicking about - basically check this property - check the window */ -/* ID it points to - then check that window Id has this property too */ -/* if that is the case the WIN_ supporting WM is there and alive and the */ -/* list of WIN_PROTOCOLS is valid */ -#define XA_WIN_SUPPORTING_WM_CHECK "_WIN_SUPPORTING_WM_CHECK" -/* CARD32 */ - -/*********************************************************/ -/* How an app can modify things after mapping */ -/*********************************************************/ - -/* For a client to change layer or state it should send a client message */ -/* to the root window as follows: */ -/* - * Display *disp; - * Window root, client_window; - * XClientMessageEvent xev; - * CARD32 new_layer; - * - * xev.type = ClientMessage; - * xev.window = client_window; - * xev.message_type = ex_atom_get(XA_WIN_LAYER); - * xev.format = 32; - * xev.data.l[0] = new_layer; - * xev.data.l[1] = CurrentTime; - * XSendEvent(disp, root, False, SubstructureNotifyMask, (XEvent *) &xev); - */ -/* - * Display *disp; - * Window root, client_window; - * XClientMessageEvent xev; - * CARD32 mask_of_members_to_change, new_members; - * - * xev.type = ClientMessage; - * xev.window = client_window; - * xev.message_type = ex_atom_get(XA_WIN_STATE); - * xev.format = 32; - * xev.data.l[0] = mask_of_members_to_change; - * xev.data.l[1] = new_members; - * xev.data.l[2] = CurrentTimep; - * XSendEvent(disp, root, False, SubstructureNotifyMask, (XEvent *) &xev); - */ -/* - * Display *disp; - * Window root, client_window; - * XClientMessageEvent xev; - * CARD32 new_desktop_number; - * - * xev.type = ClientMessage; - * xev.window = client_window; - * xev.message_type = ex_atom_get(XA_WIN_WORKSPACE); - * xev.format = 32; - * xev.data.l[0] = new_desktop_number; - * xev.data.l[2] = CurrentTimep; - * XSendEvent(disp, root, False, SubstructureNotifyMask, (XEvent *) &xev); - */ - -#if 0 /* Does nothing useful */ -static void -GNOME_GetHintIcons(EWin * ewin, EX_Atom atom_change) -{ - static EX_Atom atom_get = 0; - int num, i; - EX_ID *plst; - EX_Pixmap pmap; - EX_Pixmap mask; - - if (EwinIsInternal(ewin)) - return; - - if (!atom_get) - atom_get = ex_atom_get(XA_WIN_ICONS); - if ((atom_change) && (atom_change != atom_get)) - return; - - num = ex_window_prop_xid_list_get(EwinGetClientXwin(ewin), atom_get, - XA_PIXMAP, &plst); - if (num < 2) - return; - - for (i = 0; i < num / 2; i++) - { - pmap = plst[2 * i]; - mask = plst[2 * i + 1]; - } - free(plst); -} -#endif - -static void -GNOME_GetHintLayer(EWin * ewin, EX_Atom atom_change) -{ - static EX_Atom atom_get = 0; - int num; - unsigned int layer; - - if (EwinIsInternal(ewin)) - return; - - if (!atom_get) - atom_get = ex_atom_get(XA_WIN_LAYER); - if ((atom_change) && (atom_change != atom_get)) - return; - - num = ex_window_prop_card32_get(EwinGetClientXwin(ewin), atom_get, - &layer, 1); - if (num <= 0) - return; - - EoSetLayer(ewin, layer); - EwinChange(ewin, EWIN_CHANGE_LAYER); -} - -static void -GNOME_GetHintState(EWin * ewin, EX_Atom atom_change) -{ - static EX_Atom atom_get = 0; - int num; - unsigned int flags; - - if (EwinIsInternal(ewin)) - return; - - if (!atom_get) - atom_get = ex_atom_get(XA_WIN_STATE); - if ((atom_change) && (atom_change != atom_get)) - return; - - num = ex_window_prop_card32_get(EwinGetClientXwin(ewin), atom_get, - &flags, 1); - if (num <= 0) - return; - - if (flags & WIN_STATE_SHADED) - ewin->state.shaded = 1; - if (flags & WIN_STATE_STICKY) - EoSetSticky(ewin, 1); - if (flags & WIN_STATE_FIXED_POSITION) - EwinInhSetUser(ewin, move, 1); - if (flags & WIN_STATE_ARRANGE_IGNORE) - ewin->props.ignorearrange = 1; -} - -#if 0 /* Does nothing */ -static void -GNOME_GetHintAppState(EWin * ewin, EX_Atom atom_change) -{ - static EX_Atom atom_get = 0; - int num; - unsigned int flags; - - /* have nothing interesting to do with an app state (lamp) right now */ - - if (EwinIsInternal(ewin)) - return; - - if (!atom_get) - atom_get = ex_atom_get(XA_WIN_APP_STATE); - if ((atom_change) && (atom_change != atom_get)) - return; - - num = ex_window_prop_card32_get(EwinGetClientXwin(ewin), atom_get, - &flags, 1); - if (num <= 0) - return; -} -#endif - -static void -GNOME_GetHintDesktop(EWin * ewin, EX_Atom atom_change) -{ - static EX_Atom atom_get = 0; - int num; - unsigned int desk; - - if (EwinIsInternal(ewin)) - return; - - if (!atom_get) - atom_get = ex_atom_get(XA_WIN_WORKSPACE); - if ((atom_change) && (atom_change != atom_get)) - return; - - num = ex_window_prop_card32_get(EwinGetClientXwin(ewin), atom_get, &desk, 1); - if (num <= 0) - return; - - EoSetDesk(ewin, DeskGet(desk)); - EwinChange(ewin, EWIN_CHANGE_DESKTOP); -} - -static void -GNOME_GetHint(EWin * ewin, EX_Atom atom_change) -{ - static EX_Atom atom_get = 0; - int num; - unsigned int flags; - - if (EwinIsInternal(ewin)) - return; - - if (!atom_get) - atom_get = ex_atom_get(XA_WIN_HINTS); - if ((atom_change) && (atom_change != atom_get)) - return; - - num = ex_window_prop_card32_get(EwinGetClientXwin(ewin), atom_get, - &flags, 1); - if (num <= 0) - return; - - if (flags & WIN_HINTS_SKIP_TASKBAR) - ewin->props.skip_ext_task = 1; - if (flags & WIN_HINTS_SKIP_FOCUS) - ewin->props.skip_focuslist = 1; - if (flags & WIN_HINTS_SKIP_WINLIST) - ewin->props.skip_winlist = 1; - if (flags & WIN_HINTS_FOCUS_ON_CLICK) - ewin->props.focusclick = 1; - if (flags & WIN_HINTS_DO_NOT_COVER) - ewin->props.never_use_area = 1; -} - -void -GNOME_SetHint(const EWin * ewin) -{ - static EX_Atom atom_set = 0; - unsigned int val; - - if ((ewin->type == EWIN_TYPE_MENU) || (ewin->type == EWIN_TYPE_PAGER)) - return; - if (!atom_set) - atom_set = ex_atom_get(XA_WIN_STATE); - val = 0; - if (EoIsSticky(ewin)) - val |= WIN_STATE_STICKY; - if (ewin->state.shaded) - val |= WIN_STATE_SHADED; - if (EwinInhGetUser(ewin, move)) - val |= WIN_STATE_FIXED_POSITION; - ex_window_prop_card32_set(EwinGetClientXwin(ewin), atom_set, &val, 1); -} - -void -GNOME_SetEwinArea(const EWin * ewin) -{ - static EX_Atom atom_set = 0; - unsigned int val[2]; - - if ((ewin->type == EWIN_TYPE_MENU) || (ewin->type == EWIN_TYPE_PAGER)) - return; - if (!atom_set) - atom_set = ex_atom_get(XA_WIN_AREA); - val[0] = ewin->area_x; - val[1] = ewin->area_y; - ex_window_prop_card32_set(EwinGetClientXwin(ewin), atom_set, val, 2); -} - -void -GNOME_SetEwinDesk(const EWin * ewin) -{ - static EX_Atom atom_set = 0; - unsigned int val; - - if ((ewin->type == EWIN_TYPE_MENU) || (ewin->type == EWIN_TYPE_PAGER)) - return; - if (!atom_set) - atom_set = ex_atom_get(XA_WIN_WORKSPACE); - val = EoGetDeskNum(ewin); - ex_window_prop_card32_set(EwinGetClientXwin(ewin), atom_set, &val, 1); -} - -#if 0 /* Does nothing */ -static void -GNOME_GetExpandedSize(EWin * ewin, EX_Atom atom_change) -{ - static EX_Atom atom_get = 0; - int num; - unsigned int exp[4]; - - if (EwinIsInternal(ewin)) - return; - - if (!atom_get) - atom_get = ex_atom_get(XA_WIN_EXPANDED_SIZE); - if ((atom_change) && (atom_change != atom_get)) - return; - - num = ex_window_prop_card32_get(EwinGetClientXwin(ewin), atom_get, exp, 4); - if (num >= 4) - { -#if 0 /* Not actually used */ - ewin->expanded_x = retval[0]; - ewin->expanded_y = retval[1]; - ewin->expanded_width = retval[2]; - ewin->expanded_height = retval[3]; -#endif - } -} -#endif - -static void -GNOME_SetUsedHints(void) -{ - static EX_Atom atom_set = 0; - EX_Atom list[10]; - - if (!atom_set) - atom_set = ex_atom_get(XA_WIN_PROTOCOLS); - list[0] = ex_atom_get(XA_WIN_LAYER); - list[1] = ex_atom_get(XA_WIN_STATE); - list[2] = ex_atom_get(XA_WIN_HINTS); - list[3] = ex_atom_get(XA_WIN_APP_STATE); - list[4] = ex_atom_get(XA_WIN_EXPANDED_SIZE); - list[5] = ex_atom_get(XA_WIN_ICONS); - list[6] = ex_atom_get(XA_WIN_WORKSPACE); - list[7] = ex_atom_get(XA_WIN_WORKSPACE_COUNT); - list[8] = ex_atom_get(XA_WIN_WORKSPACE_NAMES); - list[9] = ex_atom_get(XA_WIN_CLIENT_LIST); - ex_window_prop_atom_set(WinGetXwin(VROOT), atom_set, list, 10); -} - -void -GNOME_SetCurrentArea(void) -{ - static EX_Atom atom_set = 0; - unsigned int val[2]; - int ax, ay; - - if (!atom_set) - atom_set = ex_atom_get(XA_WIN_AREA); - DeskCurrentGetArea(&ax, &ay); - val[0] = ax; - val[1] = ay; - ex_window_prop_card32_set(WinGetXwin(VROOT), atom_set, val, 2); -} - -void -GNOME_SetCurrentDesk(void) -{ - static EX_Atom atom_set = 0; - unsigned int val; - - if (!atom_set) - atom_set = ex_atom_get(XA_WIN_WORKSPACE); - val = DesksGetCurrentNum(); - ex_window_prop_card32_set(WinGetXwin(VROOT), atom_set, &val, 1); -} - -static void -GNOME_SetWMCheck(EX_Window win_wm_check) -{ - static EX_Atom atom_set = 0; - unsigned int val; - - if (!atom_set) - atom_set = ex_atom_get(XA_WIN_SUPPORTING_WM_CHECK); - val = win_wm_check; - ex_window_prop_card32_set(WinGetXwin(VROOT), atom_set, &val, 1); - ex_window_prop_card32_set(win_wm_check, atom_set, &val, 1); -} - -void -GNOME_SetDeskCount(void) -{ - static EX_Atom atom_set = 0; - unsigned int val; - - if (!atom_set) - atom_set = ex_atom_get(XA_WIN_WORKSPACE_COUNT); - val = DesksGetNumber(); - ex_window_prop_card32_set(WinGetXwin(VROOT), atom_set, &val, 1); -} - -void -GNOME_SetAreaCount(void) -{ - static EX_Atom atom_set = 0; - int ax, ay; - unsigned int val[2]; - - if (!atom_set) - atom_set = ex_atom_get(XA_WIN_AREA_COUNT); - DesksGetAreaSize(&ax, &ay); - val[0] = ax; - val[1] = ay; - ex_window_prop_card32_set(WinGetXwin(VROOT), atom_set, val, 2); -} - -void -GNOME_SetDeskNames(void) -{ - static EX_Atom atom_set = 0; - char s[1024], **names; - int i, n_desks; - - if (!atom_set) - atom_set = ex_atom_get(XA_WIN_WORKSPACE_NAMES); - - n_desks = DesksGetNumber(); - names = EMALLOC(char *, n_desks); - - if (!names) - return; - - for (i = 0; i < n_desks; i++) - { - Esnprintf(s, sizeof(s), "%i", i); - names[i] = Estrdup(s); - } - - ex_window_prop_string_list_set(WinGetXwin(VROOT), atom_set, names, n_desks); - - for (i = 0; i < n_desks; i++) - Efree(names[i]); - Efree(names); -} - -void -GNOME_SetClientList(void) -{ - static EX_Atom atom_set = 0; - unsigned int *wl; - int j, i, num; - EWin *const *lst; - - if (!atom_set) - atom_set = ex_atom_get(XA_WIN_CLIENT_LIST); - - lst = EwinListOrderGet(&num); - wl = NULL; - j = 0; - if (lst) - { - wl = EMALLOC(unsigned int, num); - - for (i = 0; i < num; i++) - { - if (!lst[i]->props.skip_ext_task && !EwinIsTransientChild(lst[i])) - wl[j++] = EwinGetClientXwin(lst[i]); - } - } - ex_window_prop_card32_set(WinGetXwin(VROOT), atom_set, wl, j); - Efree(wl); -} - -static void -GNOME_SetWMNameVer(void) -{ - static EX_Atom atom_set = 0, atom_set2 = 0; - - if (!atom_set) - atom_set = ex_atom_get(XA_WIN_WM_NAME); - ex_window_prop_string_set(WinGetXwin(VROOT), atom_set, e_wm_name); - - if (!atom_set2) - atom_set2 = ex_atom_get(XA_WIN_WM_VERSION); - ex_window_prop_string_set(WinGetXwin(VROOT), atom_set2, e_wm_version); -} - -void -GNOME_DelHints(const EWin * ewin) -{ - static EX_Atom atom_get[6] = { 0, 0, 0, 0, 0, 0 }; - EX_Window win; - - if (!atom_get[0]) - { - atom_get[0] = ex_atom_get(XA_WIN_WORKSPACE); - atom_get[1] = ex_atom_get(XA_WIN_LAYER); - atom_get[2] = ex_atom_get(XA_WIN_STATE); - atom_get[3] = ex_atom_get(XA_WIN_HINTS); - atom_get[4] = ex_atom_get(XA_WIN_APP_STATE); - atom_get[5] = ex_atom_get(XA_WIN_AREA); - } - - win = EwinGetClientXwin(ewin); - XDeleteProperty(disp, win, atom_get[0]); - XDeleteProperty(disp, win, atom_get[1]); - XDeleteProperty(disp, win, atom_get[2]); - XDeleteProperty(disp, win, atom_get[3]); - XDeleteProperty(disp, win, atom_get[4]); - XDeleteProperty(disp, win, atom_get[5]); -} - -void -GNOME_GetHints(EWin * ewin, EX_Atom atom_change) -{ - GNOME_GetHintDesktop(ewin, atom_change); - GNOME_GetHintLayer(ewin, atom_change); - GNOME_GetHintState(ewin, atom_change); - GNOME_GetHint(ewin, atom_change); -#if 0 /* Do nothing */ - GNOME_GetHintIcons(ewin, atom_change); - GNOME_GetHintAppState(ewin, atom_change); - GNOME_GetExpandedSize(ewin, atom_change); -#endif -} - -void -GNOME_SetHints(EX_Window win_wm_check) -{ - GNOME_SetWMNameVer(); - GNOME_SetUsedHints(); - GNOME_SetWMCheck(win_wm_check); - { - EX_Atom atom_set; - unsigned int val; - - atom_set = ex_atom_get("_WIN_DESKTOP_BUTTON_PROXY"); - Mode.button_proxy_win = - XCreateSimpleWindow(disp, WinGetXwin(VROOT), -80, -80, 24, 24, 0, - 0, 0); - val = Mode.button_proxy_win; - ex_window_prop_card32_set(WinGetXwin(VROOT), atom_set, &val, 1); - ex_window_prop_card32_set(Mode.button_proxy_win, atom_set, &val, 1); - } -} - -int -GNOME_ProcessClientClientMessage(EWin * ewin, XClientMessageEvent * event) -{ - static EX_Atom a4 = 0, a5 = 0; - - if (!a4) - a4 = ex_atom_get("_WIN_LAYER"); - if (!a5) - a5 = ex_atom_get("_WIN_STATE"); - - if (event->message_type == a4) - { - unsigned int val; - - val = event->data.l[0]; - EoSetLayer(ewin, val); - ex_window_prop_card32_set(EwinGetClientXwin(ewin), a4, &val, 1); - EwinRaise(ewin); - return 1; - } - if (event->message_type == a5) - { - if (event->data.l[0] & WIN_STATE_FIXED_POSITION) - { - if (event->data.l[1] & WIN_STATE_FIXED_POSITION) - EwinInhSetUser(ewin, move, 1); - else - EwinInhSetUser(ewin, move, 0); - } - if (event->data.l[0] & WIN_STATE_ARRANGE_IGNORE) - { - if (event->data.l[1] & WIN_STATE_ARRANGE_IGNORE) - ewin->props.ignorearrange = 1; - else - ewin->props.ignorearrange = 0; - } - if ((event->data.l[0] & WIN_STATE_STICKY) - && (!ewin->props.ignorearrange)) - { - EwinOpStick(ewin, OPSRC_USER, - (event->data.l[1] & WIN_STATE_STICKY) != 0); - } - if (event->data.l[0] & WIN_STATE_SHADED) - { - EwinOpShade(ewin, OPSRC_USER, - (event->data.l[1] & WIN_STATE_SHADED) != 0); - } - HintsSetWindowState(ewin); - return 1; - } - - return 0; -} - -int -GNOME_ProcessRootClientMessage(XClientMessageEvent * event) -{ - static EX_Atom a2 = 0, a3 = 0; - - if (!a2) - a2 = ex_atom_get("_WIN_AREA"); - if (!a3) - a3 = ex_atom_get("_WIN_WORKSPACE"); - - if (event->message_type == a2) - { - DeskCurrentGotoArea(event->data.l[0], event->data.l[1]); - return 1; - } - if (event->message_type == a3) - { - DeskGotoNum(event->data.l[0]); - return 1; - } - - return 0; -} diff --git a/src/hints.c b/src/hints.c index 93dc5402..cdc557a3 100644 --- a/src/hints.c +++ b/src/hints.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2021 Kim Woelders + * Copyright (C) 2003-2022 Kim Woelders * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -53,9 +53,6 @@ HintsInit(void) ex_atoms_init(); ICCCM_Init(); MWM_SetInfo(); -#if ENABLE_GNOME - GNOME_SetHints(win); -#endif EWMH_Init(win); ex_window_prop_string_set(WinGetXwin(VROOT), ea_m.ENLIGHTENMENT_VERSION, @@ -84,9 +81,6 @@ HintsSetRootHints(Win win __UNUSED__) void HintsSetClientList(void) { -#if ENABLE_GNOME - GNOME_SetClientList(); -#endif EWMH_SetClientList(); EWMH_SetClientStacking(); } @@ -100,10 +94,6 @@ HintsSetClientStacking(void) void HintsSetDesktopConfig(void) { -#if ENABLE_GNOME - GNOME_SetDeskCount(); - GNOME_SetDeskNames(); -#endif EWMH_SetDesktopCount(); EWMH_SetDesktopRoots(); EWMH_SetDesktopNames(); @@ -113,18 +103,12 @@ HintsSetDesktopConfig(void) void HintsSetViewportConfig(void) { -#if ENABLE_GNOME - GNOME_SetAreaCount(); -#endif EWMH_SetDesktopSize(); } void HintsSetCurrentDesktop(void) { -#if ENABLE_GNOME - GNOME_SetCurrentDesk(); -#endif EWMH_SetCurrentDesktop(); EHintsSetDeskInfo(); } @@ -132,9 +116,6 @@ HintsSetCurrentDesktop(void) void HintsSetDesktopViewport(void) { -#if ENABLE_GNOME - GNOME_SetCurrentArea(); -#endif EWMH_SetDesktopViewport(); EHintsSetAreaInfo(); } @@ -170,26 +151,17 @@ HintsSetWindowClass(Win win, const char *name, const char *clss) void HintsSetWindowDesktop(const EWin * ewin) { -#if ENABLE_GNOME - GNOME_SetEwinDesk(ewin); -#endif EWMH_SetWindowDesktop(ewin); } void HintsSetWindowArea(const EWin * ewin __UNUSED__) { -#if ENABLE_GNOME - GNOME_SetEwinArea(ewin); -#endif } void HintsSetWindowState(const EWin * ewin) { -#if ENABLE_GNOME - GNOME_SetHint(ewin); -#endif EWMH_SetWindowState(ewin); EWMH_SetWindowActions(ewin); } @@ -213,9 +185,6 @@ HintsSetWindowBorder(const EWin * ewin) void HintsGetWindowHints(EWin * ewin) { -#if ENABLE_GNOME - GNOME_GetHints(ewin, 0); -#endif EWMH_GetWindowHints(ewin); } @@ -226,9 +195,6 @@ HintsGetWindowHints(EWin * ewin) void HintsDelWindowHints(const EWin * ewin) { -#if ENABLE_GNOME - GNOME_DelHints(ewin); -#endif EWMH_DelWindowHints(ewin); } @@ -243,10 +209,6 @@ HintsProcessPropertyChange(EWin * ewin, XEvent * ev) return; if (EWMH_ProcessPropertyChange(ewin, ev->xproperty.atom)) return; -#if 0 /* No! - ENABLE_GNOME */ - if (GNOME_GetHints(ewin, ev->xproperty.atom)) - return; -#endif #if 0 if (EDebug(1)) { @@ -263,10 +225,6 @@ HintsProcessClientClientMessage(EWin * ewin, XClientMessageEvent * event) return; if (EWMH_ProcessClientClientMessage(ewin, event)) return; -#if ENABLE_GNOME - if (GNOME_ProcessClientClientMessage(ewin, event)) - return; -#endif if (EDebug(1)) { Eprintf("%s:\n", __func__); @@ -281,10 +239,6 @@ HintsProcessRootClientMessage(XClientMessageEvent * event) return; if (EWMH_ProcessRootClientMessage(event)) return; -#if ENABLE_GNOME - if (GNOME_ProcessRootClientMessage(event)) - return; -#endif if (EDebug(1)) { Eprintf("%s:\n", __func__); diff --git a/src/hints.h b/src/hints.h index 0c5b5b24..5b7f5621 100644 --- a/src/hints.h +++ b/src/hints.h @@ -1,6 +1,6 @@ /* * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors - * Copyright (C) 2004-2021 Kim Woelders + * Copyright (C) 2004-2022 Kim Woelders * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -55,26 +55,6 @@ int EWMH_ProcessClientClientMessage(EWin * ewin, event); int EWMH_ProcessRootClientMessage(XClientMessageEvent * event); -#if ENABLE_GNOME -/* gnome.c */ -void GNOME_SetCurrentDesk(void); -void GNOME_SetDeskCount(void); -void GNOME_SetDeskNames(void); -void GNOME_SetClientList(void); -void GNOME_SetEwinDesk(const EWin * ewin); -void GNOME_SetEwinArea(const EWin * ewin); -void GNOME_SetHint(const EWin * ewin); -void GNOME_SetCurrentArea(void); -void GNOME_SetAreaCount(void); -void GNOME_GetHints(EWin * ewin, EX_Atom atom_change); -void GNOME_DelHints(const EWin * ewin); -void GNOME_SetHints(EX_Window win_wm_check); -int GNOME_ProcessClientClientMessage(EWin * ewin, - XClientMessageEvent * - event); -int GNOME_ProcessRootClientMessage(XClientMessageEvent * event); -#endif - /* hints.c */ void HintsInit(void); void HintsSetDesktopConfig(void); --