mirror of
https://github.com/labwc/labwc.git
synced 2025-10-31 22:25:34 -04:00
src/cursor.c: Fix branch condition for out-of-view selecting/dragging
Instead of using the stored view for comparison use the actual surface.
Before this patch, there were situations where the branch intended for
out-of-window text selection / scrollbar dragging was used even though
the cursor never left the surface.
Partly fixes #340
Fixes #347
Backport of 6dd290afc9
This commit is contained in:
parent
ae15be8555
commit
cc0e2769d9
4 changed files with 30 additions and 17 deletions
|
|
@ -80,16 +80,19 @@ struct seat {
|
|||
struct wlr_layer_surface_v1 *focused_layer;
|
||||
|
||||
/**
|
||||
* active_view will usually be NULL and is only set on button press
|
||||
* while the mouse is over a view surface and reset to NULL on button
|
||||
* release.
|
||||
* pressed view/surface will usually be NULL and is only set on button
|
||||
* press while the mouse is over a view surface and reset to NULL on
|
||||
* button release.
|
||||
* It is used to send cursor motion events to a surface even though
|
||||
* the cursor has left the surface in the meantime.
|
||||
*
|
||||
* This allows to keep dragging a scrollbar or selecting text even
|
||||
* when moving outside of the window.
|
||||
*/
|
||||
struct view *active_view;
|
||||
struct {
|
||||
struct view *view;
|
||||
struct wlr_surface *surface;
|
||||
} pressed;
|
||||
|
||||
struct wl_client *active_client_while_inhibited;
|
||||
struct wl_list inputs;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue