Bug 191114 - wrong window-state-event produced when in minimized + hidden state
Summary: wrong window-state-event produced when in minimized + hidden state
Status: RESOLVED INTENTIONAL
Alias: None
Product: kwin
Classification: Plasma
Component: compatibility (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-30 08:27 UTC by Damanjit Singh
Modified: 2023-07-06 11:04 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
sample gtk app (29.75 KB, application/octet-stream)
2009-04-30 08:33 UTC, Damanjit Singh
Details
Source code for the attached sample app. (3.04 KB, text/plain)
2009-04-30 08:34 UTC, Damanjit Singh
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Damanjit Singh 2009-04-30 08:27:00 UTC
Version:            (using KDE 4.1.3)
Compiler:          gcc 4.3.2 
OS:                Linux
Installed from:    SuSE RPMs

Follow these steps on any window (in KDE env with desktop effects ON) - 
1. Minimize the window
2. Hide the window (gtk_widget_hide)
3. Show the window (gtk_widget_show)

Observe the window-state-events produced.

For the step 3 we get 3 state change events (when only one was expected)
we get - 
state change from 3 to 2              // This is correct and expected
then, state change from 2 to 0        // This was not expected (wrong)
and gain, state change from 0 to 2    // This was not expected (wrong)
Comment 1 Damanjit Singh 2009-04-30 08:33:20 UTC
Created attachment 33233 [details]
sample gtk app

Sample gtk app to demostrate the bug. 
1. Run the app - (will show two windows - " Hello" and "World")
2. Minimize the "World" window
3. click hide button on the "Hello" window
4. click show button on the "World" window
5. Observe the state change events Produced (on console)
Comment 2 Damanjit Singh 2009-04-30 08:34:38 UTC
Created attachment 33234 [details]
Source code for the attached sample app.

Source code for the attached sample app.
Comment 3 FiNeX 2009-04-30 14:10:15 UTC
Could this report be moved to kdelibs or kwin product?
Comment 4 Thomas Lübking 2012-04-11 22:12:13 UTC
Sorry for the late reply.

No idea why this is set "HI" but it's a tricky one.

The reason is that setupCompositing() in manage() is called before the desktop (and activity) is assigned.
As a result updateVisibility() will call internalKeep().

@Damanjit
Why is this an issue?
Comment 5 Justin Zobel 2021-03-10 00:12:43 UTC
Thank you for the bug report.

As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists.

If this bug is no longer persisting or relevant please change the status to resolved.