mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-18 22:44:50 +02:00
Wayland GNOME: Workaround bug in mutter causing double tap on titlebar to not always work
Fixes #8054
This commit is contained in:
@@ -91,6 +91,8 @@ Detailed list of changes
|
|||||||
|
|
||||||
- Discard OSC 9 notifications that start with :code:`4;` because some misguided software is using it for "progress reporting" (:iss:`8011`)
|
- Discard OSC 9 notifications that start with :code:`4;` because some misguided software is using it for "progress reporting" (:iss:`8011`)
|
||||||
|
|
||||||
|
- Wayland GNOME: Workaround bug in mutter causing double tap on titlebar to not always work (:iss:`8054`)
|
||||||
|
|
||||||
0.37.0 [2024-10-30]
|
0.37.0 [2024-10-30]
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
|||||||
12
glfw/wl_client_side_decorations.c
vendored
12
glfw/wl_client_side_decorations.c
vendored
@@ -759,6 +759,7 @@ handle_pointer_leave(_GLFWwindow *window, struct wl_surface *surface) {
|
|||||||
}
|
}
|
||||||
#undef c
|
#undef c
|
||||||
decs.focus = CENTRAL_WINDOW;
|
decs.focus = CENTRAL_WINDOW;
|
||||||
|
decs.dragging = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -768,7 +769,11 @@ handle_pointer_move(_GLFWwindow *window) {
|
|||||||
switch (decs.focus)
|
switch (decs.focus)
|
||||||
{
|
{
|
||||||
case CENTRAL_WINDOW: break;
|
case CENTRAL_WINDOW: break;
|
||||||
case CSD_titlebar: if (update_hovered_button(window)) cursorShape = GLFW_POINTER_CURSOR; break;
|
case CSD_titlebar: {
|
||||||
|
if (decs.dragging) {
|
||||||
|
if (window->wl.xdg.toplevel) xdg_toplevel_move(window->wl.xdg.toplevel, _glfw.wl.seat, _glfw.wl.pointer_serial);
|
||||||
|
} else if (update_hovered_button(window)) cursorShape = GLFW_POINTER_CURSOR;
|
||||||
|
} break;
|
||||||
case CSD_shadow_top: cursorShape = GLFW_N_RESIZE_CURSOR; break;
|
case CSD_shadow_top: cursorShape = GLFW_N_RESIZE_CURSOR; break;
|
||||||
case CSD_shadow_bottom: cursorShape = GLFW_S_RESIZE_CURSOR; break;
|
case CSD_shadow_bottom: cursorShape = GLFW_S_RESIZE_CURSOR; break;
|
||||||
case CSD_shadow_left: cursorShape = GLFW_W_RESIZE_CURSOR; break;
|
case CSD_shadow_left: cursorShape = GLFW_W_RESIZE_CURSOR; break;
|
||||||
@@ -789,6 +794,7 @@ handle_pointer_enter(_GLFWwindow *window, struct wl_surface *surface) {
|
|||||||
all_surfaces(Q)
|
all_surfaces(Q)
|
||||||
#undef Q
|
#undef Q
|
||||||
decs.focus = CENTRAL_WINDOW;
|
decs.focus = CENTRAL_WINDOW;
|
||||||
|
decs.dragging = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -816,9 +822,7 @@ handle_pointer_button(_GLFWwindow *window, uint32_t button, uint32_t state) {
|
|||||||
decs.maximize.hovered = false; decs.titlebar_needs_update = true;
|
decs.maximize.hovered = false; decs.titlebar_needs_update = true;
|
||||||
} else if (decs.close.hovered) _glfwInputWindowCloseRequest(window);
|
} else if (decs.close.hovered) _glfwInputWindowCloseRequest(window);
|
||||||
}
|
}
|
||||||
if (!has_hovered_button(window)) {
|
decs.dragging = !has_hovered_button(window);
|
||||||
if (window->wl.xdg.toplevel) xdg_toplevel_move(window->wl.xdg.toplevel, _glfw.wl.seat, _glfw.wl.pointer_serial);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case CSD_shadow_left: edges = XDG_TOPLEVEL_RESIZE_EDGE_LEFT; break;
|
case CSD_shadow_left: edges = XDG_TOPLEVEL_RESIZE_EDGE_LEFT; break;
|
||||||
case CSD_shadow_upper_left: edges = XDG_TOPLEVEL_RESIZE_EDGE_TOP_LEFT; break;
|
case CSD_shadow_upper_left: edges = XDG_TOPLEVEL_RESIZE_EDGE_TOP_LEFT; break;
|
||||||
|
|||||||
2
glfw/wl_platform.h
vendored
2
glfw/wl_platform.h
vendored
@@ -221,7 +221,7 @@ typedef struct _GLFWwindowWayland
|
|||||||
} pointerLock;
|
} pointerLock;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
bool serverSide, buffer_destroyed, titlebar_needs_update;
|
bool serverSide, buffer_destroyed, titlebar_needs_update, dragging;
|
||||||
_GLFWCSDSurface focus;
|
_GLFWCSDSurface focus;
|
||||||
|
|
||||||
_GLFWWaylandCSDSurface titlebar, shadow_left, shadow_right, shadow_top, shadow_bottom, shadow_upper_left, shadow_upper_right, shadow_lower_left, shadow_lower_right;
|
_GLFWWaylandCSDSurface titlebar, shadow_left, shadow_right, shadow_top, shadow_bottom, shadow_upper_left, shadow_upper_right, shadow_lower_left, shadow_lower_right;
|
||||||
|
|||||||
Reference in New Issue
Block a user