forked from enlightenment/efl
borderless hint mwm stuff PROPERLY done...
SVN revision: 12256
This commit is contained in:
parent
feb5571092
commit
80875741e7
|
@ -995,6 +995,44 @@ EAPI int ecore_x_client_message8_send(Ecore_X_Window win, Ecore_X_A
|
||||||
ecore_x_icccm_title_set(Ecore_X_Window win, const char *t);
|
ecore_x_icccm_title_set(Ecore_X_Window win, const char *t);
|
||||||
EAPI char *
|
EAPI char *
|
||||||
ecore_x_icccm_title_get(Ecore_X_Window win);
|
ecore_x_icccm_title_get(Ecore_X_Window win);
|
||||||
|
|
||||||
|
typedef enum _Ecore_X_MWM_Hint_Func
|
||||||
|
{
|
||||||
|
ECORE_X_MWM_HINT_FUNC_ALL = (1 << 0),
|
||||||
|
ECORE_X_MWM_HINT_FUNC_RESIZE = (1 << 1),
|
||||||
|
ECORE_X_MWM_HINT_FUNC_MOVE = (1 << 2),
|
||||||
|
ECORE_X_MWM_HINT_FUNC_MINIMIZE = (1 << 3),
|
||||||
|
ECORE_X_MWM_HINT_FUNC_MAXIMIZE = (1 << 4),
|
||||||
|
ECORE_X_MWM_HINT_FUNC_CLOSE = (1 << 5)
|
||||||
|
}
|
||||||
|
Ecore_X_MWM_Hint_Func;
|
||||||
|
|
||||||
|
typedef enum _Ecore_X_MWM_Hint_Decor
|
||||||
|
{
|
||||||
|
ECORE_X_MWM_HINT_DECOR_ALL = (1 << 0),
|
||||||
|
ECORE_X_MWM_HINT_DECOR_BORDER = (1 << 1),
|
||||||
|
ECORE_X_MWM_HINT_DECOR_RESIZEH = (1 << 2),
|
||||||
|
ECORE_X_MWM_HINT_DECOR_TITLE = (1 << 3),
|
||||||
|
ECORE_X_MWM_HINT_DECOR_MENU = (1 << 4),
|
||||||
|
ECORE_X_MWM_HINT_DECOR_MINIMIZE = (1 << 5),
|
||||||
|
ECORE_X_MWM_HINT_DECOR_MAXIMIZE = (1 << 6)
|
||||||
|
}
|
||||||
|
Ecore_X_MWM_Hint_Decor;
|
||||||
|
|
||||||
|
typedef enum _Ecore_X_MWM_Hint_Input
|
||||||
|
{
|
||||||
|
ECORE_X_MWM_HINT_INPUT_MODELESS = 0,
|
||||||
|
ECORE_X_MWM_HINT_INPUT_PRIMARY_APPLICATION_MODAL = 1,
|
||||||
|
ECORE_X_MWM_HINT_INPUT_SYSTEM_MODAL = 2,
|
||||||
|
ECORE_X_MWM_HINT_INPUT_FULL_APPLICATION_MODAL = 3,
|
||||||
|
}
|
||||||
|
Ecore_X_MWM_Hint_Input;
|
||||||
|
|
||||||
|
EAPI int
|
||||||
|
ecore_x_mwm_hints_get(Ecore_X_Window win,
|
||||||
|
Ecore_X_MWM_Hint_Func *fhint,
|
||||||
|
Ecore_X_MWM_Hint_Decor *dhint,
|
||||||
|
Ecore_X_MWM_Hint_Input *ihint);
|
||||||
|
|
||||||
EAPI void ecore_x_netwm_init(void);
|
EAPI void ecore_x_netwm_init(void);
|
||||||
EAPI void ecore_x_netwm_wm_identify(Ecore_X_Window root, Ecore_X_Window check, const char *wm_name);
|
EAPI void ecore_x_netwm_wm_identify(Ecore_X_Window root, Ecore_X_Window check, const char *wm_name);
|
||||||
|
|
|
@ -28,6 +28,7 @@ ecore_x_error.c \
|
||||||
ecore_x_events.c \
|
ecore_x_events.c \
|
||||||
ecore_x_icccm.c \
|
ecore_x_icccm.c \
|
||||||
ecore_x_netwm.c \
|
ecore_x_netwm.c \
|
||||||
|
ecore_x_mwm.c \
|
||||||
ecore_x_selection.c \
|
ecore_x_selection.c \
|
||||||
ecore_x_window.c \
|
ecore_x_window.c \
|
||||||
ecore_x_window_prop.c \
|
ecore_x_window_prop.c \
|
||||||
|
|
|
@ -0,0 +1,74 @@
|
||||||
|
/*
|
||||||
|
* Various ICCCM related functions.
|
||||||
|
*
|
||||||
|
* This is ALL the code involving anything ICCCM related. for both WM and
|
||||||
|
* client.
|
||||||
|
*/
|
||||||
|
#include "Ecore.h"
|
||||||
|
#include "ecore_x_private.h"
|
||||||
|
#include "Ecore_X.h"
|
||||||
|
|
||||||
|
#define ECORE_X_MWM_HINTS_FUNCTIONS (1 << 0)
|
||||||
|
#define ECORE_X_MWM_HINTS_DECORATIONS (1 << 1)
|
||||||
|
#define ECORE_X_MWM_HINTS_INPUT_MODE (1 << 2)
|
||||||
|
#define ECORE_X_MWM_HINTS_STATUS (1 << 3)
|
||||||
|
|
||||||
|
typedef struct _mwmhints
|
||||||
|
{
|
||||||
|
CARD32 flags;
|
||||||
|
CARD32 functions;
|
||||||
|
CARD32 decorations;
|
||||||
|
INT32 inputmode;
|
||||||
|
CARD32 status;
|
||||||
|
}
|
||||||
|
MWMHints;
|
||||||
|
|
||||||
|
int
|
||||||
|
ecore_x_mwm_hints_get(Ecore_X_Window win,
|
||||||
|
Ecore_X_MWM_Hint_Func *fhint,
|
||||||
|
Ecore_X_MWM_Hint_Decor *dhint,
|
||||||
|
Ecore_X_MWM_Hint_Input *ihint)
|
||||||
|
{
|
||||||
|
unsigned char *p = NULL;
|
||||||
|
MWMHints *mwmhints = NULL;
|
||||||
|
int num;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
ret = 0;
|
||||||
|
if (!ecore_x_window_prop_property_get(win,
|
||||||
|
_ecore_x_atom_motif_wm_hints,
|
||||||
|
_ecore_x_atom_motif_wm_hints,
|
||||||
|
32, &p, &num))
|
||||||
|
return 0;
|
||||||
|
mwmhints = (MWMHints *)p;
|
||||||
|
if (mwmhints)
|
||||||
|
{
|
||||||
|
if (num >= 4)
|
||||||
|
{
|
||||||
|
if (dhint)
|
||||||
|
{
|
||||||
|
if (mwmhints->flags & ECORE_X_MWM_HINTS_DECORATIONS)
|
||||||
|
*dhint = mwmhints->decorations;
|
||||||
|
else
|
||||||
|
*dhint = ECORE_X_MWM_HINT_DECOR_ALL;
|
||||||
|
}
|
||||||
|
if (fhint)
|
||||||
|
{
|
||||||
|
if (mwmhints->flags & ECORE_X_MWM_HINTS_FUNCTIONS)
|
||||||
|
*fhint = mwmhints->functions;
|
||||||
|
else
|
||||||
|
*fhint = ECORE_X_MWM_HINT_FUNC_ALL;
|
||||||
|
}
|
||||||
|
if (ihint)
|
||||||
|
{
|
||||||
|
if (mwmhints->flags & ECORE_X_MWM_HINTS_INPUT_MODE)
|
||||||
|
*ihint = mwmhints->inputmode;
|
||||||
|
else
|
||||||
|
*ihint = ECORE_X_MWM_HINT_INPUT_MODELESS;
|
||||||
|
}
|
||||||
|
ret = 1;
|
||||||
|
}
|
||||||
|
free(mwmhints);
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
|
@ -824,9 +824,9 @@ ecore_x_window_prop_borderless_set(Ecore_X_Window win, int borderless)
|
||||||
data[2] = !borderless;
|
data[2] = !borderless;
|
||||||
|
|
||||||
ecore_x_window_prop_property_set(win,
|
ecore_x_window_prop_property_set(win,
|
||||||
_ecore_x_atom_motif_wm_hints,
|
_ecore_x_atom_motif_wm_hints,
|
||||||
_ecore_x_atom_motif_wm_hints,
|
_ecore_x_atom_motif_wm_hints,
|
||||||
32, (void *)data, 5);
|
32, (void *)data, 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue