Bug 92914 - update applied special window settings when title changes
Summary: update applied special window settings when title changes
Status: RESOLVED DOWNSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: HI normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-08 15:30 UTC by Melchior Franz
Modified: 2011-12-10 10:00 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Melchior Franz 2004-11-08 15:30:04 UTC
Version:           cvs/head as of 2004/11/8 (using KDE Devel)
Installed from:    Compiled sources
Compiler:          gcc (GCC) 3.3.1 (SuSE Linux) libc 2.3.2; Linux 2.6.9
OS:                Linux

I've tried to set a special window rule for FlightGear (http://www.flightgear.org/). The main window (there are no other windows in this app) should always be drawn without window border. I selected "Special Window Settings ..." in the title bar menu, "Detect"ed the concerned window, and set "Preferences"/"No border"/"Apply Initially". This stored the following settings in ~/.kde/share/config/kwinrulesrc:


[1]
description=FlightGear
noborder=true
noborderrule=3
title=FlightGear
titlematch=0
types=1
wmclass=sdl_app sdl_app
wmclasscomplete=true
wmclassmatch=1

[General]
count=1



and these setting do indeed work for FlightGear: no window borders there. But if I start another SDL app (qemu), it is also drawn without window borders! OK, no problem. (Note that in the titlematch was still 0.)


BTW: kdDebug outputs:
===============================================================
kwin: Rule found:[FlightGear:sdl_app sdl_app]:'ID:56623118;WMCLASS:sdl_app:sdl_app;Caption:'
kwin: User timestamp, initial:4294967295
kwin: User timestamp, ASN:4294967295
kwin: User timestamp, final:'ID:56623118;WMCLASS:sdl_app:sdl_app;Caption:':2302917





And now comes the bug:
===============================================================
So I set "Window Extra"/"Window title" to "FlightGear" and selected "exact match". ("FlightGear" is shown in FlightGear's main window title.) As one would expect, only the "titlematch" entry in ~/.kde/share/config/kwinrulesrc changes from 0 to 1.



But now, the whole rule doesn't match any more! kdDebug shows this:
===============================================================
kwin: User timestamp, initial:4294967295
kwin: User timestamp, ASN:4294967295
kwin: User timestamp, final:'ID:16777230;WMCLASS:sdl_app:sdl_app;Caption:':2472743



The kdDebug output lines show that "Caption:" is empty, and an additionally added kdDebug in rules.cpp:338 (Rules::matchTitle) confirmed that.


Is kwin's "special windows settings" feature unable to retrieve window titles from SDL applications? The title is correctly shown in the window title bar, so it's not a general kwin weakness.
Comment 1 Lubos Lunak 2004-11-08 16:14:52 UTC
Works fine for me with FlightGear-0.9.3. Given that it has the window class set in such a broken way, I wouldn't be surprised if it first showed the window and only then set the window title - that might be a race condition causing it works for me and not for you.
KWin currently doesn't update the set of rules if the title changes. I might consider that, although currently I'm not that sure it would be a good idea.
Comment 2 Melchior Franz 2004-11-08 17:13:22 UTC
FlightGear can be compiled with/linked against GLUT or SDL. Your version was probably linked with GLUT. And your guess was right: FlightGear had opened the window and *then* set the caption. Looks like qemu has the same problem. I'll take care of both apps. But it would probably still be a good idea to let kwin deal with that, as you suggested. Thanks! Works now.  :-)
Comment 3 Martin Flöser 2011-12-10 10:00:28 UTC
client issue