Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // X11 Fullscreen window
- // !! Netestovany kod !!
- // Moznost 1, fullscreen na vybrane monitory
- XClientMessageEvent msg = {
- .type = ClientMessage,
- .display = xdisplay_ptr,
- .window = window_xid,
- .message_type = XInternAtom(xdisplay_ptr, "_NET_WM_FULLSCREEN_MONITORS", True), // osetrit, jestli vrati None => neni podporovano
- .format = 32,
- .data = { .l = { topMonitor, bottomMonitor, leftMonitor, rightMonitor, 1 /* source, 0 = not specified, 1 = normal application, 2 = user interaction */ } }
- };
- XSendEvent(xdisplay_ptr, root_window_xid, False, SubstructureRedirectMask | SubstructureNotifyMask, (XEvent*)&msg);
- // Moznost 2, fullscreen a nechat WM rozhodnout, na ktere monitory
- XClientMessageEvent msg = {
- .type = ClientMessage,
- .display = xdisplay_ptr,
- .window = window_xid,
- .message_type = XInternAtom(xdisplay_ptr, "_NET_WM_STATE", True), // osetrit, jestli vrati None => neni podporovano
- .format = 32,
- .data = { .l = {
- 1 /* _NET_WM_STATE_ADD */,
- XInternAtom(xdisplay_ptr, "_NET_WM_STATE_FULLSCREEN", True) /* first property to add */,
- None /* second property to add */,
- 0,
- 1 /* source, jako u moznosti 1 */
- }}
- };
- XSendEvent(xdisplay_ptr, root_window_xid, False, SubstructureRedirectMask | SubstructureNotifyMask, (XEvent*)&msg);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement