From 5110b813ca5687b774c08307e6c4ca6f8561d3e9 Mon Sep 17 00:00:00 2001 From: dabberoo <223900966+dabberoo@users.noreply.github.com> Date: Thu, 28 May 2026 23:40:26 +0000 Subject: [PATCH] Workaround to get Prompt Popups working on KDE Plasma --- edgeware/src/os_utils/linux.py | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/edgeware/src/os_utils/linux.py b/edgeware/src/os_utils/linux.py index 02d31b05..47e43206 100644 --- a/edgeware/src/os_utils/linux.py +++ b/edgeware/src/os_utils/linux.py @@ -27,6 +27,7 @@ import mpv from config import load_default_config from paths import CustomAssets, Process +from features.prompt import Prompt from os_utils.linux_utils import find_get_wallpaper_command, find_set_wallpaper_commands, find_set_wallpaper_function, get_desktop_environment @@ -34,14 +35,30 @@ def close_mpv(player: mpv.MPV) -> None: player.stop() - def set_borderless(window: Toplevel) -> None: + if get_desktop_environment() == "kde": - window.attributes("-type", "splash") + # windows that use overrideredirect(true) can't take focus (https://core.tcl-lang.org/tk/artifact/7892c68f49012d2d71222ae0e312a1e7dc69a801?txt=1&ln=51-64) + # so prompt windows need to be treated as a special case + if isinstance(window, Prompt): + + window.title("PROMPT") + + # remove min, max and close buttons + window.attributes("-type", "toolbar") + + window.resizable(False, False) + + return + + # below needed to ensure popups can have transparency + window.attributes("-type", "splash") - if get_desktop_environment() == "kde": # below needed to ensure popups remain on top in KDE Plasma window.overrideredirect(True) + else: + window.attributes("-type", "splash") + def set_clickthrough(window: Toplevel) -> None: