This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Window rule works for one window, does not work for another

Tags: None
(comma "," separated)
Piotr Dobrogost
Registered Member
Posts
37
Karma
0
Hi!

I'm using PyCharm Python IDE (written in Java) and I made window rule with keyboard shortcut. When I click Detect Window Properties the window class is jetbrains-pycharm (sun-awt-X11-XFramePeer jetbrains-pycharm) and window type is Normal Window. In the rule, in Window class (application) I chose Substring Match and in the edit field I put pycharm. I also left all window types selected. However this rule is not triggered (There's no information about keyboard shortcut in curly braces in window's title). What's strange is that when PyCharm starts there's dialog (Tip of the day) and the window rule is triggered for it. I thought maybe this dialog window steals shortcut from the main window but when I disabled showing Tip of the day dialog the main window still doesn't get shortcut. In addition if I open the second window from within PyCharm, the window rule is triggered for this new window. Why doesn't the window rule work for initial PyCharm's window?

Last edited by Piotr Dobrogost on Tue Nov 03, 2015 10:06 am, edited 1 time in total.
luebking
Karma
0
Sounds as if the rule is set to "apply initially", the forced rule is invalidly not re-matched (does the rule apply on restarting pycharm?) or pycharm illegally alters its window class after mapping the first window. (But even then, a forced rule should be applied on setting the rule)

Can you export and paste the rule somehwhere?
Piotr Dobrogost
Registered Member
Posts
37
Karma
0
luebking wrote:Sounds as if the rule is set to "apply initially", the forced rule is invalidly not re-matched (does the rule apply on restarting pycharm?) or pycharm illegally alters its window class after mapping the first window. (But even then, a forced rule should be applied on setting the rule)

Can you export and paste the rule somehwhere?


The rule does not apply on restarting pycharm.
Was trying both "Forced" and "Apply Initially" with the same result.
What is supposed to happen when another window is being opened which matches a rule which has already been matched by existing window?

The exported rule:

Code: Select all
[Settings for jetbrains-pycharm]
Description=Settings for jetbrains-pycharm
clientmachine=demon.internal.local
clientmachinematch=0
shortcut=Meta+F9
shortcutrule=2
title=client - [~/projects/test] - local.ini - PyCharm 4.5.4
titlematch=0
wmclass=pycharm
wmclasscomplete=false
wmclassmatch=2
luebking
Karma
0
Once a shortcut is taken by a window, the rules will *not* steal it to another window.

The rule itself looks fine - can you apply other settings by it (eg. keep the window above etc)?
Piotr Dobrogost
Registered Member
Posts
37
Karma
0
luebking wrote:The rule itself looks fine - can you apply other settings by it (eg. keep the window above etc)?


Yes, I can – I managed to apply opacity.

luebking wrote:Once a shortcut is taken by a window, the rules will *not* steal it to another window.


After reading this I immediately thought about... splash screen which is shown first. Fair enough when I modified rule to apply only to Normal Window window type the main window got its shortcut. Problem solved – thank you.

However, it does not explain why The tip of the day dialog and the second window opened from within PyCharm have been getting shortcut...
luebking
Karma
0
The splashscreen is probably not fully unmapped (kglobalaccel didn't yet discard the shortcut at least) when the main window shows up (doesn't explain why it's not applied when initially creating the rule)


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot]