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
8ed91e8a
Commit
8ed91e8a
authored
Dec 22, 2017
by
Emmanuel Gil Peyrot
Committed by
linkmauve
Feb 25, 2018
Browse files
Only create decorations if wp_viewporter is supported
parent
4e31dc5e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/wl_window.c
View file @
8ed91e8a
...
...
@@ -238,6 +238,9 @@ static void createDecorations(_GLFWwindow* window)
unsigned
char
data
[]
=
{
224
,
224
,
224
,
255
};
const
GLFWimage
image
=
{
1
,
1
,
data
};
if
(
!
_glfw
.
wl
.
viewporter
)
return
;
struct
wl_buffer
*
buffer
=
createShmBuffer
(
&
image
);
createDecoration
(
&
window
->
wl
.
decorations
.
top
,
window
->
wl
.
surface
,
buffer
,
...
...
@@ -276,6 +279,9 @@ static void resizeWindow(_GLFWwindow* window, int width, int height)
{
wl_egl_window_resize
(
window
->
wl
.
native
,
width
,
height
,
0
,
0
);
if
(
!
_glfw
.
wl
.
viewporter
)
return
;
// Top decoration.
wp_viewport_set_destination
(
window
->
wl
.
decorations
.
top
.
viewport
,
width
,
_GLFW_DECORATION_TOP
);
wl_surface_commit
(
window
->
wl
.
decorations
.
top
.
surface
);
...
...
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