-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix multi-screen menu pop-up location
According to f8cf17166c9af147f0b8fea72f5b4a8a6098a5d7 When QT_SCALE_FACTOR is greater than 1, the Popup menu pops up incorrectly on the second screen. Replace the toNativePixels with toNativeLocalPosition. Issue: linuxdeepin/developer-center#9747
- Loading branch information
Showing
3 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
qt6-declarative (6.6.1+dfsg-1deepin7) unstable; urgency=medium | ||
|
||
* Fix multi-screen menu pop-up location | ||
- deepin-0008-Fix-multi-screen-menu-popup-location.patch | ||
|
||
-- Lu YaNing <[email protected]> Mon, 19 Aug 2024 19:51:25 +0800 | ||
|
||
qt6-declarative (6.6.1+dfsg-1deepin6) unstable; urgency=medium | ||
|
||
* Import patch from upstream: | ||
|
29 changes: 29 additions & 0 deletions
29
debian/patches/deepin-0008-Fix-multi-screen-menu-popup-location.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
From 39ee31cc09ce1f0084f84aaa0596adb2d578af3b Mon Sep 17 00:00:00 2001 | ||
From: Lu YaNing <[email protected]> | ||
Date: Fri, 09 Aug 2024 17:42:02 +0800 | ||
Subject: [PATCH] Fix multi-screen menu pop-up location | ||
|
||
According to f8cf17166c9af147f0b8fea72f5b4a8a6098a5d7 | ||
|
||
When QT_SCALE_FACTOR is greater than 1, the Popup menu pops up | ||
incorrectly on the second screen. | ||
|
||
Replace the toNativePixels with toNativeLocalPosition. | ||
|
||
Fixes: QTBUG-127906 | ||
Pick-to: 6.5 6.7 6.8 | ||
Change-Id: Id320063afccfd3a391426bc6419cbe8855c57b98 | ||
|
||
Index: qt6-declarative-6.6.1+dfsg/src/labs/platform/qquicklabsplatformmenu.cpp | ||
=================================================================== | ||
--- qt6-declarative-6.6.1+dfsg.orig/src/labs/platform/qquicklabsplatformmenu.cpp | ||
+++ qt6-declarative-6.6.1+dfsg/src/labs/platform/qquicklabsplatformmenu.cpp | ||
@@ -695,7 +695,7 @@ void QQuickLabsPlatformMenu::open(QQmlV4 | ||
#endif | ||
} | ||
m_handle->showPopup(window, | ||
- QHighDpi::toNativePixels(targetRect, window), | ||
+ QHighDpi::toNativeLocalPosition(targetRect, window), | ||
menuItem ? menuItem->handle() : nullptr); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters