6
flake.lock
generated
6
flake.lock
generated
@@ -97,11 +97,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1759215258,
|
"lastModified": 1759266345,
|
||||||
"narHash": "sha256-Y7aXk0Zxu+X2BbO5MLkCvClrPsKfZ2sm34N2n7tXx4I=",
|
"narHash": "sha256-BJ+CTRXaFArVFgJfL19QpoR7Ebk8HU63Lz0+jQvhV3Y=",
|
||||||
"owner": "slendidev",
|
"owner": "slendidev",
|
||||||
"repo": "wlroots-lunar",
|
"repo": "wlroots-lunar",
|
||||||
"rev": "a9abd5a6e4fb4e5ac6c410e1fb1ad438d3b12001",
|
"rev": "1179ca07821decbff320eafd7ffb3caaadcefbf4",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
@@ -3,10 +3,11 @@
|
|||||||
#include "LunarWM_core.h"
|
#include "LunarWM_core.h"
|
||||||
#include "LunarWM_render.h"
|
#include "LunarWM_render.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "raylib.h"
|
|
||||||
#include "vec.h"
|
#include "vec.h"
|
||||||
|
|
||||||
#include <pixman.h>
|
#include <pixman.h>
|
||||||
|
#include <wlr/backend/wayland.h>
|
||||||
|
#include <wlr/backend/x11.h>
|
||||||
#include <wlr/render/color.h>
|
#include <wlr/render/color.h>
|
||||||
#include <wlr/render/pass.h>
|
#include <wlr/render/pass.h>
|
||||||
|
|
||||||
@@ -22,6 +23,7 @@
|
|||||||
#include <xkbcommon/xkbcommon-keysyms.h>
|
#include <xkbcommon/xkbcommon-keysyms.h>
|
||||||
#include <xkbcommon/xkbcommon.h>
|
#include <xkbcommon/xkbcommon.h>
|
||||||
|
|
||||||
|
#include <raylib.h>
|
||||||
#include <rlgl.h>
|
#include <rlgl.h>
|
||||||
|
|
||||||
static void handle_new_output(struct wl_listener *listener, void *data);
|
static void handle_new_output(struct wl_listener *listener, void *data);
|
||||||
@@ -1293,6 +1295,17 @@ static void Pointer_motion_notify(struct wl_listener *listener, void *data)
|
|||||||
|
|
||||||
struct wlr_pointer_motion_event *ev = data;
|
struct wlr_pointer_motion_event *ev = data;
|
||||||
|
|
||||||
|
auto dev = (struct wlr_input_device *)p->wlr_pointer;
|
||||||
|
if (wlr_backend_is_wl(p->server->wayland.backend)) {
|
||||||
|
if (!wlr_wl_pointer_is_locked(dev)) {
|
||||||
|
assert(wlr_wl_pointer_set_locked(dev, true));
|
||||||
|
}
|
||||||
|
} else if (wlr_backend_is_x11(p->server->wayland.backend)) {
|
||||||
|
if (!wlr_x11_pointer_is_locked(dev)) {
|
||||||
|
assert(wlr_x11_pointer_set_locked(dev, true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
float dx = (float)ev->delta_x;
|
float dx = (float)ev->delta_x;
|
||||||
float dy = (float)ev->delta_y;
|
float dy = (float)ev->delta_y;
|
||||||
if (p->server->cman->cfg.input.mouse.invert_x) {
|
if (p->server->cman->cfg.input.mouse.invert_x) {
|
||||||
|
|||||||
Reference in New Issue
Block a user