From: Matthew Willis Date: Tue, 12 Feb 2008 06:52:02 +0000 (-0800) Subject: Implemented the set-fullscreen* hook for the x11 backend. X-Git-Tag: 0.94~3254^2~313^2~4^2~1^2~1 X-Git-Url: https://gitweb.factorcode.org/gitweb.cgi?p=factor.git;a=commitdiff_plain;h=af11e1673b4057b9b9b81900ba9ab9a1d0fd058b 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. --- 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