Bug 360140 - Deleted uses the direct window type, but doesn't perform hack resolutions
Summary: Deleted uses the direct window type, but doesn't perform hack resolutions
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: core (show other bugs)
Version: 5.5.5
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-05 19:48 UTC by Max Schettler
Modified: 2019-02-15 09:31 UTC (History)
1 user (show)

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


Attachments
Support information (5.33 KB, text/plain)
2016-03-13 22:46 UTC, Max Schettler
Details
kwinrc (3.18 KB, text/plain)
2016-03-13 23:04 UTC, Max Schettler
Details
Support information (updated) (5.36 KB, text/plain)
2016-03-13 23:13 UTC, Max Schettler
Details
Urxvt xprop (1.50 KB, text/plain)
2016-03-14 22:48 UTC, Max Schettler
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Max Schettler 2016-03-05 19:48:21 UTC
The fall apart effect is not working

Reproducible: Always

Steps to Reproduce:
1. Enable the "Fall apart" effect (in the Desktop effects menu)
2. Close a window

Actual Results:  
Window closes normaly

Expected Results:  
The window should be falling apart
Comment 1 Thomas Lübking 2016-03-05 20:09:44 UTC
please attach the output of
   qdbus org.kde.KWin /KWin supportInformation
Comment 2 Max Schettler 2016-03-13 22:46:59 UTC
Created attachment 97875 [details]
Support information
Comment 3 Thomas Lübking 2016-03-13 23:02:36 UTC
The effect isn't loaded - can you please attach ~/.config/kwinrc
Comment 4 Max Schettler 2016-03-13 23:04:36 UTC
Created attachment 97876 [details]
kwinrc
Comment 5 Thomas Lübking 2016-03-13 23:10:20 UTC
The effect is not configured to be enabled ...
What happens if you configure it by "kcmshell5 kwineffects" and does the checkbox reflect the assumed state?
Comment 6 Max Schettler 2016-03-13 23:13:04 UTC
Created attachment 97877 [details]
Support information (updated)
Comment 7 Max Schettler 2016-03-13 23:13:33 UTC
I'm sorry, I forgot to reenable the effect. I updated the support information.
Comment 8 Max Schettler 2016-03-13 23:32:25 UTC
Update: the effect is working on some windows, it works for example for firefox, the settings panel and d-feet. rxvt-unicode however does not use the effect.
Also, it is triggered twice for the windows with which it works.
Comment 9 Martin Flöser 2016-03-14 15:41:30 UTC
can you please provide the xprop output of a window where it doesn't work?
Comment 10 Thomas Lübking 2016-03-14 21:36:40 UTC
The bug goes a tiny little bit beyond the effect ;-)

commit fec2b6310282d9ca11d21b5ea66e2f3243ef1825
Author: Martin Gräßlin <mgraesslin@kde.org>
Date:   Wed Mar 4 08:26:57 2015 +0100

    Copy NET::WindowType to Deleted
    
    This was suggested to be done in a comment. The existing code might
    have returned incorrect results for Client. So let's get the primary
    window type and use that one.


I think the patch is wrong and terribly misgot the comment - the idea was likely to copy over the *indirect* type, ie. Normal if it's unknown and not a transient etc. (and urxvt doesn't seem to support NETWM)

This fixes it:
--------------------

diff --git a/deleted.cpp b/deleted.cpp
index 5e0225f..e784bd1 100644
--- a/deleted.cpp
+++ b/deleted.cpp
@@ -84,7 +84,7 @@ void Deleted::copyToDeleted(Toplevel* c)
     m_layer = c->layer();
     m_frame = c->frameId();
     m_opacity = c->opacity();
-    m_type = c->windowType(true);
+    m_type = c->windowType();
     m_windowRole = c->windowRole();
     if (WinInfo* cinfo = dynamic_cast< WinInfo* >(info))
         cinfo->disable()
Comment 11 Max Schettler 2016-03-14 22:47:22 UTC
Glad to see there is some issue resolved in the core code now, I just stumbled upon this issue while trying some settings.
I don't think it's need anymore but I attached the xprop of a urxvt window anyway.
Will the fix also resolve the effect being applied twice?
Comment 12 Max Schettler 2016-03-14 22:48:37 UTC
Created attachment 97901 [details]
Urxvt xprop
Comment 13 Thomas Lübking 2016-03-14 22:57:06 UTC
I could not reproduce any double invocation.

Does it remain if you disable:

kwin4_effect_fade
blur
contrast
Comment 14 Max Schettler 2016-03-14 23:01:04 UTC
Disabling those extensions (I just used fade from the kcmkwin assuming it is kwin4_effect_fade) makes the effect appear only once and in full length (which it didn't before, it was two times very quick and short).
Comment 15 Vlad Zahorodnii 2019-02-15 09:31:43 UTC
Deleted copies indirect window type.

> it is triggered twice for the windows with which it works.

To me, it looks like a conflict between several effects, which shouldn't be the case anymore.