fix restarts with windows with hideen state win hints

this fixes the previous commit
42cc4e8c16 ith retarts and windows on
other desktops
devs/bu5hm4n/pointer-fix
Carsten Haitzler 1 year ago
parent 42cc4e8c16
commit 0e0d80159e
  1. 5
      src/bin/e_atoms.c
  2. 1
      src/bin/e_atoms.h
  3. 16
      src/bin/e_hints.c

@ -14,6 +14,7 @@ E_API Ecore_X_Atom E_ATOM_WINDOW_STATE_CENTERED = 0;
E_API Ecore_X_Atom E_ATOM_DESKTOP_FILE = 0;
E_API Ecore_X_Atom E_ATOM_ZONE_GEOMETRY = 0;
E_API Ecore_X_Atom WL_SURFACE_ID = 0;
E_API Ecore_X_Atom E_ATOM_E_WAS_HERE = 0;
#endif
/* externally accessible functions */
@ -33,7 +34,8 @@ e_atoms_init(void)
"__E_ATOM_WINDOW_STATE_CENTERED",
"__E_ATOM_DESKTOP_FILE",
"E_ZONE_GEOMETRY",
"WL_SURFACE_ID"
"WL_SURFACE_ID",
"__E_ATOM_E_WAS_HERE",
};
Ecore_X_Atom atoms[EINA_C_ARRAY_LENGTH(atom_names)];
@ -50,6 +52,7 @@ e_atoms_init(void)
E_ATOM_DESKTOP_FILE = atoms[9];
E_ATOM_ZONE_GEOMETRY = atoms[10];
WL_SURFACE_ID = atoms[11];
E_ATOM_E_WAS_HERE = atoms[12];
#endif
return 1;
}

@ -25,6 +25,7 @@ extern E_API Ecore_X_Atom E_ATOM_WINDOW_STATE_CENTERED;
extern E_API Ecore_X_Atom E_ATOM_ZONE_GEOMETRY;
extern E_API Ecore_X_Atom WL_SURFACE_ID;
extern E_API Ecore_X_Atom E_ATOM_E_WAS_HERE;
EINTERN int e_atoms_init(void);
EINTERN int e_atoms_shutdown(void);

@ -1014,7 +1014,7 @@ e_hints_window_state_get(E_Client *ec)
#ifdef HAVE_WAYLAND_ONLY
(void)ec;
#else
unsigned int i, num;
unsigned int i, num, was_here = 0;
Ecore_X_Window_State *state;
if (!e_client_has_xwindow(ec)) return;
@ -1029,6 +1029,17 @@ e_hints_window_state_get(E_Client *ec)
ec->netwm.state.fullscreen = 0;
ec->netwm.state.stacking = 0;
if (ecore_x_window_prop_card32_get(e_client_util_win_get(ec),
E_ATOM_E_WAS_HERE,
&was_here, 1) != 1)
{
unsigned int val = 1;
was_here = 0;
ecore_x_window_prop_card32_set(e_client_util_win_get(ec),
E_ATOM_E_WAS_HERE,
&val, 1);
}
ecore_x_netwm_window_state_get(e_client_util_win_get(ec), &state, &num);
if (state)
{
@ -1069,7 +1080,8 @@ e_hints_window_state_get(E_Client *ec)
break;
case ECORE_X_WINDOW_STATE_HIDDEN:
ec->netwm.state.hidden = 1;
if (!was_here)
ec->netwm.state.hidden = 1;
break;
case ECORE_X_WINDOW_STATE_FULLSCREEN:

Loading…
Cancel
Save