xmonad / xmonad-contrib

Contributed modules for xmonad

Home Page:https://xmonad.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

EwmhDesktops: `_NET_WM_ALLOWED_ACTIONS` is not set

ilya-bobyr opened this issue · comments

Problem Description

According to the "Extended Window Manager Hints" spec Windows Manager is supposed to set the _NET_WM_ALLOWED_ACTIONS property on client windows, to inform clients of the actions supported for those windows.

At the moment, XMonad.Hooks.EwmhDesktops only updates _NET_SUPPORTED property on the root window.

This causes some applications to avoid sending full-screen (and possibly) other request.

For example, Firefox does not add _NET_WM_STATE_FULLSCREEN to _NET_WM_STATE, when it wants to be displayed full screen. It means that opening a YouTube video full screen in Firefox, still keeps the Firefox window constrained by the layout.

Corresponding bug opened in the Firefox bug tracker: https://bugzilla.mozilla.org/show_bug.cgi?id=1273746#c7

Steps to Reproduce

  1. And ewmh and ewmhFullscreen from XMonad.Hooks.EwmhDesktops to your config.
  2. Open Firefox in a layout where the Firefox window does not take the whole screen space.
  3. Open youtube.com in Firefox (probably Chrome as well?) and click on the button to maximize the video.

Expected: Firefox window with the video stream is maximized.

Actual result: Video stream is maximized within the Firefox window, but the window itself is not maximized.

Configuration File

module Main (main) where

import XMonad
import XMonad.Hooks.EwmhDesktops (ewmh, ewmhFullscreen)

main :: IO ()
main = xmonad $ ewmhFullscreen $ ewmh def

Checklist

  • I've read CONTRIBUTING.md

  • I tested my configuration

    • With xmonad version be8fd7fdc98f1686e7edf36e0d4eee2759042292 "X.Core: Simplify DerivingVia instances".
    • With xmonad-contrib version 10c1a93963437cff6049fa0d2ec9dcfbfe89d0e5 "X.U.NamedScratchpads: Check for "new" workspace in nsHideOnFocusLoss".

Here is a fix: #781

I can't reproduce this with Firefox 107.0. Can you provide more details about your setup please?

I have removed _NET_WM_ALLOWED_ACTIONS and Firefox fullscreen is working still.
I'm running Firefox 107.0 as well.
It definitely stopped working at some point, and after adding the_NET_WM_ALLOWED_ACTIONS updates is started to.
So, I assumed that my Firefox got updated, and it was checking the _NET_WM_ALLOWED_ACTIONS now.

Based on the discussion in the corresponding Firefox bug and in the spec, I figured, my change was the reason.
But apparently, it stopped working for a different reason.

Do you think it still makes sense to add the _NET_WM_ALLOWED_ACTIONS code, or should I close the PR?

Do you think it still makes sense to add the _NET_WM_ALLOWED_ACTIONS code, or should I close the PR?

Well, we quite like keeping things simple and lightweight, so if this isn't actually needed to fix a real bug, I'd prefer to not carry that additional code.

(And if this ever becomes an issue, we'll always have that PR for reference. :-))

The spec does say that this is the right behavior. Not sure how many applications really pay attentions to _NET_WM_ALLOWED_ACTIONS. I am quite new to X11.

I think if I close it, it will probably bit rot eventually. Not sure how much EwmhDesktops changes.
But it is your call, as you are the one maintaining XMonad :)

I think if I close it, it will probably bit rot eventually. Not sure how much EwmhDesktops changes.
But it is your call, as you are the one maintaining XMonad :)

I wouldn't worry about that too much. Haskell code is short, and clearly communicates what it does (sometimes even why), so it doesn't bitrot as much as most other code does. If _NET_WM_ALLOWED_ACTIONS ever turns out to be necessary, we'll pick up your work in no time. ;-)