mate-desktop / mate-panel

MATE panel
https://mate-desktop.org
GNU General Public License v2.0
183 stars 115 forks source link

Hidpi x11: center panel force-quit popup window #1405

Closed lukefromdc closed 9 months ago

lukefromdc commented 9 months ago

Center the force-quit dialog on x11 on hidpi displays. Stop it from running off the bottom right corner

raveit65 commented 9 months ago

I see no different with the placement of the right click popup when applet is at top panel with hidpi. What is the problem? What is the goal?

lukefromdc commented 9 months ago

Thanks, right click menu was fine, but the left click popup window was what was off to the left.

raveit65 commented 9 months ago

Yeap, in a second test i saw that the popup was out of monitor area without PR. With 2 monitors the popup is exactly between the monitors or in the middle of entire resolution , which is a bit weird. But it is like it should now.

lukefromdc commented 9 months ago

Still a slight offset with two dissimilar monitors (a 4K and a 1080p) but not by much. Fix for that would be to stop using GdkScreen (there is only one and it spans all monitors) and get the monitor the panel is on and center it on that using gdk_monitor_get_geometry ()

lukefromdc commented 9 months ago

See follow-on PR https://github.com/mate-desktop/mate-panel/pull/1407 which fixes the multimonitor case by using the monitor (one monitor) and not the screen (covers all monitor) to center the popup and has the further advantage that gdk_monitor_get_geometry() returns already scaled pixels