diff --git a/meson.build b/meson.build
index 2e722ed..8bb4b95 100644
--- a/meson.build
+++ b/meson.build
@@ -17,6 +17,7 @@ add_project_arguments(
gtk = dependency('gtk4')
wayland_client = dependency('wayland-client', version: '>=1.10.0')
+xkbcommon = dependency('xkbcommon')
# wayland_scanner is required, but we can find it without pkg-config
wayland_scanner = find_program('wayland-scanner')
@@ -52,24 +53,31 @@ endforeach
gnome=import('gnome')
base = [
- 'src/base.c'
+ 'src/base.c',
+ 'src/shell.c',
+ 'src/wayland.c',
+ 'src/virtual-keyboard.c',
+ wayland_targets
]
dm_src = [
base,
'src/launcher.c',
'src/background.c',
- 'src/shell.c',
+ 'src/session-shell.c',
'src/foreign.c',
'src/session-lock.c',
- 'src/wayland.c',
- 'src/session.c',
- wayland_targets]
+ 'src/session.c']
+
+buil_dep = [gtk, gtk_layer_shell, wayland_client, xkbcommon]
+
+session_resource = gnome.compile_resources('session-resources','resources/session-shell/gresource.xml')
executable(
'diya-shell',
dm_src,
- dependencies: [gtk, gtk_layer_shell, wayland_client])
+ session_resource,
+ dependencies: buil_dep)
login_src = [
base,
@@ -77,10 +85,10 @@ login_src = [
'src/login.c'
]
-login_resource = gnome.compile_resources('resources','resources/login-shell/gresource.xml')
+login_resource = gnome.compile_resources('login-resources','resources/login-shell/gresource.xml')
executable(
'diya-login-shell',
login_src,
login_resource,
- dependencies: [gtk, gtk_layer_shell, wayland_client])
\ No newline at end of file
+ dependencies: buil_dep)
\ No newline at end of file
diff --git a/protocols/virtual-keyboard-unstable-v1.xml b/protocols/virtual-keyboard-unstable-v1.xml
new file mode 100644
index 0000000..5095c91
--- /dev/null
+++ b/protocols/virtual-keyboard-unstable-v1.xml
@@ -0,0 +1,113 @@
+
+
+
+ Copyright © 2008-2011 Kristian Høgsberg
+ Copyright © 2010-2013 Intel Corporation
+ Copyright © 2012-2013 Collabora, Ltd.
+ Copyright © 2018 Purism SPC
+
+ Permission is hereby granted, free of charge, to any person obtaining a
+ copy of this software and associated documentation files (the "Software"),
+ to deal in the Software without restriction, including without limitation
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ and/or sell copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice (including the next
+ paragraph) shall be included in all copies or substantial portions of the
+ Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ DEALINGS IN THE SOFTWARE.
+
+
+
+
+ The virtual keyboard provides an application with requests which emulate
+ the behaviour of a physical keyboard.
+
+ This interface can be used by clients on its own to provide raw input
+ events, or it can accompany the input method protocol.
+
+
+
+
+ Provide a file descriptor to the compositor which can be
+ memory-mapped to provide a keyboard mapping description.
+
+ Format carries a value from the keymap_format enumeration.
+
+
+
+
+
+
+
+
+
+
+
+
+ A key was pressed or released.
+ The time argument is a timestamp with millisecond granularity, with an
+ undefined base. All requests regarding a single object must share the
+ same clock.
+
+ Keymap must be set before issuing this request.
+
+ State carries a value from the key_state enumeration.
+
+
+
+
+
+
+
+
+ Notifies the compositor that the modifier and/or group state has
+ changed, and it should update state.
+
+ The client should use wl_keyboard.modifiers event to synchronize its
+ internal state with seat state.
+
+ Keymap must be set before issuing this request.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A virtual keyboard manager allows an application to provide keyboard
+ input events as if they came from a physical keyboard.
+
+
+
+
+
+
+
+
+ Creates a new virtual keyboard associated to a seat.
+
+ If the compositor enables a keyboard to perform arbitrary actions, it
+ should present an error when an untrusted client requests a new
+ keyboard.
+
+
+
+
+
+
diff --git a/resources/default.keymap b/resources/default.keymap
new file mode 100644
index 0000000..d9f9140
--- /dev/null
+++ b/resources/default.keymap
@@ -0,0 +1,1461 @@
+xkb_keymap {
+xkb_keycodes "(unnamed)" {
+ minimum = 8;
+ maximum = 255;
+ = 9;
+ = 10;
+ = 11;
+ = 12;
+ = 13;
+ = 14;
+ = 15;
+ = 16;
+ = 17;
+ = 18;
+ = 19;
+ = 20;
+ = 21;
+ = 22;
+ = 23;
+ = 24;
+ = 25;
+ = 26;
+ = 27;
+ = 28;
+ = 29;
+ = 30;
+ = 31;
+ = 32;
+ = 33;
+ = 34;
+ = 35;
+ = 36;
+ = 37;
+ = 38;
+ = 39;
+ = 40;
+ = 41;
+ = 42;
+ = 43;
+ = 44;
+ = 45;
+ = 46;
+ = 47;
+ = 48;
+ = 49;
+ = 50;
+ = 51;
+ = 52;
+ = 53;
+ = 54;
+ = 55;
+ = 56;
+ = 57;
+ = 58;
+ = 59;
+ = 60;
+ = 61;
+ = 62;
+ = 63;
+ = 64;
+ = 65;
+ = 66;
+ = 67;
+ = 68;
+ = 69;
+ = 70;
+ = 71;
+ = 72;
+ = 73;
+ = 74;
+ = 75;
+ = 76;
+ = 77;
+ = 78;
+ = 79;
+ = 80;
+ = 81;
+ = 82;
+ = 83;
+ = 84;
+ = 85;
+ = 86;
+ = 87;
+ = 88;
+ = 89;
+ = 90;
+ = 91;
+ = 92;
+ = 94;
+ = 95;
+ = 96;
+ = 97;
+ = 98;
+ = 99;
+ = 100;
+ = 101;
+ = 102;
+ = 103;
+ = 104;
+ = 105;
+ = 106;
+ = 107;
+ = 108;
+ = 109;
+ = 110;
+ = 111;
+ = 112;
+ = 113;
+ = 114;
+ = 115;
+ = 116;
+ = 117;
+ = 118;
+ = 119;
+ = 120;
+ = 121;
+ = 122;
+ = 123;
+ = 124;
+ = 125;
+ = 126;
+ = 127;
+ = 128;
+ = 129;
+ = 130;
+ = 131;
+ = 132;
+ = 133;
+ = 134;
+ = 135;
+ = 136;
+ = 137;
+ = 138;
+ = 139;
+ = 140;
+ = 141;
+ = 142;
+ = 143;
+ = 144;
+ = 145;
+ = 146;
+ = 147;
+ = 148;
+ = 149;
+ = 150;
+ = 151;
+ = 152;
+ = 153;
+ = 154;
+ = 155;
+ = 156;
+ = 157;
+ = 158;
+ = 159;
+ = 160;
+ = 161;
+ = 162;
+ = 163;
+ = 164;
+ = 165;
+ = 166;
+ = 167;
+ = 168;
+ = 169;
+ = 170;
+ = 171;
+ = 172;
+ = 173;
+ = 174;
+ = 175;
+ = 176;
+ = 177;
+ = 178;
+ = 179;
+ = 180;
+ = 181;
+ = 182;
+ = 183;
+ = 184;
+ = 185;
+ = 186;
+ = 187;
+ = 188;
+ = 189;
+ = 190;
+ = 191;
+ = 192;
+ = 193;
+ = 194;
+ = 195;
+ = 196;
+ = 197;
+ = 198;
+ = 199;
+ = 200;
+ = 201;
+ = 202;
+ = 203;
+ = 204;
+ = 205;
+ = 206;
+ = 207;
+ = 208;
+ = 209;
+ = 210;
+ = 211;
+ = 212;
+ = 213;
+ = 214;
+ = 215;
+ = 216;
+ = 217;
+ = 218;
+ = 219;
+ = 220;
+ = 221;
+ = 222;
+ = 223;
+ = 224;
+ = 225;
+ = 226;
+ = 227;
+ = 228;
+ = 229;
+ = 230;
+ = 231;
+ = 232;
+ = 233;
+ = 234;
+ = 235;
+ = 236;
+ = 237;
+ = 238;
+ = 239;
+ = 240;
+ = 241;
+ = 242;
+ = 243;
+ = 244;
+ = 245;
+ = 246;
+ = 247;
+ = 248;
+ = 249;
+ = 250;
+ = 251;
+ = 252;
+ = 253;
+ = 254;
+ = 255;
+ indicator 1 = "Caps Lock";
+ indicator 2 = "Num Lock";
+ indicator 3 = "Scroll Lock";
+ indicator 4 = "Compose";
+ indicator 5 = "Kana";
+ indicator 6 = "Sleep";
+ indicator 7 = "Suspend";
+ indicator 8 = "Mute";
+ indicator 9 = "Misc";
+ indicator 10 = "Mail";
+ indicator 11 = "Charging";
+ indicator 12 = "Shift Lock";
+ indicator 13 = "Group 2";
+ indicator 14 = "Mouse Keys";
+ alias = ;
+ alias