emasab / shelltile

A tiling window extension for GNOME Shell
https://extensions.gnome.org/extension/657/shelltile/
GNU General Public License v2.0
645 stars 42 forks source link

fix for #19: edge zones are 1 pixel around the monitor #59

Closed ddnexus closed 6 years ago

ddnexus commented 6 years ago

This simplify the calculation and behavior of ShellTile, avoiding the problem with the Top Panel height and position. It works consistently in any configuration with any top bar extension, allowing to position any window in any place without accidentally triggering the ShellTitle behavior.

ddnexus commented 6 years ago

Thanks!

emasab commented 6 years ago

Thank you! I wanted to reply yesterday but was in a hurry. I've enlarged a bit the sensible area

ddnexus commented 6 years ago

I see that you change it for 5 pixels. I choose 1 pixel instead of leaving the original 20 pixels (or even 5 pixels) for a few reasons:

  1. If you are going to need to precisely position a window close to the top of the edge, and you pin it in the first 20 or 5 pixels range of the title bar, you may trigger it accidentally. Not so with 1 pixel because In order to trigger the behavior you must go off the title bar, so no accident there.
  2. I don't see any advantage of getting the trigger 4 pixels before the real edge, just a possible annoying behavior (albeit not very frequent). Anyway, why risk it when there are no advantages?

If I have missed something and you really think there will be an advantage, you could add a setting for the edge width so the user could choose.

Another (cheaper) possibility would be using the same integer coming from "Size of the gaps between the windows" which could be renamed as "Window edge zone" or something of similar meaning. Easy on the code and consistent for the user.

BTW, thank you for the best tiling extension ;)