Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
pirvi-public
glfw
Commits
79e16bac
Commit
79e16bac
authored
Dec 19, 2017
by
Emmanuel Gil Peyrot
Committed by
linkmauve
Feb 25, 2018
Browse files
Add wp_viewporter support
parent
9a765636
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/CMakeLists.txt
View file @
79e16bac
...
...
@@ -43,6 +43,10 @@ elseif (_GLFW_WAYLAND)
PROTOCOL
"
${
WAYLAND_PROTOCOLS_PKGDATADIR
}
/stable/xdg-shell/xdg-shell.xml"
BASENAME xdg-shell
)
ecm_add_wayland_client_protocol
(
glfw_SOURCES
PROTOCOL
"
${
WAYLAND_PROTOCOLS_PKGDATADIR
}
/stable/viewporter/viewporter.xml"
BASENAME viewporter
)
ecm_add_wayland_client_protocol
(
glfw_SOURCES
PROTOCOL
"
${
WAYLAND_PROTOCOLS_PKGDATADIR
}
/unstable/relative-pointer/relative-pointer-unstable-v1.xml"
...
...
src/wl_init.c
View file @
79e16bac
...
...
@@ -558,6 +558,11 @@ static void registryHandleGlobal(void* data,
wl_registry_bind
(
registry
,
name
,
&
xdg_wm_base_interface
,
1
);
xdg_wm_base_add_listener
(
_glfw
.
wl
.
wmBase
,
&
wmBaseListener
,
NULL
);
}
else
if
(
strcmp
(
interface
,
"wp_viewporter"
)
==
0
)
{
_glfw
.
wl
.
viewporter
=
wl_registry_bind
(
registry
,
name
,
&
wp_viewporter_interface
,
1
);
}
else
if
(
strcmp
(
interface
,
"zwp_relative_pointer_manager_v1"
)
==
0
)
{
_glfw
.
wl
.
relativePointerManager
=
...
...
src/wl_platform.h
View file @
79e16bac
...
...
@@ -53,6 +53,7 @@ typedef VkBool32 (APIENTRY *PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR
#include
"osmesa_context.h"
#include
"wayland-xdg-shell-client-protocol.h"
#include
"wayland-viewporter-client-protocol.h"
#include
"wayland-relative-pointer-unstable-v1-client-protocol.h"
#include
"wayland-pointer-constraints-unstable-v1-client-protocol.h"
#include
"wayland-idle-inhibit-unstable-v1-client-protocol.h"
...
...
@@ -197,6 +198,7 @@ typedef struct _GLFWlibraryWayland
struct
wl_pointer
*
pointer
;
struct
wl_keyboard
*
keyboard
;
struct
xdg_wm_base
*
wmBase
;
struct
wp_viewporter
*
viewporter
;
struct
zwp_relative_pointer_manager_v1
*
relativePointerManager
;
struct
zwp_pointer_constraints_v1
*
pointerConstraints
;
struct
zwp_idle_inhibit_manager_v1
*
idleInhibitManager
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment