Bug 399347 - KoPopup Button sometimes pops popup widget up on the wrong monitor
Summary: KoPopup Button sometimes pops popup widget up on the wrong monitor
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Usability (other bugs)
Version First Reported In: git master (please specify the git hash!)
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords: multiscreen
: 399164 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-10-03 17:32 UTC by David REVOY
Modified: 2026-02-03 16:07 UTC (History)
4 users (show)

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


Attachments
[^ Photo of the bug ] (92.33 KB, image/jpeg)
2018-10-03 17:32 UTC, David REVOY
Details
Screenshot monitor setup (994.08 KB, image/png)
2018-10-09 10:38 UTC, Gremriel
Details
Second screenshot (994.23 KB, image/png)
2018-10-09 10:39 UTC, Gremriel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David REVOY 2018-10-03 17:32:44 UTC
Created attachment 115391 [details]
[^ Photo of the bug ]

Hi,

In a multi monitor environment, when clicking on the little arrow next to the Mirror buttons in the top-toolbar, the option panel appears on the wrong monitor (photo in attachement).

This is a bug found by Gremriel on IRC using multi-monitor setup on Windows 10 with a GTX1070ti. I was able to reproduce it on git~master with Kubuntu 18.04.1 and Nvidia proprietary driver.
Comment 1 Gremriel 2018-10-04 11:36:09 UTC
This happens also with the options of the Brush preset Selector in the toolbar.
Comment 2 Halla Rempt 2018-10-09 09:32:05 UTC
I wonder how the monitors are configured: with my current multimonitor setup I cannot reproduce this. The weird thing is, we actually have code to ensure the popup widget is inside the screen of the popup button, so maybe it's Qt's desktop calcualtion that's off.
Comment 3 Gremriel 2018-10-09 10:38:16 UTC
Created attachment 115503 [details]
Screenshot monitor setup

Here's a screenshot of my monitor setup.
Comment 4 Gremriel 2018-10-09 10:39:02 UTC
Created attachment 115504 [details]
Second screenshot
Comment 5 Halla Rempt 2018-10-09 12:43:13 UTC
*** Bug 399164 has been marked as a duplicate of this bug. ***
Comment 6 David REVOY 2018-10-10 05:17:20 UTC
The setup I have to reproduce this bug is:
+-------------------+
|         |         |
|  1080p  |  1080p  |
|  lcd    |  lcd    |
+-------------------+
|         |
|  1080p  |
|  cintiq |
+---------+

I couldn't reproduce the bug with a dual-screen setup like:
+-------------------+
| (clone) |         |
|  1080p  |  1080p  |
|lcd+cntiq|  lcd    |
+-------------------+

Watching the screenshot of @Gremriel sent; it feels the bug appears with multi-monitor not really filling a rectangular area. With an unused part. For mine:
+-----------------------+
|    3840x2160 area     |
| +-------------------+ |
| |         |         | |
| |  1080p  |  1080p  | |
| |  lcd    |  lcd    | |
| +-------------------+ |
| |         |xxxxxxxxxx |
| |  1080p  |xxxnonxxxx |
| |  cintiq |xxxusedxxx |
| +---------+xxxxxxxxxx |
|                       |
+-----------------------+

In the bug triage livestreaming, you mention it might be a Qt support of multi-screen issue. Yes, probably. 
(PS:I hope my little ascii art will be well displayed.)
Comment 7 Gremriel 2018-10-10 07:39:00 UTC
If I move the Cintiq to the right of the main monitor, the options popup stays on the Cintiq.
Comment 8 Dmitry Kazakov 2024-08-22 16:39:17 UTC
Remove triaged keyword from CONFIRMED bugs
Comment 9 Bug Janitor Service 2026-02-01 12:05:13 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/2629
Comment 10 Dmitry Kazakov 2026-02-03 13:31:17 UTC
Git commit 75691f8664c8172cbaff5e784f18062003ec5ec3 by Dmitry Kazakov, on behalf of Carsten Hartenfels.
Committed on 03/02/2026 at 13:28.
Pushed by dkazakov into branch 'master'.

Fix KisPopupButton popups showing on wrong screen

By making them fall back to the monitor that the button is on when the
frame doesn't have a monitor set, rather than throwing them to the
primary monitor.

M  +16   -10   libs/widgetutils/KisPopupButton.cpp

https://invent.kde.org/graphics/krita/-/commit/75691f8664c8172cbaff5e784f18062003ec5ec3
Comment 11 David REVOY 2026-02-03 15:12:25 UTC
Thank you very much Dmitry and Carsten!
Comment 12 Dmitry Kazakov 2026-02-03 16:07:14 UTC
Git commit 68f310e5215bc4898a394bcb003ac2e6fa02ee0e by Dmitry Kazakov, on behalf of Carsten Hartenfels.
Committed on 03/02/2026 at 16:06.
Pushed by dkazakov into branch 'krita/6.0'.

Fix KisPopupButton popups showing on wrong screen

By making them fall back to the monitor that the button is on when the
frame doesn't have a monitor set, rather than throwing them to the
primary monitor.

M  +16   -10   libs/widgetutils/KisPopupButton.cpp

https://invent.kde.org/graphics/krita/-/commit/68f310e5215bc4898a394bcb003ac2e6fa02ee0e