When double-clicking a maximized window title, so that the windows size is restored and the mouse pointer ends up _outside_ the window it becomes impossible to move windows.
The reason is that the button_count variable is not counted down if the mouse button is released outside the window, so the button_count remains incremented even after the button is released.
This patch adds a call to wlr_seat_pointer_notify_button if the mouse button is released outside the window.
(I am a complete noob to wlroots, so be kind...)
On the drm output the wlr_drm_connector structs are reused.
This struct contains the wlr_output struct, which is reused as well.
The old code kept modes/edid and output state persistent over hotplug.
This nulls the relevant strings, reads newer edid data and removes old
modes on unplug.
This will send the button pressed event to the client. This shouldn't
be a problem since sebsequent pointer movements are not sent to the
client. Thus the client will not for example start selecting text when
it is being resized using the compositor keybindigns.
When the cursor is not over a view, wlr_seat_pointer_notify_button is
not called. However, this function does the bookkeeping of the pointer
state with regards to the number of pressed buttons. Because this
function also sends updates to the focused view, it has been moved
down, after the focus has been updated.
This handles all current transformations for outputs properly.
This ensures an output is drawn in readable orientation/flipping no
matter the actual transformations applied to it.
The backend destroy signal is emitted before the output_remove
signal is. When the destroy signal is emitted listeners remove
their output_remove listener, so the output_remove signal is never
received and listeners have an invalid output pointer.
The correct way to solve this would be to remove the output_remove
signal completely and use the wlr_output.events.destroy signal
instead. This isn't yet possible because wl_signal_emit is unsafe
and listeners cannot be removed in listeners.