Bug 271925

Summary: Add activity settings in window rules
Product: [Plasma] kwin Reporter: Florent Guiliani <florent>
Component: generalAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: wishlist CC: chanika, eugene.shalygin+bugzilla.kde, scarpino
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Florent Guiliani 2011-04-28 15:36:00 UTC
Version:           unspecified (using KDE 4.6.2) 
OS:                Linux

You can force many things through the window rules like position, size, desktop number, etc... but you cannot assign the window to an activity.

I'd need this feature to force the activity of certain windows that kwin is unable to remember their activity automatically.

Reproducible: Didn't try

Steps to Reproduce:
This happens with the tool windows of eclipse for example. Start eclipse and drag the tool windows out of the main eclipse window into standalone windows. Assign an activity to every window, save your eclipse perspective and restart eclipse.

Actual Results:  
The tool windows will not have their activity remembered.

Expected Results:  
Be able to force the activity through a window rule.

Eclipse isn't Kwin friendly because every window get the same type and the same class. Thus Kwin isn't able to remember the settings of the different windows automatically. You have to use the window rules settings to workaround the eclipse bad behavior.
Comment 1 Thomas Lübking 2011-04-28 18:41:49 UTC
Not sure whether this needs a kwin rule, since activities are a KDE feature - maybe this can be _really_ fixed then (invoking the title?) -> adding Chani

@Florent:
please do "xprop | grep -i window_type" on the eclipse windows - it's hard to believe that tool windows have the same window type. If tehy do you'll have a hard time using the rules unless you've eg. got a fix title on at least one of them...
Comment 2 Florent Guiliani 2011-04-29 09:59:22 UTC
The window type is different indeed. The tool windows are "_NET_WM_WINDOW_TYPE_DIALOG" and the main window is "_NET_WM_WINDOW_TYPE_NORMAL".

I'm already using a window rule to detect the tool windows and remove the borders.

The issue is that kwin will not remember the activity that I've set manually for the tool windows. It does work for the main window after a restart but I have to reset the activity manually for the tool windows every time I restart eclipse.

A window rule to force the activity would solve this problem.
Comment 3 Thomas Lübking 2011-05-01 01:03:28 UTC
Stupid question: does this actually mean you want the main window on one activity, but the tool window on another and not on the one with the main window?

In case: try "xprop | grep -i transient" on the toolwindow.
If it says "WM_TRANSIENT_FOR(WINDOW): window id # <some_id_herr>" it's pretty clear why this doesn't work.

Now, i don't claim to have fully understood the activity thing, but if i did (a bit) it's pretty intentional that you cannot have transient clients and their leaders on different activities at all... you /are/ talking about activities and not about good old plain virtual desktops, are you?
Comment 4 Florent Guiliani 2011-05-04 09:58:47 UTC
(In reply to comment #3)
> Stupid question: does this actually mean you want the main window on one
> activity, but the tool window on another and not on the one with the main
> window?


No. I want all windows in the same activity. The issue is: when I restart eclipse, the toolwindow's activity is lost. Only the mainwindow's activity keep its activity settings after a restart. That's why I'd like to work around the problem by forcing the activity of the toolwindow's activity through a window rule.


> 
> In case: try "xprop | grep -i transient" on the toolwindow.
> If it says "WM_TRANSIENT_FOR(WINDOW): window id # <some_id_herr>" it's pretty
> clear why this doesn't work.


Indeed the toolwindows have "WM_TRANSIENT_FOR(WINDOW): window id # 0x4c00096". Now that doesn't tell me why the activity settings doesn't survive to a restart.


> 
> Now, i don't claim to have fully understood the activity thing, but if i did (a
> bit) it's pretty intentional that you cannot have transient clients and their
> leaders on different activities at all... you /are/ talking about activities
> and not about good old plain virtual desktops, are you?


Yes I am talking about activities. I do *not* want a different activity between the different eclipse's windows. I *do* want the same activity for all windows. The problem is that I have to manually reset the toolwindow activity settings after each restart. The main window keep correctly its settings but the toolwindow doesn't.

Hopes it helps to understand the issue.
Comment 5 Eugene Shalygin 2011-12-22 13:01:10 UTC
I would also want to have this feature.
My use-case is chats windows which I want to see in every activity. Now I have to set this option every time when telepathy opens a window.
Comment 6 Martin Flöser 2012-03-13 21:47:13 UTC

*** This bug has been marked as a duplicate of bug 285055 ***
Comment 7 Thomas Lübking 2012-04-17 11:34:11 UTC
*** Bug 298291 has been marked as a duplicate of this bug. ***