ssokolow / quicktile

Adds window-tiling hotkeys to any X11 desktop. (An analogue to WinSplit Revolution for people who don't want to use Compiz Grid)
https://ssokolow.com/quicktile/
GNU General Public License v2.0
860 stars 78 forks source link

Resolve monitor-switch more intelligently on differently sized monitors #110

Open ssokolow opened 4 years ago

ssokolow commented 4 years ago

I don't want this to block 0.4.0, but I've realized the proper way to handle differently-sized monitors for monitor-* commands without waiting for the big rework needed to track what edge a window was originally tiled relative to.

Instead of clipping the target rectangle, or dumbly shoving the entire thing to be within the monitor's bounds, move it just enough to ensure that some minimum width (100px?) of the titlebar will be visible.

That way, if the window extends far enough into common subset of the monitor areas, it'll remain unmoved and behave like GTK+ 2.x QuickTile for cycling through monitors, but it won't be possible to lose a window off the edge of the desktop like Kubuntu 16.04 LTS allows in the absence of any kind of clamping.

allanlaal commented 1 year ago

how about just checking if the target monitor size is smaller than the window being moved, then resize that window to the monitor size

ssokolow commented 1 year ago

That's the "clipping the target rectangle" option that this idea is "Instead of".