Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent applications from enabling fullscreen #931

Open
walseb opened this issue Nov 22, 2023 · 3 comments
Open

Prevent applications from enabling fullscreen #931

walseb opened this issue Nov 22, 2023 · 3 comments

Comments

@walseb
Copy link
Contributor

walseb commented Nov 22, 2023

Hello!

I have a few X-applications that forces fullscreen all the time.

I'd like to prevent any application from enabling fullscreen, and just do it myself instead.

Is there any way to do this?

Thanks!

@sarg
Copy link

sarg commented Nov 26, 2023

It's handled over here:

exwm/exwm.el

Lines 597 to 610 in 9d035d7

(when (or (memq xcb:Atom:_NET_WM_STATE_FULLSCREEN props)
(memq xcb:Atom:_NET_WM_STATE_ABOVE props))
(cond ((= action xcb:ewmh:_NET_WM_STATE_ADD)
(unless (exwm-layout--fullscreen-p)
(exwm-layout-set-fullscreen id))
(push xcb:Atom:_NET_WM_STATE_FULLSCREEN props-new))
((= action xcb:ewmh:_NET_WM_STATE_REMOVE)
(when (exwm-layout--fullscreen-p)
(exwm-layout-unset-fullscreen id)))
((= action xcb:ewmh:_NET_WM_STATE_TOGGLE)
(if (exwm-layout--fullscreen-p)
(exwm-layout-unset-fullscreen id)
(exwm-layout-set-fullscreen id)
(push xcb:Atom:_NET_WM_STATE_FULLSCREEN props-new)))))

You can try to add a before-while advice to exwm-layout-set-fullscreen which would define which apps can enable fullscreen.

@walseb
Copy link
Contributor Author

walseb commented Nov 26, 2023

Thank you so much! I will try that.

@walseb
Copy link
Contributor Author

walseb commented Nov 27, 2023

As a side note, it would be great if someone could rewrite this monolithic cond switch event handler as a hook that gets called with the event type. Then it would be much easier to make changes like this, and even add functionality when EXWM receives events.

progfolio added a commit to progfolio/exwm that referenced this issue Jun 5, 2024
* exwm.el (exwm-client-message-functions):
Abnormal hook for dispatching client messages.
(exwm--on-ClientMessage): delegate to said hook, decompose body into separate
hook functions

See: ch11ng/exwm#931
progfolio added a commit to progfolio/exwm that referenced this issue Jun 5, 2024
* exwm.el (exwm-client-message-functions):
Abnormal hook for dispatching client messages.
(exwm--on-ClientMessage): delegate to said hook, decompose body into separate
hook functions

See: ch11ng/exwm#931
progfolio added a commit to progfolio/exwm that referenced this issue Jun 5, 2024
* exwm.el (exwm--client-message-functions):
Alist for dispatching client messages to handlers.
(exwm--on-ClientMessage): delegate via exwm--client-message-functions,
decompose body into separate handlers

See: ch11ng/exwm#931
progfolio added a commit to progfolio/exwm that referenced this issue Jun 5, 2024
* exwm.el (exwm--client-message-functions):
Alist for dispatching client messages to handlers.
(exwm--on-ClientMessage): delegate via exwm--client-message-functions,
decompose body into separate handlers

See: ch11ng/exwm#931
progfolio added a commit to progfolio/exwm that referenced this issue Jun 5, 2024
* exwm.el (exwm--client-message-functions):
Alist for dispatching client messages to handlers.
(exwm--on-ClientMessage): delegate via exwm--client-message-functions,
decompose body into separate handlers

See: ch11ng/exwm#931
progfolio added a commit to progfolio/exwm that referenced this issue Jun 5, 2024
* exwm.el (exwm--client-message-functions):
Alist for dispatching client messages to handlers.
(exwm--on-ClientMessage): delegate via exwm--client-message-functions,
decompose body into separate handlers

See: ch11ng/exwm#931
progfolio added a commit to progfolio/exwm that referenced this issue Jun 5, 2024
* exwm.el (exwm--client-message-functions):
Alist for dispatching client messages to handlers.
(exwm-init): set exwm--client-message-functions once exwmh support enabled.
(exwm--on-ClientMessage): delegate via exwm--client-message-functions,
decompose body into separate handlers.

See: ch11ng/exwm#931
progfolio added a commit to progfolio/exwm that referenced this issue Jun 5, 2024
* exwm.el (exwm--client-message-functions):
Alist for dispatching client messages to handlers.
(exwm-init): set exwm--client-message-functions once exwmh support enabled.
(exwm--on-ClientMessage): delegate via exwm--client-message-functions,
decompose body into separate handlers.

See: ch11ng/exwm#931
Stebalien pushed a commit to emacs-exwm/exwm that referenced this issue Jun 6, 2024
* exwm.el (exwm--client-message-functions):
Alist for dispatching client messages to handlers.
(exwm-init): set exwm--client-message-functions once exwmh support enabled.
(exwm--on-ClientMessage): delegate via exwm--client-message-functions,
decompose body into separate handlers.

See: ch11ng/exwm#931
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants