Implement WM hints spec (bug 50079)



I read the WM spec at www.freedesktop.org to see what hints would be
appropriate for gdb to support (that are not already supported).

Bascially I think _NET_WM_WINDOW_TYPE, _NET_WM_STATE, _NET_WM_ICON and
_NET_WM_ICON_NAME are the only currently unsupported hints that are of
general interest.

Here is the proposed Gdk API:

typedef enum
{
 GDK_WINDOW_TYPE_HINT_NORMAL,
 GDK_WINDOW_TYPE_HINT_DIALOG,
 GDK_WINDOW_TYPE_HINT_MENU,
 GDK_WINDOW_TYPE_HINT_TOOLBAR,
 GDK_WINDOW_TYPE_HINT_DOCK,
 GDK_WINDOW_TYPE_HINT_DESKTOP
} GdkWindowTypeHint;

typedef enum
{
 GDK_WINDOW_STATE_HINT_MODAL                = 1<<0,
 GDK_WINDOW_STATE_HINT_STICKY               = 1<<1,
 GDK_WINDOW_STATE_HINT_MAXIMIZED_VERTICAL   = 1<<2,
 GDK_WINDOW_STATE_HINT_MAXIMIZED_HORIZONTAL = 1<<3,
 GDK_WINDOW_STATE_HINT_SHADED               = 1<<4,
 GDK_WINDOW_STATE_HINT_SKIP_TASKBAR         = 1<<5,
 GDK_WINDOW_STATE_HINT_SKIP_PAGER           = 1<<6
} GdkWindowStateHint;

void gdk_window_set_type_hint (GdkWindow *window,
			       GdkWindowTypeHint hint);

void gdk_window_add_state_hints (GdkWindow *window,
				 GdkWindowStateHint hints);
void gdk_window_remove_state_hints (GdkWindow *window,
				    GdkWindowStateHint hints);
GdkWindowStateHint gdk_window_get_state_hints (GdkWindow *window);

/* Returns false if not supported */
gboolean gdk_window_set_pixbuf_icons (GdkWindow *window,
                                      GList *pixbufs);
				      
_NET_WM_ICON_NAME can be set from gdk_window_set_icon_name (). (In fact
there is already a patch to do so in bug 50079.)

Comments?

/ Alex





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]