From af11e1673b4057b9b9b81900ba9ab9a1d0fd058b Mon Sep 17 00:00:00 2001 From: Matthew Willis Date: Mon, 11 Feb 2008 22:52:02 -0800 Subject: [PATCH] Implemented the set-fullscreen* hook for the x11 backend. I doubt that fullscreen* can be implemented for x11, so it might need to be removed or always return f. --- extra/ui/x11/x11.factor | 13 +++++++++++++ extra/x11/constants/constants.factor | 5 +++++ 2 files changed, 18 insertions(+) diff --git a/extra/ui/x11/x11.factor b/extra/ui/x11/x11.factor index 62944500ef..6a0560cb28 100755 --- a/extra/ui/x11/x11.factor +++ b/extra/ui/x11/x11.factor @@ -217,6 +217,19 @@ M: x-clipboard paste-clipboard M: x11-ui-backend set-title ( string world -- ) world-handle x11-handle-window swap dpy get -rot 3dup set-title-old set-title-new ; + +M: x11-ui-backend set-fullscreen* ( ? world -- ) + world-handle x11-handle-window "XClientMessageEvent" + tuck set-XClientMessageEvent-window + swap _NET_WM_STATE_ADD _NET_WM_STATE_REMOVE ? + over set-XClientMessageEvent-data0 + ClientMessage over set-XClientMessageEvent-type + dpy get over set-XClientMessageEvent-display + "_NET_WM_STATE" x-atom over set-XClientMessageEvent-message_type + 32 over set-XClientMessageEvent-format + "_NET_WM_STATE_FULLSCREEN" x-atom over set-XClientMessageEvent-data1 + >r dpy get root get 0 SubstructureNotifyMask r> XSendEvent drop ; + M: x11-ui-backend (open-window) ( world -- ) dup gadget-window diff --git a/extra/x11/constants/constants.factor b/extra/x11/constants/constants.factor index 367f40cebd..5781fdc806 100644 --- a/extra/x11/constants/constants.factor +++ b/extra/x11/constants/constants.factor @@ -402,3 +402,8 @@ TYPEDEF: uchar KeyCode : LSBFirst 0 ; : MSBFirst 1 ; +! ***************************************************************** +! * EXTENDED WINDOW MANAGER HINTS +! ***************************************************************** + +C-ENUM: _NET_WM_STATE_REMOVE _NET_WM_STATE_ADD _NET_WM_STATE_TOGGLE ; \ No newline at end of file -- 2.34.1