Skip to content

Commit

Permalink
Pointer lock and bugfixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Apprentice-Alchemist committed Feb 6, 2022
1 parent e15db47 commit 672619d
Show file tree
Hide file tree
Showing 10 changed files with 294 additions and 105 deletions.
2 changes: 1 addition & 1 deletion .clangd
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
CompileFlags:
Add: [-D,KINC_EDITOR_SUPPORT]
Add: [-D,KINC_EDITOR_SUPPORT, -Wall]
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,6 @@ Backends/System/Linux/Sources/kinc/backend/wayland/wayland-protocol.*
Backends/System/Linux/Sources/kinc/backend/wayland/wayland-viewporter.*
Backends/System/Linux/Sources/kinc/backend/wayland/xdg-decoration.*
Backends/System/Linux/Sources/kinc/backend/wayland/xdg-shell.*
Backends/System/Linux/Sources/kinc/backend/wayland/wayland-tablet.*
Backends/System/Linux/Sources/kinc/backend/wayland/wayland-tablet.*
Backends/System/Linux/Sources/kinc/backend/wayland/wayland-pointer-constraint.*
Backends/System/Linux/Sources/kinc/backend/wayland/wayland-relative-pointer.*
12 changes: 11 additions & 1 deletion Backends/System/Linux/Sources/kinc/backend/linuxunit.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@
#ifndef KINC_NO_WAYLAND
#include "wayland/display.c.h"
#include "wayland/system.c.h"
#include "wayland/wayland-pointer-constraint.c.h"
#include "wayland/wayland-protocol.c.h"
#include "wayland/wayland-relative-pointer.c.h"
#include "wayland/wayland-tablet.c.h"
#include "wayland/wayland-viewporter.c.h"
#include "wayland/window.c.h"
#include "wayland/xdg-decoration.c.h"
#include "wayland/xdg-shell.c.h"
#include "wayland/wayland-tablet.c.h"
#endif

#ifndef KINC_NO_X11
Expand Down Expand Up @@ -49,6 +51,14 @@ void kinc_linux_init_procs() {
procs.window_hide = kinc_wayland_window_hide;
procs.count_windows = kinc_wayland_count_windows;

procs.mouse_can_lock = kinc_wl_mouse_can_lock;
procs.mouse_lock = kinc_wl_mouse_lock;
procs.mouse_unlock = kinc_wl_mouse_unlock;
procs.mouse_show = kinc_wl_mouse_show;
procs.mouse_hide = kinc_wl_mouse_hide;
procs.mouse_set_position = kinc_wl_mouse_set_position;
procs.mouse_get_position = kinc_wl_mouse_get_position;

procs.display_init = kinc_wayland_display_init;
procs.display_available = kinc_wayland_display_available;
procs.display_available_mode = kinc_wayland_display_available_mode;
Expand Down
Loading

0 comments on commit 672619d

Please sign in to comment.