special window settings

Duncan 1i5t5.duncan at cox.net
Fri Dec 18 09:15:34 GMT 2009


Sergei Andreev posted on Fri, 18 Dec 2009 11:03:00 +0300 as excerpted:

> 2009/12/18 xPol <xtekhne at gmail.com>:
>> In kde 4.3, I am not able to start a window in a specific virtual
>> desktop by assigning special window setting. The only condition i
>> require to match is a substring in the window title (others window
>> features are set as 'unimportant').
>>
>> Anybody can confirm?
> 
> Well, I have Firefox assign to second VD with fullscreen at start,
> Kontact at third  and Synaptic assign to 5th VD. All works as expected
> since KDE 4.1

Same here, with pan, which I keep on its own dedicated VD, "News".

But I've noticed with various apps and setting that with title matches, 
"Apply Initially" doesn't always work.  Based on my limited VB and 
MSWormOS API experience from years ago, that wasn't surprising, as it 
wasn't uncommon there and apparently isn't uncommon on X either, to 
create the window, perhaps make it appear, then set the title.  It 
happens within fractions of a second, normally, so humans don't notice 
the sequence, but kwin will have to be called to position the new window, 
and because the title isn't set yet, it won't match, so the window won't 
have at least part of its "Apply initially" settings actually applied.  
By the time the title is actually set, "initially" no longer applies, so 
effectively, it's impossible to use "apply initially" with a title match 
on those windows.

There are three alternatives.  

1) "Force" will work, because it applies even when the window is "old", 
so it doesn't particularly matter when the title begins to match, the 
action is then forced and continues to be forced as long as the title 
matches.  However, "force" isn't alway practical, when one simply wants 
the initial property to be forced, but wants to allow for adjustment 
after that.  Still, I've been "forced" (heh, play on words! =:^) to use 
it occasionally.

2) Sometimes it's possible to match the window class and/or window role, 
perhaps by limiting it to specific window types (so say dialogs, etc, 
that might inherit roles from the parent don't get selected as well), 
instead of the title.  Those appear to be set earlier, and "apply 
initially" seems to work much more reliably with them.

3) Sometimes it's possible to use the command-line options, for instance 
with qt/kde apps, to set the title.  I use this (along with invoking a 
particular profile) with a particular scripted konsole invocation I do, 
for instance, so I can have kwin manage it differently than it does the 
normal konsole windows.  Using the command-line option to set the title 
seems to set it earlier in the process, so kwin can match it for apply 
initially, even when the program itself changes the title later.  Of 
course, this only works for qt/kde or similar apps, with a command-line 
option available to set the title.

Between the three of these techniques, and sometimes not being quite as 
picky about apply initially vs force as I'd otherwise like to be, I can 
usually manage to get something to work at least /mostly/ the way I want 
it to, even if it has a few minor side effects.

One other possibility.  I don't think it'll work for virtual-desktop, but 
for size, aka X geometry, it can.  Where it's not appropriate to force a 
particular size because you might want to change it, sometimes the 
geometry settings on the workarounds tab can help -- it may be enough to  
force it to either strictly obey geometry, or ignore requested geometry, 
depending on the case, instead of trying to have kwin apply initially or 
force a specific size.  Sometimes the app itself will handle it properly 
if kwin simply gets out of the way -- or is interfering with kwin's 
handling -- and setting the appropriate workaround accomplishes what one 
was trying to do using the kwin size settings, or near enough to have the 
desired effect at least.

-- 
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:  https://mail.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.




More information about the kde mailing list