For -m, only get monitor info when creating and remapping

Previously, if the dropdown was unmapped from another monitor and then
remapped on that monitor, the dropdown would not be resized since the
unmapping would change the stored "last_monitor".
long-opts
noctuid 9 years ago
parent 0a222a6ce0
commit a5bd168ce4

12
tdrop

@ -513,6 +513,11 @@ wid_toggle() {
else else
map_pre_command "$term" map_pre_command "$term"
fi fi
# update here so this doesn't cause a delay
# between the window being remapped and resized
if $multiple_monitors; then
update_geometry_settings_for_monitor
fi
if ! $combine_map_post; then if ! $combine_map_post; then
xdotool windowmap "$wid" xdotool windowmap "$wid"
map_post_command "$wid" map_post_command "$wid"
@ -532,6 +537,10 @@ wid_toggle() {
xdotool windowunmap "$wid" xdotool windowunmap "$wid"
fi fi
else else
# necessary to deal with negative width or height
if $multiple_monitors; then
update_geometry_settings_for_monitor
fi
# make it # make it
map_pre_command "$term" map_pre_command "$term"
local wid local wid
@ -698,9 +707,6 @@ if [[ -n $1 ]]; then
elif [[ $term == auto_show ]]; then elif [[ $term == auto_show ]]; then
auto_show auto_show
else else
if $multiple_monitors; then
update_geometry_settings_for_monitor
fi
wid_toggle wid_toggle
fi fi
else else

Loading…
Cancel
Save