Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
G
gtk
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dorota Czaplejewicz
gtk
Commits
ceada4ad
Commit
ceada4ad
authored
Jul 01, 2016
by
Jonas Ådahl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wayland: Port to xdg_shell unstable v6
https://bugzilla.gnome.org/show_bug.cgi?id=769937
parent
643f0339
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
240 additions
and
124 deletions
+240
-124
gdk/wayland/Makefile.am
gdk/wayland/Makefile.am
+2
-2
gdk/wayland/gdkdisplay-wayland.c
gdk/wayland/gdkdisplay-wayland.c
+12
-9
gdk/wayland/gdkdisplay-wayland.h
gdk/wayland/gdkdisplay-wayland.h
+2
-2
gdk/wayland/gdkwindow-wayland.c
gdk/wayland/gdkwindow-wayland.c
+224
-111
No files found.
gdk/wayland/Makefile.am
View file @
ceada4ad
...
...
@@ -23,8 +23,8 @@ noinst_LTLIBRARIES = \
BUILT_SOURCES
=
\
pointer-gestures-unstable-v1-client-protocol.h
\
pointer-gestures-unstable-v1-protocol.c
\
xdg-shell-unstable-v
5
-client-protocol.h
\
xdg-shell-unstable-v
5
-protocol.c
\
xdg-shell-unstable-v
6
-client-protocol.h
\
xdg-shell-unstable-v
6
-protocol.c
\
gtk-primary-selection-client-protocol.h
\
gtk-primary-selection-protocol.c
\
tablet-unstable-v2-client-protocol.h
\
...
...
gdk/wayland/gdkdisplay-wayland.c
View file @
ceada4ad
...
...
@@ -44,6 +44,7 @@
#include "gdkwaylandmonitor.h"
#include "pointer-gestures-unstable-v1-client-protocol.h"
#include "tablet-unstable-v2-client-protocol.h"
#include "xdg-shell-unstable-v6-client-protocol.h"
/**
* SECTION:wayland_interaction
...
...
@@ -112,9 +113,9 @@ _gdk_wayland_display_async_roundtrip (GdkWaylandDisplay *display_wayland)
}
static
void
xdg_shell_ping
(
void
*
data
,
struct
xdg_shell
*
xdg_shell
,
uint32_t
serial
)
xdg_shell_ping
(
void
*
data
,
struct
zxdg_shell_v6
*
xdg_shell
,
uint32_t
serial
)
{
GdkWaylandDisplay
*
display_wayland
=
data
;
...
...
@@ -123,10 +124,10 @@ xdg_shell_ping (void *data,
GDK_NOTE
(
EVENTS
,
g_message
(
"ping, shell %p, serial %u
\n
"
,
xdg_shell
,
serial
));
xdg_shell
_pong
(
xdg_shell
,
serial
);
zxdg_shell_v6
_pong
(
xdg_shell
,
serial
);
}
static
const
struct
xdg_shell
_listener
xdg_shell_listener
=
{
static
const
struct
zxdg_shell_v6
_listener
xdg_shell_listener
=
{
xdg_shell_ping
,
};
...
...
@@ -353,12 +354,14 @@ gdk_registry_handle_global (void *data,
wl_registry_bind
(
display_wayland
->
wl_registry
,
id
,
&
wl_shm_interface
,
1
);
wl_shm_add_listener
(
display_wayland
->
shm
,
&
wl_shm_listener
,
display_wayland
);
}
else
if
(
strcmp
(
interface
,
"
xdg_shell
"
)
==
0
)
else
if
(
strcmp
(
interface
,
"
zxdg_shell_v6
"
)
==
0
)
{
display_wayland
->
xdg_shell
=
wl_registry_bind
(
display_wayland
->
wl_registry
,
id
,
&
xdg_shell_interface
,
1
);
xdg_shell_use_unstable_version
(
display_wayland
->
xdg_shell
,
XDG_SHELL_VERSION_CURRENT
);
xdg_shell_add_listener
(
display_wayland
->
xdg_shell
,
&
xdg_shell_listener
,
display_wayland
);
wl_registry_bind
(
display_wayland
->
wl_registry
,
id
,
&
zxdg_shell_v6_interface
,
1
);
zxdg_shell_v6_add_listener
(
display_wayland
->
xdg_shell
,
&
xdg_shell_listener
,
display_wayland
);
}
else
if
(
strcmp
(
interface
,
"gtk_shell1"
)
==
0
)
{
...
...
gdk/wayland/gdkdisplay-wayland.h
View file @
ceada4ad
...
...
@@ -29,7 +29,7 @@
#include <wayland-egl.h>
#include <gdk/wayland/tablet-unstable-v2-client-protocol.h>
#include <gdk/wayland/gtk-shell-client-protocol.h>
#include <gdk/wayland/xdg-shell-unstable-v
5
-client-protocol.h>
#include <gdk/wayland/xdg-shell-unstable-v
6
-client-protocol.h>
#include <glib.h>
#include <gdk/gdkkeys.h>
...
...
@@ -66,7 +66,7 @@ struct _GdkWaylandDisplay
struct
wl_registry
*
wl_registry
;
struct
wl_compositor
*
compositor
;
struct
wl_shm
*
shm
;
struct
xdg_shell
*
xdg_shell
;
struct
zxdg_shell_v6
*
xdg_shell
;
struct
gtk_shell1
*
gtk_shell
;
struct
wl_input_device
*
input_device
;
struct
wl_data_device_manager
*
data_device_manager
;
...
...
gdk/wayland/gdkwindow-wayland.c
View file @
ceada4ad
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
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