forked from enlightenment/efl
parent
ed13e15913
commit
c106370265
|
@ -627,6 +627,9 @@ typedef enum _Ecore_X_Window_State_Hint {
|
|||
} Ecore_X_Window_State_Hint;
|
||||
|
||||
typedef enum _Ecore_X_Window_State {
|
||||
/** The window is iconified. */
|
||||
ECORE_X_WINDOW_STATE_ICONIFIED,
|
||||
|
||||
/** The window is a modal dialog box. */
|
||||
ECORE_X_WINDOW_STATE_MODAL,
|
||||
|
||||
|
|
|
@ -36,7 +36,10 @@ Atom _ecore_x_atom_wm_name = 0;
|
|||
Atom _ecore_x_atom_wm_command = 0;
|
||||
Atom _ecore_x_atom_wm_icon_name = 0;
|
||||
Atom _ecore_x_atom_wm_client_machine = 0;
|
||||
Atom _ecore_x_atom_wm_change_state = 0;
|
||||
|
||||
Atom _ecore_x_atom_motif_wm_hints = 0;
|
||||
|
||||
Atom _ecore_x_atom_win_layer = 0;
|
||||
|
||||
Atom _ecore_x_atom_selection_primary = 0;
|
||||
|
@ -362,8 +365,12 @@ ecore_x_init(const char *name)
|
|||
_ecore_x_atom_wm_command = XInternAtom(_ecore_x_disp, "WM_COMMAND", False);
|
||||
_ecore_x_atom_wm_icon_name = XInternAtom(_ecore_x_disp, "WM_ICON_NAME", False);
|
||||
_ecore_x_atom_wm_client_machine = XInternAtom(_ecore_x_disp, "WM_CLIENT_MACHINE", False);
|
||||
_ecore_x_atom_wm_change_state = XInternAtom(_ecore_x_disp, "WM_CHANGE_STATE", False);
|
||||
|
||||
_ecore_x_atom_motif_wm_hints = XInternAtom(_ecore_x_disp, "_MOTIF_WM_HINTS", False);
|
||||
|
||||
_ecore_x_atom_win_layer = XInternAtom(_ecore_x_disp, "_WIN_LAYER", False);
|
||||
|
||||
/* This is just to be anal about naming conventions */
|
||||
_ecore_x_atom_selection_primary = XA_PRIMARY;
|
||||
_ecore_x_atom_selection_secondary = XA_SECONDARY;
|
||||
|
|
|
@ -128,8 +128,12 @@ extern Atom _ecore_x_atom_wm_name;
|
|||
extern Atom _ecore_x_atom_wm_command;
|
||||
extern Atom _ecore_x_atom_wm_icon_name;
|
||||
extern Atom _ecore_x_atom_wm_client_machine;
|
||||
extern Atom _ecore_x_atom_wm_change_state;
|
||||
|
||||
extern Atom _ecore_x_atom_motif_wm_hints;
|
||||
|
||||
extern Atom _ecore_x_atom_win_layer;
|
||||
|
||||
extern Atom _ecore_x_atom_net_wm_desktop;
|
||||
extern Atom _ecore_x_atom_net_current_desktop;
|
||||
extern Atom _ecore_x_atom_net_wm_state;
|
||||
|
|
|
@ -850,10 +850,22 @@ ecore_x_window_prop_state_request(Ecore_X_Window win, Ecore_X_Window_State state
|
|||
xev.xclient.type = ClientMessage;
|
||||
xev.xclient.display = _ecore_x_disp;
|
||||
xev.xclient.window = win;
|
||||
|
||||
switch (state) {
|
||||
case ECORE_X_WINDOW_STATE_ICONIFIED:
|
||||
if (action != 1) /* Only "do iconify" makes sense */
|
||||
return;
|
||||
xev.xclient.message_type = _ecore_x_atom_wm_change_state;
|
||||
xev.xclient.format = 32;
|
||||
xev.xclient.data.l[0] = IconicState;
|
||||
break;
|
||||
default: /* The _NET_WM_STATE_... hints */
|
||||
xev.xclient.message_type = _ecore_x_atom_net_wm_state;
|
||||
xev.xclient.format = 32;
|
||||
xev.xclient.data.l[0] = action;
|
||||
xev.xclient.data.l[1] = _ecore_x_window_prop_state_atom_get(state);
|
||||
break;
|
||||
}
|
||||
|
||||
XSendEvent(_ecore_x_disp, DefaultRootWindow(_ecore_x_disp), False, 0, &xev);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue