kwin-scripts / kwin-tiling

Tiling script for kwin
GNU General Public License v2.0
1.1k stars 68 forks source link

Auto hide doesn't work because activating a tiled window reopens the panel #152

Closed timrichardson closed 5 years ago

timrichardson commented 5 years ago

I have a vertical panel on the right edge of my main screen. When it is on autohide, it opens when a tile windows is activated. It stays open. It will close if you move the mouse over the panel, no need to click, and then move the mouse away. But any click in a window will redisplay the panel.

laloch commented 5 years ago

What are your versions of KWin and kwin-tiling? I can't reproduce the issue with kwin_x11 v5.15.4 and kwin-tiling from master/HEAD.

timrichardson commented 5 years ago

KDE neon so same kwin I guess, and I installed script from git clone (master) today. Are there additional diagnostics I can send?

On Mon, 29 Apr. 2019, 21:46 David Strobach, notifications@github.com wrote:

What are your versions of KWin and kwin-tiling? I can't reproduce the issue with kwin_x11 v5.15.4 and kwin-tiling from master/HEAD.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/kwin-scripts/kwin-tiling/issues/152#issuecomment-487548520, or mute the thread https://github.com/notifications/unsubscribe-auth/AAHCNYWLFDQCTGVICB2FEOLPS3NXXANCNFSM4HJCQLRA .

laloch commented 5 years ago

Are there additional diagnostics I can send?

Yes, in fact. X11, or Wayland? How many screens? Is the problematic panel placed on the edge between screens?

laloch commented 5 years ago

I would say that it's #351175 upstream bug. I can reproduce it here now on the edge between two screens. I could take a look at it, if it's indeed the case, but since @davidedmundson stated (without further reasoning), that it's an X11 limitation, I don't really think I can do much about it.

timrichardson commented 5 years ago

It's X11. I have two monitors. The panel is not between the monitors, it is on an outer edge. Auto hiding works well until the kwin-tiling script is started.

On Mon, 29 Apr. 2019, 21:59 David Strobach, notifications@github.com wrote:

I would say that it's this upstream bug https://bugs.kde.org/show_bug.cgi?id=351175. I can reproduce it here.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/kwin-scripts/kwin-tiling/issues/152#issuecomment-487551889, or mute the thread https://github.com/notifications/unsubscribe-auth/AAHCNYWCR656TBVZOLNGRWTPS3PLVANCNFSM4HJCQLRA .

timrichardson commented 5 years ago

This is a link to a screen recording.

https://drive.google.com/file/d/1A6aKkoxS6A2vh6FgrINkI1L_Gln4F6L8/view?usp=sharing

Initially, tiling is off and the panel is on "always visible". I set the panel to autohide, and show that auto hide works. Then I turn tiling on. Sorry, I spent a few seconds navigating to keyboard shortcuts to try to show what I was doing, silly, because it i obvious when tiling starts. You can see that clicking a tiled window "raises" the autohidden panel (why?) and that it does not hide again unless I move my mouse over the panel. Auto-hide function then works normally, until I click a tiled window again.

timrichardson commented 5 years ago

Related problem. When panel is set to Windows can hide, windows do not actually go "over" the panel if tiling it turned on. Same set up as before. To reproduce: Set up a vertical panel on an outer monitor edge (don't put it on an internal edge of a multi-monitor panel to avoid any confusion with the upstream bug referenced above). Set the panel to "Windows can cover" option Turn on tiling. Open just one app, so that it maximises to whole screen. Result: the panel is not hidden, it stays above the application window.

use Meta-F to put the window in floating mode. It says full screen, and instantly, the panel is covered by the application windows. Meta-F to re-tile, and the panel appears on top again.

laloch commented 5 years ago

Thanks for reporting and for the (very nice) screen recording. I'll try to reproduce both the issues later today or tomorrow.

laloch commented 5 years ago

I can confirm the second issue with "Windows can cover" panels. This is due to the way both kwin-tiling script and KWin handle window layers. KWin internally recognizes eight window layers and only exposes three of them to the scripting API. kwin-tiling script sends tiled windows to the "Below" layer in order to always keep "floaters" above the tiles. Plasma shell, however, sends the "Windows can cover" panels to "Normal" layer which is still above the tiles. So, alas, this is by design and a wontfix, sorry @timrichardson.

timrichardson commented 5 years ago

So what I think you saying is that the scripting layer doesn't have enough layers to go above the panel while sending floating windows to be in a still higher layer, although if the panel went to the "Below" layer it could perhaps be possible since tiled windows go to "Normal" and floaters to "Above" (I guess this is the third scriptable layer).

Thanks for the explanation. This tiling extension is now too good not to use, kudos. So good bye hiding panel.

Do you think there is any point asking KDE project to allow more layers to be scriptable or to changing panel to use a lower layer?

laloch commented 5 years ago

So good bye hiding panel.

Not yet. I still don't understand nor can I reproduce the weird auto-hiding behavior. The above only concerned the "Windows can cover" panels.

Do you think there is any point asking KDE project to allow more layers to be scriptable or to changing panel to use a lower layer?

Well, maybe, but I don't really think so, because the eight layer organisation I mentioned above is strictly KWin-internal. Sending a panel to the "below" layer would, on the other hand, probably disturb the intended plasma shell behavior. It would break the "normal" layer stacking order and the panel would never be visible.

laloch commented 5 years ago

@timrichardson, can you reproduce the auto-hiding bug with just an empty panel?

timrichardson commented 5 years ago

I made a new user hence a default plasma desktop, made the standard panel autohiding and moved it to the same edge. It worked fine. So you are right, there is something in my config causing this. A widget on my panel, or something else. I will try to "bisect" the setup.

timrichardson commented 5 years ago

I, also, don't think this is kwin-tiling bug. I couldn't find any panel-related setting or widget which caused it. I think there may be a plasma bug with understanding disabled monitors; my desktop seemed to be including a disabled monitor in the display geometry, placing it to the right of my main screen (a physically off, lid-down laptop screen). It is odd, and very confusing, particularly when I made a new user, because plasma make this disabled and turned off screen the primary display (so I had no default panel, and opening most apps invisibly opened them on a monitor I couldn't see, this is an awesome prank to pull on a KDE user). I filed a bug to kde. I regenerated the multi-monitor configuration, and auto-hide is working now.

laloch commented 5 years ago

OK, thanks for explanation.