Skip to content

Window scaling limits menus and maximized windows to top-left quadrant

Submitted by Alexander Sosedkin

Assigned to Olivier Fourdan @olivier

Link to original bug (#15117)

Description

Disclaimer: I have no idea what I'm doing, feel free to correct me.

When 'Window scaling' is set to 2x, two (apparently foreseen: https://bugzilla.xfce.org/show_bug.cgi?id=14566#c5) bugs manifest themselves:

  1. drop-down menus are restricted to the top-left quadrant of the screen

  2. maximized windows are restricted to the top-left quadrant of the screen

I've looked at https://git.xfce.org/xfce/xfwm4/commit/?id=07773e608413a370932c5f2d59ed0b656240970a and inferred that gdk_monitor_get_geometry returns scaled dimensions/coordinates that should be scaled back by gdk_monitor_get_scale_factor, but note that it's purely a speculation, especially for the coordinates part. Applying that multiplier to the remaining invocations of gdk_monitor_get_geometry seem to solve the problem for me.

Unfortunately, I cannot test the result with multiple monitors right now, but at least the single-monitor scenario looks good to me.

Version: 4.13.1