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

--- Comment #2 from Kunshan Wang <wks1...@gmail.com> ---
Created attachment 167011
  --> https://bugs.kde.org/attachment.cgi?id=167011&action=edit
Task Manager, Global Menu and pop-up window

I also noticed that when the global menu disappears, the current window is also
not marked as active in the task manager.

I generated a new C++ KDE project with a main window, a toolbar and a main menu
from a template in KDevelop, and added a few lines to the signal handler of a
toolbar item to pop up a window.

```
    QTimer::singleShot(200, this, [this]() {
            KMessageBox::information(this, i18n("Congratulations, you have
solved board"));
    });
```

The pop-up window from `KMessageBox::information` does not appear on the task
manager.  When the window pops up, two things may non-deterministically happen
to the task manager (See the screen recording in the attachment)

1.  The task manager still highlights the main window as the active task. 
(This happens the first time I clicked the toolbar in the video)
2.  The task manager does not highlight *any* window as active. (This happens
the second time I clicked the toolbar in the video)

In the first case, the Global Menu applet still shows the menu of the main
window; in the second case, the Global Menu applet disappears.

I think the connection between the Task Manager and the Global Menu applet is
that the Global Menu applet uses the `TaskManager::TasksModel` (in
libtaskmanager) to determine the active window.  So if a glitch happens in the
Task Manager, the Global Menu is affected, too.

I also suspect that if a window does not appear in the TaskManager but still
has a MenuBar widget, the Global Menu widget will not work for that window even
if the window has focus.  I haven't confirmed it, yet.

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

Reply via email to