PEPPER_DESKTOP_SHELL_LIB="\$(top_srcdir)/src/lib/desktop-shell/libpepper-desktop-shell.la"
PEPPER_DESKTOP_SHELL_CFLAGS="$PEPPER_DIR $PEPPER_CFLAGS"
+PEPPER_DESKTOP_SHELL_CFLAGS="$PEPPER_XKB_DIR $PEPPER_DESKTOP_SHELL_CFLAGS"
PEPPER_DESKTOP_SHELL_LIBS="$PEPPER_LIB"
+PEPPER_DESKTOP_SHELL_LIBS="$PEPPER_XKB_LIB $PEPPER_XKB_LIBS $PEPPER_DESKTOP_SHELL_LIBS"
AC_SUBST(PEPPER_DESKTOP_SHELL_CFLAGS)
AC_SUBST(PEPPER_DESKTOP_SHELL_LIBS)
%package desktop-shell-devel
Summary: Desktop-shell development module for pepper package
Requires: pepper-desktop-shell = %{version}-%{release}
+Requires: pepper-xkb = %{version}-%{release}
%description desktop-shell-devel
This package includes desktop-shell development module files.
#include <config.h>
#include "pepper-desktop-shell.h"
#include <wayland-server.h>
+#include <pepper-xkb.h>
/* Ping timeout value in ms. */
#define DESKTOP_SHELL_PING_TIMEOUT 200
/* seat add/remove */
pepper_event_listener_t *seat_add_listener;
pepper_event_listener_t *seat_remove_listener;
+
+ pepper_xkb_t *xkb;
};
struct shell_client {
void *info, void *data)
{
pepper_keyboard_t *keyboard = info;
+ shell_seat_t *shseat = (shell_seat_t *)data;
pepper_keyboard_set_grab(keyboard, &default_keyboard_grab, NULL);
+ pepper_xkb_keyboard_set_keymap(shseat->shell->xkb, keyboard, NULL);
}
static void
shell_add_input_device(shell, l->item);
}
+static void
+init_xkb(desktop_shell_t *shell)
+{
+ shell->xkb = pepper_xkb_create();
+}
+
static pepper_bool_t
launch_shell_client(desktop_shell_t *shell)
{
if (!launch_shell_client(shell))
PEPPER_ERROR("shell client launch failed, compositor runs without shell client.\n");
+ init_xkb(shell);
init_listeners(shell);
init_input(shell);