mate-desktop / mate-panel

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

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

Closed lukefromdc closed 1 year ago

lukefromdc commented 1 year ago

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

raveit65 commented 1 year 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 1 year ago

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

raveit65 commented 1 year 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 1 year 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 1 year 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