Hi all, so I am just using an extension called highlight focus, and it seems that the window border will simply go away at random times (although I noticed this is a particular issue when discord opens up).
This issue also manifests ONLY on fully maximized windows, and not window’s that are split to the left or right. My transparency extension and highlight-focus will both work on a split window but not a maximized one, so something seems to be changing the window state so that it is no longer qualified for modification by those apps…
Is there any way that I can get some information on what is happening under the hood so I can start looking into why this issue manifests? Not super familiar with GNOME debugging butr I am ready to learn!
Thanks for getting back to me. The border only seems to disappear when the window covers the whole screen . On the monitor presenting this issue, I do not have a panel. I do believe that the drawing occurs on top of the panel (via the border.show() method). I will mention that in my custom extension, I have removed the conditional which was responsible for the removal of borders on maximized windows, although I still seem to be running into problems getting it to render reliably. I will try turning of external extensions to see if there may be an unwanted interaction with another extension’s window management (Just Perfection auto-maximizes my windows; I have disabled that feature from now and will use the shell normally and monitor the situation). In the image below, you can see how the border looks on my top monitor, vs an unbordered window on my bottom monitor (the monitors are vertically stacked)
If the window covers the whole screen, it will enable the direct scanout code path. If you want to draw on top of it, you need to disable direct scanout using global.compositor.disable_unredirect() (at the performance cost of applications now always having to go through the compositor).
I had no idea this was happening in the background. FIrstly, could you point in the source where this is happening, and also, why does GNOME do this? I am still able to have my volume slider and workspace indicator show over the window (I was under the impression that scanout was specifically for fullscreen videos, such as those playing from youtube that were put into fullscreen; however, even the full-screen youtube videos will redraw/replace the border when I toggle my volume button, and the slider and border will disappear shortly afterward)
@skeller Thank you so much for the insight! I just ran ``global.compositor.disable_unredirect()`` in the looking glass console, and that seemed to work!
I think the best way to manage this is while the highlight-focus extension is enabled, I could just run the function, but is there a way to re-enable it within the disable() function of the extension? Thank you again for your help!
That function increases/decreases a counter, so you have to make sure you call it when you need to prevent direct scanout and call enable_unredirect() again when you want to allow direct scanout again. You can either do this from the enable()/disable() functions in your extension or use a more sophisticated approach that detects whether there are proper fullscreen windows (like games) that should still use direct scanout and only disable it when there is no fullscreen window.
Perfect, this resolved my issue, Sebastian, thank you very much!
Can you recommend any resources to get more familiar with the gnome shell/architecture and using GJS? Any specific areas in the source code, or any particular extensions that you found useful in learning how to use and deploy apps with the GJS API?