implemented ecore_x_window_prop_borderless_get()

SVN revision: 11506
This commit is contained in:
tsauerbeck 2004-09-02 18:45:31 +00:00 committed by tsauerbeck
parent 88b64b0631
commit 2b638f5c48
2 changed files with 27 additions and 0 deletions

View File

@ -820,6 +820,7 @@ void ecore_x_window_prop_base_size_set(Ecore_X_Window win, int w, in
void ecore_x_window_prop_step_size_set(Ecore_X_Window win, int x, int y);
void ecore_x_window_prop_xy_set(Ecore_X_Window win, int x, int y);
void ecore_x_window_prop_borderless_set(Ecore_X_Window win, int borderless);
int ecore_x_window_prop_borderless_get(Ecore_X_Window win);
int ecore_x_window_prop_layer_set(Ecore_X_Window win, int layer);
void ecore_x_window_prop_withdrawn_set(Ecore_X_Window win, int withdrawn);
void ecore_x_window_prop_desktop_request(Ecore_X_Window win, long desktop);

View File

@ -1,3 +1,7 @@
/*
* vim:ts=8:sw=3:sts=3:noexpandtab
*/
#include "Ecore.h"
#include "ecore_x_private.h"
#include "Ecore_X.h"
@ -784,6 +788,28 @@ ecore_x_window_prop_borderless_set(Ecore_X_Window win, int borderless)
32, (void *)data, 5);
}
/**
* To be documented.
*
* FIXME: To be fixed.
*/
int
ecore_x_window_prop_borderless_get(Ecore_X_Window win)
{
unsigned char *data;
int num;
ecore_x_window_prop_property_get(win,
_ecore_x_atom_motif_wm_hints,
_ecore_x_atom_motif_wm_hints,
32, &data, &num);
/* check for valid data. only read the borderless flag if the
* decorations data has been set.
*/
return (data && num > 2 && data[0] & 2) ? !data[2] : 0;
}
/**
* Puts @a win in the desired layer. This currently works with
* windowmanagers that are Gnome-compliant or support NetWM.