Strange problem with quicktile on secondary monitor

Duncan 1i5t5.duncan at
Sat Jan 5 11:02:04 GMT 2013

Norbert Zeh posted on Fri, 04 Jan 2013 15:54:55 -0400 as excerpted:

> I've run into a weird problem with quicktiling (dragging a window to the
> left or right screen edge) on my secondary monitor.  Here's my setup.  I
> run a laptop and switch between using only the laptop panel and using it
> with an external monitor in dual-head mode.  When I attach the external
> monitor, I use the external monitor as my primary monitor and the laptop
> panel as secondary monitor located to the left of the primary monitor.
> The primary monitor has two KDE panels on it, one on the top, one on the
> bottom, the secondary monitor has no panels.
> Now, window sizes are as expected when I drag the windows to the edges
> of the primary monitor.  On the secondary monitor, however, things start
> to go wonky.  Most applications behave as expected, that is, they fill
> the whole screen height when dragged to the screen edge.  However, gvim
> and emacs leave a gap at the bottom that is the same as the height of
> the two panels on the primary monitor added together.  My first
> suspicion was that it has something to do with windows that specify
> their requested heights in character lines.  However, konsole and xterm
> do not show this weird behaviour, so this theory does not hold water.
> Then I thought it's something to do with how KDE works with gtk
> applications.  Then, however, Banshee should have the same problem and
> it doesn't.  So, for now I can reproduce this problem only with gvim and
> emacs.  Nevertheless, given that they are my main tools for my
> day-to-day work, this is a really annoying issue.
> I started to notice this problem using KDE 4.9.X (sorry, don't remember
> exactly the value of X) under archlinux, then switched to OpenSuse and
> didn't notice this problem for a while.  Now I've upgraded to KDE 4.9.5
> on OpenSuse and started to notice this problem again.  I tried Google to
> see whether anybody else has the same problem and maybe a solution, but
> I didn't find anything that sounded even remotely similar, so I'm out of
> ideas.  Any pointers on how to fix this, start debugging this, ... would
> be appreciated.

My guess is that this has something to do with the change from old 
xinerama style multi-monitor handling and "maximize" to a single monitor, 
which the problem apps probably coded for quite some time ago, to the new 
randr style multi-monitor handling, which they probably haven't been 
updated for, yet.

The older kde and/or xorg before you upgraded to kde 4.9 on OpenSuSE 
probably still kept enough of the xinerama code so the problem apps 
worked, but gradually, the legacy code is going stale and/or being 
dropped, and apps that haven't kept pace...

That would explain konsole working, since it's part of kde and would have 
kept up with the rest of kde, and xterm, since it's maintained by the xorg 
folks and so keeps up with things there.

As for a fix/workaround, I don't use those specific apps myself, so can't 
be sure, but I've had quite good luck with kwin window rules, here, and 
where they don't quite work (if your usage is dynamic enough that its 
rules are too static), there's the wmctrl and wmiface scriptable/CLI 
tools.  (wmctrl is older and has a more bash-user-friendly interface but 
doesn't have some of the newer features, wmiface is newer and more 
featureful, but was designed for those who are comfortable thinking in C/C
++ code, and thus isn't as easy for those (like me) who aren't C/C++ 
coders, but are comfortable enough with shell to hack up their own shell 
scripts and thus put wmctrl to use.)

Specifically, try three things, in kde/kwin window rules, try forcing 
ignore requested geometry ON and/or obey geometry restrictions OFF, and/
or, try specifying size -- window-rule forcing maximized-vertically or a 
specific size if you can live with that, or using wmctrl/wmiface 
scripting, possibly in combination with hotkey or gesture triggers (set 
those up under custom shortcuts in kde settings), if the kwin window 
rules sizing thing is too static/inflexible for you.

As I said, I've had reasonably good luck getting things to behave as I 
want, using a combination of the above (kwin window rules and scripted 
wmctrl calls).  Given that I'm a long-time gentooer, it should go without 
saying that I tend to have rather higher expectations than most about 
getting apps to behave my way, not me their way, so "reasonably good 
luck" actually means I've been quite successful at getting my desired 
behavior.  =:^)  (Of course, being a gentooer also means my configuring/
scripting/coding skills to FORCE the behavior what I want tend to be 
rather higher than average too, but... WORKSFORME. =:^)

Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman

This message is from the kde mailing list.
Account management:
More info:

More information about the kde mailing list