mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 04:54:35 +00:00
Wayland: Cleanup
This commit is contained in:
parent
ea6dd72c71
commit
6ac0835ad2
@ -1431,9 +1431,6 @@ static void pointerHandleButton(void* userData,
|
|||||||
uint32_t state)
|
uint32_t state)
|
||||||
{
|
{
|
||||||
_GLFWwindow* window = _glfw.wl.pointerFocus;
|
_GLFWwindow* window = _glfw.wl.pointerFocus;
|
||||||
int glfwButton;
|
|
||||||
uint32_t edges = XDG_TOPLEVEL_RESIZE_EDGE_NONE;
|
|
||||||
|
|
||||||
if (!window)
|
if (!window)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -1441,21 +1438,17 @@ static void pointerHandleButton(void* userData,
|
|||||||
{
|
{
|
||||||
_glfw.wl.serial = serial;
|
_glfw.wl.serial = serial;
|
||||||
|
|
||||||
/* Makes left, right and middle 0, 1 and 2. Overall order follows evdev
|
|
||||||
* codes. */
|
|
||||||
glfwButton = button - BTN_LEFT;
|
|
||||||
|
|
||||||
_glfwInputMouseClick(window,
|
_glfwInputMouseClick(window,
|
||||||
glfwButton,
|
button - BTN_LEFT,
|
||||||
state == WL_POINTER_BUTTON_STATE_PRESSED
|
state == WL_POINTER_BUTTON_STATE_PRESSED,
|
||||||
? GLFW_PRESS
|
|
||||||
: GLFW_RELEASE,
|
|
||||||
_glfw.wl.xkb.modifiers);
|
_glfw.wl.xkb.modifiers);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (button == BTN_LEFT)
|
if (button == BTN_LEFT)
|
||||||
{
|
{
|
||||||
|
uint32_t edges = XDG_TOPLEVEL_RESIZE_EDGE_NONE;
|
||||||
|
|
||||||
switch (window->wl.fallback.focus)
|
switch (window->wl.fallback.focus)
|
||||||
{
|
{
|
||||||
case GLFW_TOP_DECORATION:
|
case GLFW_TOP_DECORATION:
|
||||||
@ -1484,8 +1477,6 @@ static void pointerHandleButton(void* userData,
|
|||||||
else
|
else
|
||||||
edges = XDG_TOPLEVEL_RESIZE_EDGE_BOTTOM;
|
edges = XDG_TOPLEVEL_RESIZE_EDGE_BOTTOM;
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
assert(0);
|
|
||||||
}
|
}
|
||||||
if (edges != XDG_TOPLEVEL_RESIZE_EDGE_NONE)
|
if (edges != XDG_TOPLEVEL_RESIZE_EDGE_NONE)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user