EWMH non-resizable panel
git-svn-id: http://tint2.googlecode.com/svn/trunk@196 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
This commit is contained in:
11
src/panel.c
11
src/panel.c
@@ -337,7 +337,6 @@ void set_panel_properties(Panel *p)
|
|||||||
{
|
{
|
||||||
XStoreName (server.dsp, p->main_win, "tint2");
|
XStoreName (server.dsp, p->main_win, "tint2");
|
||||||
|
|
||||||
// TODO: check if the name is really needed for a panel/taskbar ?
|
|
||||||
gsize len;
|
gsize len;
|
||||||
gchar *name = g_locale_to_utf8("tint2", -1, NULL, &len, NULL);
|
gchar *name = g_locale_to_utf8("tint2", -1, NULL, &len, NULL);
|
||||||
if (name != NULL) {
|
if (name != NULL) {
|
||||||
@@ -393,10 +392,12 @@ void set_panel_properties(Panel *p)
|
|||||||
state[3] = server.atom._NET_WM_STATE_BELOW;
|
state[3] = server.atom._NET_WM_STATE_BELOW;
|
||||||
XChangeProperty (server.dsp, p->main_win, server.atom._NET_WM_STATE, XA_ATOM, 32, PropModeReplace, (unsigned char *) state, 4);
|
XChangeProperty (server.dsp, p->main_win, server.atom._NET_WM_STATE, XA_ATOM, 32, PropModeReplace, (unsigned char *) state, 4);
|
||||||
|
|
||||||
// Fixed position
|
// Fixed position and non-resizable window
|
||||||
XSizeHints size_hints;
|
XSizeHints size_hints;
|
||||||
size_hints.flags = PPosition;
|
size_hints.flags = PPosition|PMinSize|PMaxSize;
|
||||||
XChangeProperty (server.dsp, p->main_win, XA_WM_NORMAL_HINTS, XA_WM_SIZE_HINTS, 32, PropModeReplace, (unsigned char *) &size_hints, sizeof (XSizeHints) / 4);
|
size_hints.min_width = size_hints.max_width = p->area.width;
|
||||||
|
size_hints.min_height = size_hints.max_height = p->area.height;
|
||||||
|
XSetWMNormalHints(server.dsp, p->main_win, &size_hints);
|
||||||
|
|
||||||
// Unfocusable
|
// Unfocusable
|
||||||
XWMHints wmhints;
|
XWMHints wmhints;
|
||||||
@@ -410,7 +411,7 @@ void set_panel_properties(Panel *p)
|
|||||||
wmhints.flags = InputHint;
|
wmhints.flags = InputHint;
|
||||||
wmhints.input = False;
|
wmhints.input = False;
|
||||||
}
|
}
|
||||||
XSetWMHints(server.dsp, p->main_win, &wmhints);
|
XSetWMHints(server.dsp, p->main_win, &wmhints);
|
||||||
|
|
||||||
// Undecorated
|
// Undecorated
|
||||||
long prop[5] = { 2, 0, 0, 0, 0 };
|
long prop[5] = { 2, 0, 0, 0, 0 };
|
||||||
|
|||||||
@@ -68,7 +68,6 @@ void server_init_atoms ()
|
|||||||
server.atom.UTF8_STRING = XInternAtom (server.dsp, "UTF8_STRING", False);
|
server.atom.UTF8_STRING = XInternAtom (server.dsp, "UTF8_STRING", False);
|
||||||
server.atom._NET_SUPPORTING_WM_CHECK = XInternAtom (server.dsp, "_NET_SUPPORTING_WM_CHECK", False);
|
server.atom._NET_SUPPORTING_WM_CHECK = XInternAtom (server.dsp, "_NET_SUPPORTING_WM_CHECK", False);
|
||||||
server.atom._NET_SUPPORTING_WM_CHECK = XInternAtom (server.dsp, "_NET_WM_NAME", False);
|
server.atom._NET_SUPPORTING_WM_CHECK = XInternAtom (server.dsp, "_NET_WM_NAME", False);
|
||||||
server.atom._WIN_LAYER = XInternAtom (server.dsp, "_WIN_LAYER", False);
|
|
||||||
server.atom._NET_WM_STRUT_PARTIAL = XInternAtom (server.dsp, "_NET_WM_STRUT_PARTIAL", False);
|
server.atom._NET_WM_STRUT_PARTIAL = XInternAtom (server.dsp, "_NET_WM_STRUT_PARTIAL", False);
|
||||||
server.atom.WM_NAME = XInternAtom(server.dsp, "WM_NAME", False);
|
server.atom.WM_NAME = XInternAtom(server.dsp, "WM_NAME", False);
|
||||||
server.atom.__SWM_VROOT = XInternAtom(server.dsp, "__SWM_VROOT", False);
|
server.atom.__SWM_VROOT = XInternAtom(server.dsp, "__SWM_VROOT", False);
|
||||||
|
|||||||
@@ -50,7 +50,6 @@ typedef struct Global_atom
|
|||||||
Atom _NET_CLOSE_WINDOW;
|
Atom _NET_CLOSE_WINDOW;
|
||||||
Atom UTF8_STRING;
|
Atom UTF8_STRING;
|
||||||
Atom _NET_SUPPORTING_WM_CHECK;
|
Atom _NET_SUPPORTING_WM_CHECK;
|
||||||
Atom _WIN_LAYER;
|
|
||||||
Atom _NET_WM_STRUT_PARTIAL;
|
Atom _NET_WM_STRUT_PARTIAL;
|
||||||
Atom WM_NAME;
|
Atom WM_NAME;
|
||||||
Atom __SWM_VROOT;
|
Atom __SWM_VROOT;
|
||||||
|
|||||||
Reference in New Issue
Block a user