exwm icon indicating copy to clipboard operation
exwm copied to clipboard

Function exwm-layout-unset-fullscreen cannot be used to unset a non-selected window

Open ceefrench opened this issue 11 months ago • 2 comments

I have a use-case for wanting to ensure that a given window is not in fullscreen mode before running some code on it, and was hoping it would be as easy as getting the X window id and feeding it to exwm-layout-unset-fullscreen before running my code. However, the function exits early in this block of code:

(unless (and (or id (derived-mode-p 'exwm-mode))
               (exwm-layout--fullscreen-p))
    (cl-return-from exwm-layout-unset-fullscreen))

The second line, as far as I can tell, checks to see that specifically the current window is fullscreen, however this may not be the case when supplying an x-id to the function. Removing the line allows for the functionality I was looking for, however, I'm not sure if it introduces any unintended behaviour, so maybe another solution may be more preferable. I'm curious about whether the condition in the second line is actually necessary. My assumption would be that running the rest of the code on a window which is not in fullscreen mode would simply have no effect, but I could easily be wrong about that.

ceefrench avatar Mar 03 '24 23:03 ceefrench