summaryrefslogtreecommitdiff
path: root/src/winwidget.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/winwidget.c')
-rw-r--r--src/winwidget.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/winwidget.c b/src/winwidget.c
index 8525a17..38d6db6 100644
--- a/src/winwidget.c
+++ b/src/winwidget.c
@@ -158,6 +158,7 @@ winwidget_create_window(winwidget ret,
int h)
{
XSetWindowAttributes attr;
+ XEvent ev;
XClassHint *xch;
MWMHints mwmhints;
Atom prop = None;
@@ -256,6 +257,22 @@ winwidget_create_window(winwidget ret,
XChangeProperty(disp, ret->win, prop, prop, 32, PropModeReplace,
(unsigned char *) &mwmhints, PROP_MWM_HINTS_ELEMENTS);
}
+ if (ret->full_screen) {
+ Atom prop_fs = XInternAtom(disp, "_NET_WM_STATE_FULLSCREEN", False);
+ Atom prop_state = XInternAtom(disp, "_NET_WM_STATE", False);
+
+ memset(&ev, 0, sizeof(ev));
+ ev.xclient.type = ClientMessage;
+ ev.xclient.message_type = prop_state;
+ ev.xclient.display = disp;
+ ev.xclient.window = ret->win;
+ ev.xclient.format = 32;
+ ev.xclient.data.l[0] = (ret->full_screen ? 1 : 0);
+ ev.xclient.data.l[1] = prop_fs;
+
+ XChangeProperty(disp, ret->win, prop_state, XA_ATOM, 32,
+ PropModeReplace, &prop_fs, 1);
+ }
XSetWMProtocols(disp, ret->win, &wmDeleteWindow, 1);
winwidget_update_title(ret);