Bug 291312 - kwinrulesrc ignored by KDE application (qt only & gtk follow the rules)
Summary: kwinrulesrc ignored by KDE application (qt only & gtk follow the rules)
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: 4.7.4
Platform: Unlisted Binaries Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-11 22:49 UTC by Karmido
Modified: 2012-01-13 15:43 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.8


Attachments
kwinrc file (4.02 KB, text/plain)
2012-01-12 00:03 UTC, Karmido
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Karmido 2012-01-11 22:49:09 UTC
Version:           4.7.4 (using KDE 4.7.4) 
OS:                Linux

I have this on my kwinsulesrc to disable border (title bar) from all app/windows:

I have this
[1]
Description=No Border
noborder=true
noborderrule=2
types=4294967295
wmclass=
wmclasscomplete=false
wmclassmatch=0

[General]
count=1

and it was works as expected before upgrade to kde sc 4.7.3

on kde sc 4.7.3 & 4.7.4, it's ignored by KDE only application (dolphin, konsole, etc), the rules works fine for qt only application (tested with vym, tea editor) and gtk app (inkscape, bluefish, abiword, gimp, etc)

Reproducible: Didn't try

Steps to Reproduce:
- add the above kwin rule and save it
- start new instance of KDE application (dolphin/konsole/etc)
- start new instance of Qt only application (VYM/tea editor/clementine/etc)
- start new instance of Gtk application  (inkscape, bluefish, abiword, gimp, etc)

Actual Results:  
- KDE application ignore kwin rule, window border (title bar) still shown
- Qt & Gtk application window start with no border (title bar)

Expected Results:  
All application window should be display without border

- also tested with clean kde state (new user), default setup, only the above kwin rule applied.

- kde sc 4.7.4 on archlinux
Comment 1 Thomas Lübking 2012-01-11 23:13:05 UTC
Translation: you set up a "semi-blind" rule to force no border - can you please translate

types=4294967295

into sth. human readable ;-)

In general clients or the client toolkit cannot "ignore" those rules.
It doesn't matter what toolkit is invoked, if the rule says "there's no border", there's no border. Period.
So the only thing that changed might be the window type match - otherwise the noborder would be polluted (does alt+f3/advanced suggest there's a border?), but it's more weired since it does not affect new accounts...
Comment 2 Karmido 2012-01-11 23:23:10 UTC
don't know about that types=4294967295 things,
that rules was produced with System Settings > Window Behavior > Window Rules, select all windows types from the list, set wm class, role, etc as Unimportant.

btw, with devilspie's (undecorate) window rule works fine/got applied to all windows
Comment 3 Karmido 2012-01-11 23:38:19 UTC
alt+f3>advance show there's a border, invoking no-border manually (advance menu) works, but the border will be back when:
- toggle show hide menu (tested on dolphin)
- on kontact, when switching to other app (e.g. from kmail to kjots)
Comment 4 Thomas Lübking 2012-01-11 23:43:44 UTC
It's the "Window Types" entry on the first page - try to remove the key from the config and restart "kwin --replace &"

If that doesn't fix it, try "kquitapp kwin; sleep 2; mv kwinrc kwinrc.old; kwin &" (ie. move your kwinrc out of the way)
In case that does it, please attach your (former) kwinrc

> btw, with devilspie's (undecorate) window rule works
It just set's a window hint which is respected by kwin - that's hardly relevant
Comment 5 Karmido 2012-01-12 00:03:04 UTC
Created attachment 67718 [details]
kwinrc file
Comment 6 Karmido 2012-01-12 00:05:39 UTC
still not work, "types" config key removed, but it back written to kwinsulesrc (become: "types=0") everytime I restart kwin

removing kwinrc doesn't help.

my old kwinrc attached
Comment 7 Thomas Lübking 2012-01-12 00:30:27 UTC
Hummm?

Ok, the situation is:
- you have one window rule, printed in comment #0
- it apparently works for all but windows invoking kdelibs/kapplication
- it is NOT broken on a fresh account
- it's NOT related to kwinrc
- removing the key that translates as "ignore" and should match all windows and restarting KWin results in readding the type with "0" what
a) should not happen (regardless of the value)
b) actually translates "no window" -> the expectable result should be that it fails for *all* windows now.

So far correct??
Comment 8 Karmido 2012-01-12 00:39:11 UTC
correct, except:
- it is NOT broken on a fresh account

its also broken on fresh account/clean state kde
Comment 9 Thomas Lübking 2012-01-12 00:50:41 UTC
Ok, sorry - got that wrong.

Is it a 64 bit installation?
And it's also correct that the "automatically" added "types=0" results in a complete failure of the rule, yesno?

Two wild shots: try replacing the kwin decoration and the UI style ("kcmshell4 kwindecoration" & "kcmshell4 style"), ie. don't use oxygen but eg. the kde2 deco & the plastique UI style.
Comment 10 Karmido 2012-01-12 00:58:26 UTC
> Is it a 64 bit installation?
Yes

> And it's also correct that the "automatically" added "types=0" results in a
complete failure of the rule, yesno?
Yes

tried chaging decoration to all non-oxygen deco (BII, plastik, qtcurve, tabstrip, bespin) doesn't help, border still display for new instance of all kde app.
Comment 11 Karmido 2012-01-12 01:07:59 UTC
Just tested "no border" rule for per application (konsole & dolphin), and its also got ignored, here are the rules:

[1]
Description=Settings for Konsole
clientmachine=talawengkar
clientmachinematch=0
noborder=true
noborderrule=2
title=rombeh : bash
titlematch=0
types=4294967295
wmclass=konsole
wmclasscomplete=false
wmclassmatch=1

[2]
Description=Settings for Dolphin
clientmachine=talawengkar
clientmachinematch=0
noborder=true
noborderrule=2
title=rombeh – Dolphin
titlematch=0
types=1
windowrole=dolphin#1
windowrolematch=1
wmclass=dolphin
wmclasscomplete=false
wmclassmatch=1

both new instance of konsole and dolphin ignore those rules (displaying border)
Comment 12 Thomas Lübking 2012-01-12 01:18:17 UTC
Since you keep referring to instances: does that mean if you just open a new window in the same process (press "ctrl+shift+n" in konsole) it does NOT fail?
Comment 13 Thomas Lübking 2012-01-12 01:22:06 UTC
PS: please try selecting only "Normal" window types - not all.
Comment 14 Karmido 2012-01-12 01:24:44 UTC
>Since you keep referring to instances: does that mean if you just open a new
> window in the same process (press "ctrl+shift+n" in konsole) it does NOT fail?

When I create new "no border rule" (via kcmshell), and hit "Apply" the
rules applied to an already running instance (for example: currently running konsole hiding its border),  but when I close that konsole window and start new instance, it will start with border
Comment 15 Karmido 2012-01-12 01:37:04 UTC
invoking kwin reconfigure via qdbus (qdbus org.kde.kwin /KWin org.kde.KWin.reconfigure) will also apply the rule (remove border) to already running application, but not for new instace
Comment 16 Jekyll Wu 2012-01-12 03:21:44 UTC
I recently notice similar problems when using konsole. I have always set konsole to start with no border(through kwin rules) and no menubar (through konsole itself). And now:

1. When I start konsole from yakuake, the started konsole sometimes has border, sometimes not.

2. If the started konsole doesn't have border, after I ask konsole to show its menubar, the border also appears. This happens every time.

3. If I set konsole to start WITH menubar, and when the started konsole doest't have borader, after I ask konsole to hide its menubar, the border appears! This also happens every time.

I'm using KDE built from git repo(2 or 3 days old). Here is the rule for konsole, which has worked for me for a long time until recently. 
And the problem is reproducible when using this rule in a fresh account.

[3]
Description=Konsole without border
noborder=true
noborderrule=2
types=1
wmclass=konsole
wmclasscomplete=false
wmclassmatch=2
Comment 17 Thomas Lübking 2012-01-12 06:40:59 UTC
Ok, that's really weird, but apparently showing/hiding stuff like the menu/status/toolbar in KDE applications "breaks" the noborder rule (however that might happen...)

Well, whatever it does - i can reproduce it, means i can trace it ;-)
(finishing the tabbing rewrite will have to wait)


(For my reputation: using the XBar, I usually don't experience the menu changes, but w/o XBar support konsole behaves after the start just as like with toggling it, so it's probably the same sourceand konsole etc. just trigger their menubar vis on start =)
Comment 18 Martin Flöser 2012-01-12 07:04:32 UTC
Just for the record: if you really don't want window decorations on all windows you could just disable them in the config options ;-)

[Style]
NoPlugin=true
Comment 19 Thomas Lübking 2012-01-13 15:04:38 UTC
Git commit afdbb59189c151b6eb3f201e3652801df9426899 by Thomas Lübking.
Committed on 12/01/2012 at 19:01.
Pushed by luebking into branch 'KDE/4.8'.

Don't listen to repetitive motif hints regarding the window border and prefer rules over them anyway
REVIEW: 103681
FIXED-IN: 4.8

M  +4    -4    kwin/client.cpp

http://commits.kde.org/kde-workspace/afdbb59189c151b6eb3f201e3652801df9426899
Comment 20 Thomas Lübking 2012-01-13 15:43:22 UTC
Git commit 5bd9f28ec11e2b59edaa20d9ab9f076a87464c5c by Thomas Lübking.
Committed on 12/01/2012 at 19:01.
Pushed by luebking into branch 'master'.

Don't listen to repetitive motif hints regarding the window border and prefer rules over them anyway
REVIEW: 103681
FIXED-IN: 4.8

M  +4    -4    kwin/client.cpp

http://commits.kde.org/kde-workspace/5bd9f28ec11e2b59edaa20d9ab9f076a87464c5c