https://bugs.kde.org/show_bug.cgi?id=417535

            Bug ID: 417535
           Summary: Pressing Alt-F4 breaks show/hide
           Product: yakuake
           Version: 3.0.5
          Platform: Debian stable
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: h...@kde.org
          Reporter: nicolas.alva...@gmail.com
  Target Milestone: ---

If I press Alt-F4 on the Yakuake window, Yakuake stays running, but the toggle
key doesn't work anymore. There's no way to make yakuake show/hide anymore.

STEPS TO REPRODUCE
1. Yakuake configured like this: show on all desktops, keep open when losing
focus, use open/retract to focus window. I don't know if all these settings
matter, but I include them for consistency in the reproducing steps.
2. Open yakuake window and focus it.
3. Press Alt-F4. The Yakuake window instantly disappears, with no animation.
4. Press F12 (or whatever you have as toggle shortcut). Yakuake reveals again,
with all sessions still there, so it didn't quit.
5. Press F12 again. Yakuake doesn't hide. If open but unfocused, F12 is
supposed to focus it again (given settings in step 1), but that doesn't happen
either. F12 doesn't do anything anymore in any state.

I have investigated this, and it looks like after Alt-F4, the X window ID
changes (maybe a new window is created?). This can be confirmed with xwininfo
after step 2 and after step 4. KWindowSystem::activeWindow() will return the
real new ID of the window, but MainWindow::winId() still returns the old ID, as
if Qt didn't notice the ID changed. Since activeWindow() == winId() is now
never true, Yakuake thinks it's never focused so it doesn't hide. It also gives
the wrong ID to activateWindow so it doesn't focus.

(I managed to fix a running instance and save myself from restarting my zillion
tabs by setting mainWindow->data->winid in QWidget's private fields to the
correct ID with gdb)

I'm not sure what the *correct* behavior of Alt-F4 would be though. Warn user
about multiple tabs and then quit app, like Konsole? Hide window as if with
F12, letting the user open it again? Ignore it altogether?


SOFTWARE/OS VERSIONS
OS: Debian Buster
KDE Plasma Version: 5.11.5
KDE Frameworks Version: 5.54.0
Qt Version: 5.11.3
xcb platform

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to