Cloudef / bemenu

Dynamic menu library and client program inspired by dmenu
GNU General Public License v3.0
1.24k stars 96 forks source link

Focused output uses incorrect scale on multi monitors #191

Open fancycade opened 3 years ago

fancycade commented 3 years ago

This is an issue that came up when working on a fix for #102.

As stated before:

The rendered output wont properly have scaling in the case where the monitor/screens have different resolutions #102 (comment), see point 2.

Still have to figure out which output is being used so as not to overwrite its scale with the other output scale.

The compositor chooses which output to display bemenu on but bemenu sets the scale.

The scaled is determined by whichever output comes first in the outputs list.

Ideally it would be possible to query the compositor which output is "focused", but the protocol doesn't seem to support this. There are also

bemenu-run --monitor=all works fine, the issue is only when a single monitor is "focused" when monitors are plugged in.

fancycade commented 3 years ago

Here is a decent work around on sway:

bemenu-run -m $(swaymsg -r -t get_outputs | jq -r '. [] | select (.focused == true) | .name')

Slightly modified version of this script