Bug 503046 - No way to raise a Tk root window to the front of the window stack (methods that work on other WMs / OSes fail on KDE Plasma)
Summary: No way to raise a Tk root window to the front of the window stack (methods th...
Status: RESOLVED DOWNSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: core (other bugs)
Version First Reported In: 6.1.5
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-04-20 08:23 UTC by Adrian Knagg-Baugh
Modified: 2025-04-20 08:33 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adrian Knagg-Baugh 2025-04-20 08:23:02 UTC
SUMMARY
When working with Tkinter root objects, the Tk.lift() method doesn't work. I'm trying to implement a method for re-raising a Tkinter window back to the top of the stack after it has been covered by another window in accordance with the guidance here: https://stackoverflow.com/questions/1892339/how-to-make-a-tkinter-window-jump-to-the-front
However calling root.lift() doesn't have an effect on KDE Plasma 6, and calling root.attributes('-topmost', True); sleep(1) ; root.attributes('-topmost', False) does raise the window to the front, but then it vanishes again presumably to wherever it was previously in the stack.

STEPS TO REPRODUCE
See the minimal example here: https://stackoverflow.com/questions/79404917/raise-a-window-using-tkinter-on-kde
(This isn't mine but the problem is the same.)

OBSERVED RESULT
Tkinter window does not raise to the front when lift() is called, and when the topmost attribute is removed it vanishes from the front of the stack.

EXPECTED RESULT
lift() should raise the window to the front of the stack and leave it there, as is the case with other WMs and OSes.

Not sure about the intended behaviour of removing the topmost attribute, but with lift() not working then leaving the window at the front of the stack when topmost is removed would at least provide a way of raising a window to the front of the stack.

SOFTWARE/OS VERSIONS
(available in the Info Center app, or by running `kinfo` in a terminal window)
Linux/KDE Plasma:Kubuntu 24.10
KDE Plasma Version: 6.1.5-0ubuntu1
KDE Frameworks Version: 5.116.0-0ubuntu3
Qt Version: 6.6.2
Comment 1 Bug Janitor Service 2025-04-20 08:33:36 UTC
Thank you for the bug report!

However Plasma 6.1.5 is no longer eligible for support or maintenance from KDE; supported versions are 5.27. (LTS), and 6.3 (non-LTS) or newer. Please upgrade to a supported version as soon as your distribution makes it available to you. Plasma is a fast-moving project, and bugs in one version are often fixed in the next one.

If you need support for Plasma 6.1.5, please contact your distribution, who bears the responsibility of providing support for older releases that are no longer supported by KDE.

If you can reproduce the issue after upgrading to a supported version, feel free to re-open this bug report.