]> git.sur5r.net Git - i3/i3/commit
floating_maybe_reassign_ws: use get_output_from_rect 3184/head
authorOrestis Floros <orestisf1993@gmail.com>
Sat, 17 Mar 2018 18:43:11 +0000 (20:43 +0200)
committerOrestis Floros <orestisf1993@gmail.com>
Fri, 23 Mar 2018 15:42:39 +0000 (17:42 +0200)
commit8e9b26fc9028d19b4756bd8e3ed3a3ecfcf5fd6f
tree4d1615a4a6eab2661d196657f1a187a5166b0bec
parent128122e7663a5a1f38bd8f921ecaef55ff2a4b13
floating_maybe_reassign_ws: use get_output_from_rect

This significantly reduces the number of ELOGs while dragging floating
containers. The behaviour is improved since floating containers in the
edge of the screen will still get reassigned to their closest workspace.

For example, consider this setup:
fake-outputs 500x500+0+0,500x500+500+0

Now, open a window in the right output and run:
i3-msg floating enable, move position 0 px 450 px
The window is on the bottom edge of the left workspace but if you run:
i3-msg focus mode_toggle
focus will go to the right workspace since floating_maybe_reassign_ws
didn't change the assigned workspace of the floating container.
src/floating.c