Compare commits
27 Commits
implement-
...
update-deb
| Author | SHA1 | Date | |
|---|---|---|---|
| f71bd98053 | |||
| c0ac5e540f | |||
| fb5ec5557b | |||
| 74d94e6792 | |||
| 63f4c6b4da | |||
| 2774c1c988 | |||
| 469b0c0a9a | |||
| 2ddd217737 | |||
| c4e8e34ad6 | |||
| 4dc18c0af4 | |||
| 55c6911b87 | |||
| 9bf0da5409 | |||
| 7d5b2dd1de | |||
| 6091632e40 | |||
| 44110fd4d9 | |||
| 74d76ebfeb | |||
| 760bc138b0 | |||
| 2a4763d4f3 | |||
| 4b92f205ef | |||
| a5668fa1db | |||
| de39256377 | |||
| f53709c83d | |||
| 8ad0192e55 | |||
| 791e454cb6 | |||
| c85638be4d | |||
| a61b1fdf06 | |||
| 07c25d1d91 |
10
data/icons/key-enter.svg
Normal file
10
data/icons/key-enter.svg
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"
|
||||
version="1.1" viewBox="0 0 24 24">
|
||||
|
||||
<path d="M 24,1 L 24,10 C 24,15 20,17 17,17 L 7,17 L 10,20 L 10,23
|
||||
L 7,23 L 0,15 L 7,7 L 10,7 L 10,10 L 7,13 L 17,13
|
||||
C 19,13 20,12 20,10 L 20,1 Z"
|
||||
stroke="none" fill="black" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 388 B |
8
data/icons/key-shift.svg
Normal file
8
data/icons/key-shift.svg
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"
|
||||
version="1.1" viewBox="0 0 24 24">
|
||||
|
||||
<path d="M 12,2 L 22,14 L 16,14 L 16,22 L 8,22 L 8,14 L 2,14 Z"
|
||||
stroke="none" fill="black" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 279 B |
@ -1,123 +1,53 @@
|
||||
<?xml version="1.0"?>
|
||||
<geometry version="0.90">
|
||||
<bounds x="0.000000" y="10.000000" width="426.0000" height="296.5853"/>
|
||||
<bounds x="0" y="10.000000" width="426.0000" height="296.5853"/>
|
||||
<section angle="0">
|
||||
<bounds x="0" y="0" width="608.7804" height="201.3658"/>
|
||||
<row orientation="1">
|
||||
<key keycode="24" name="AD01" oref="outline2">
|
||||
<bounds x="65.56097" y="42.14634" width="37.46341" height="52.44877"/>
|
||||
</key>
|
||||
<key keycode="25" name="AD02" oref="outline2">
|
||||
<bounds x="106.1463" y="42.14634" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="26" name="AD03" oref="outline2">
|
||||
<bounds x="145.1707" y="42.14634" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="27" name="AD04" oref="outline2">
|
||||
<bounds x="185.7560" y="42.14634" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="28" name="AD05" oref="outline2">
|
||||
<bounds x="226.3414" y="42.14634" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="29" name="AD06" oref="outline2">
|
||||
<bounds x="266.9268" y="42.14634" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="30" name="AD07" oref="outline2">
|
||||
<bounds x="307.5121" y="42.14634" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="31" name="AD08" oref="outline2">
|
||||
<bounds x="348.0975" y="42.14634" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="32" name="AD09" oref="outline2">
|
||||
<bounds x="388.6829" y="42.14634" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="33" name="AD10" oref="outline2">
|
||||
<bounds x="429.2682" y="42.14634" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="24" name="AD01" oref="outline2" />
|
||||
<key keycode="25" name="AD02" oref="outline2" />
|
||||
<key keycode="26" name="AD03" oref="outline2" />
|
||||
<key keycode="27" name="AD04" oref="outline2" />
|
||||
<key keycode="28" name="AD05" oref="outline2" />
|
||||
<key keycode="29" name="AD06" oref="outline2" />
|
||||
<key keycode="30" name="AD07" oref="outline2" />
|
||||
<key keycode="31" name="AD08" oref="outline2" />
|
||||
<key keycode="32" name="AD09" oref="outline2" />
|
||||
<key keycode="33" name="AD10" oref="outline2" />
|
||||
</row>
|
||||
</section>
|
||||
<section angle="0">
|
||||
<bounds x="0" y="0" width="608.7804" height="201.3658"/>
|
||||
<row orientation="1">
|
||||
<key keycode="38" name="AC01" oref="outline2">
|
||||
<bounds x="76.48780" y="82.73170" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="39" name="AC02" oref="outline2">
|
||||
<bounds x="115.5121" y="82.73170" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="40" name="AC03" oref="outline2">
|
||||
<bounds x="156.0975" y="82.73170" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="41" name="AC04" oref="outline2">
|
||||
<bounds x="196.6829" y="82.73170" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="42" name="AC05" oref="outline2">
|
||||
<bounds x="237.2682" y="82.73170" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="43" name="AC06" oref="outline2">
|
||||
<bounds x="277.8536" y="82.73170" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="44" name="AC07" oref="outline2">
|
||||
<bounds x="318.4390" y="82.73170" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="45" name="AC08" oref="outline2">
|
||||
<bounds x="359.0243" y="82.73170" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="46" name="AC09" oref="outline2">
|
||||
<bounds x="399.6097" y="82.73170" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="38" name="AC01" oref="outline2" />
|
||||
<key keycode="39" name="AC02" oref="outline2" />
|
||||
<key keycode="40" name="AC03" oref="outline2" />
|
||||
<key keycode="41" name="AC04" oref="outline2" />
|
||||
<key keycode="42" name="AC05" oref="outline2" />
|
||||
<key keycode="43" name="AC06" oref="outline2" />
|
||||
<key keycode="44" name="AC07" oref="outline2" />
|
||||
<key keycode="45" name="AC08" oref="outline2" />
|
||||
<key keycode="46" name="AC09" oref="outline2" />
|
||||
</row>
|
||||
</section>
|
||||
<section angle="0">
|
||||
<bounds x="0" y="0" width="608.7804" height="201.3658"/>
|
||||
<row orientation="1">
|
||||
<key keycode="50" name="LFSH" oref="altline">
|
||||
<bounds x="3.121951" y="121.7560" width="88.97561" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="52" name="AB01" oref="outline2">
|
||||
<bounds x="95.21951" y="121.7560" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="53" name="AB02" oref="outline2">
|
||||
<bounds x="135.8048" y="121.7560" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="54" name="AB03" oref="outline2">
|
||||
<bounds x="176.3902" y="121.7560" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="55" name="AB04" oref="outline2">
|
||||
<bounds x="215.4146" y="121.7560" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="56" name="AB05" oref="outline2">
|
||||
<bounds x="256.0000" y="121.7560" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="57" name="AB06" oref="outline2">
|
||||
<bounds x="296.5853" y="121.7560" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="58" name="AB07" oref="outline2">
|
||||
<bounds x="337.1707" y="121.7560" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="22" name="BKSP" oref="altline">
|
||||
<bounds x="529.1707" y="1.560976" width="79.60975" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="50" name="LFSH" oref="altline" />
|
||||
<key keycode="52" name="AB01" oref="outline2" />
|
||||
<key keycode="53" name="AB02" oref="outline2" />
|
||||
<key keycode="54" name="AB03" oref="outline2" />
|
||||
<key keycode="55" name="AB04" oref="outline2" />
|
||||
<key keycode="56" name="AB05" oref="outline2" />
|
||||
<key keycode="57" name="AB06" oref="outline2" />
|
||||
<key keycode="58" name="AB07" oref="outline2" />
|
||||
<key keycode="22" name="BKSP" oref="altline" />
|
||||
</row>
|
||||
</section>
|
||||
<section angle="0">
|
||||
<bounds x="0" y="0" width="608.7804" height="201.3658"/>
|
||||
<row orientation="1">
|
||||
<key keycode="66" name="ALTGR" oref="altline">
|
||||
<bounds x="62.43902" y="162.3414" width="48.39024" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="150" name="I150" oref="altline">
|
||||
<bounds x="113.9512" y="162.3414" width="48.39024" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="65" name="SPCE" oref="spaceline">
|
||||
<bounds x="165.4634" y="162.3414" width="217.5853" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="60" name="AB09" oref="outline2">
|
||||
<bounds x="418.3414" y="121.7560" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="36" name="RTRN" oref="outline7">
|
||||
<bounds x="519.8048" y="82.73170" width="88.97561" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="0" name="ABC123" oref="altline" />
|
||||
<key keycode="150" name="I150" oref="altline" />
|
||||
<key keycode="65" name="SPCE" oref="spaceline" />
|
||||
<key keycode="60" name="AB09" oref="outline2" />
|
||||
<key keycode="36" name="RTRN" oref="outline7" />
|
||||
</row>
|
||||
</section>
|
||||
<outline id="outline2" corner-radius="1.000000">
|
||||
|
||||
@ -39,59 +39,6 @@
|
||||
<key keycode="96" name="FK12">
|
||||
<keysym keyval="65481">F12</keysym>
|
||||
</key>
|
||||
<key keycode="49" name="TLDE">
|
||||
<keysym keyval="96">quoteleft</keysym>
|
||||
<keysym keyval="126">asciitilde</keysym>
|
||||
</key>
|
||||
<key keycode="10" name="AE01">
|
||||
<keysym keyval="49">1</keysym>
|
||||
<keysym keyval="33">exclam</keysym>
|
||||
</key>
|
||||
<key keycode="11" name="AE02">
|
||||
<keysym keyval="50">2</keysym>
|
||||
<keysym keyval="64">at</keysym>
|
||||
</key>
|
||||
<key keycode="12" name="AE03">
|
||||
<keysym keyval="51">3</keysym>
|
||||
<keysym keyval="35">numbersign</keysym>
|
||||
</key>
|
||||
<key keycode="13" name="AE04">
|
||||
<keysym keyval="52">4</keysym>
|
||||
<keysym keyval="36">dollar</keysym>
|
||||
</key>
|
||||
<key keycode="14" name="AE05">
|
||||
<keysym keyval="53">5</keysym>
|
||||
<keysym keyval="37">percent</keysym>
|
||||
<keysym keyval="8364">EuroSign</keysym>
|
||||
</key>
|
||||
<key keycode="15" name="AE06">
|
||||
<keysym keyval="54">6</keysym>
|
||||
<keysym keyval="94">asciicircum</keysym>
|
||||
</key>
|
||||
<key keycode="16" name="AE07">
|
||||
<keysym keyval="55">7</keysym>
|
||||
<keysym keyval="38">ampersand</keysym>
|
||||
</key>
|
||||
<key keycode="17" name="AE08">
|
||||
<keysym keyval="56">8</keysym>
|
||||
<keysym keyval="42">asterisk</keysym>
|
||||
</key>
|
||||
<key keycode="18" name="AE09">
|
||||
<keysym keyval="57">9</keysym>
|
||||
<keysym keyval="40">parenleft</keysym>
|
||||
</key>
|
||||
<key keycode="19" name="AE10">
|
||||
<keysym keyval="48">0</keysym>
|
||||
<keysym keyval="41">parenright</keysym>
|
||||
</key>
|
||||
<key keycode="20" name="AE11">
|
||||
<keysym keyval="45">minus</keysym>
|
||||
<keysym keyval="95">underscore</keysym>
|
||||
</key>
|
||||
<key keycode="21" name="AE12">
|
||||
<keysym keyval="61">equal</keysym>
|
||||
<keysym keyval="43">plus</keysym>
|
||||
</key>
|
||||
<key keycode="22" name="BKSP">
|
||||
<keysym keyval="65288" icon="edit-clear-symbolic">backspace</keysym>
|
||||
</key>
|
||||
@ -165,11 +112,11 @@
|
||||
<keysym keyval="92">backslash</keysym>
|
||||
<keysym keyval="124">bar</keysym>
|
||||
</key>
|
||||
<key keycode="66" name="ALTGR">
|
||||
<keysym keyval="65027">ISO_Level3_Shift</keysym>
|
||||
<keysym keyval="65027">ISO_Level3_Shift</keysym>
|
||||
<keysym keyval="65027" label="ABC">ISO_Level3_Shift</keysym>
|
||||
<keysym keyval="65027" label="ABC">ISO_Level3_Shift</keysym>
|
||||
<key keycode="0" name="ABC123">
|
||||
<symbol label="123">show-numbers</symbol>
|
||||
<symbol label="123">show-numbers</symbol>
|
||||
<symbol label="ABC">show-letters</symbol>
|
||||
<symbol label="ABC">show-letters</symbol>
|
||||
</key>
|
||||
<key keycode="38" name="AC01">
|
||||
<keysym keyval="97">a</keysym>
|
||||
@ -234,11 +181,11 @@
|
||||
<keysym keyval="34">quotedbl</keysym>
|
||||
</key>
|
||||
<key keycode="36" name="RTRN">
|
||||
<keysym keyval="65293">Return</keysym>
|
||||
<keysym keyval="65293" icon="key-enter">Return</keysym>
|
||||
</key>
|
||||
<key keycode="50" name="LFSH">
|
||||
<keysym keyval="65505">Shift_L</keysym>
|
||||
<keysym keyval="65505">Shift_L</keysym>
|
||||
<keysym keyval="65505" icon="key-shift">Shift_L</keysym>
|
||||
<keysym keyval="65505" icon="key-shift">Shift_L</keysym>
|
||||
<keysym keyval="65505" label="=/+">Shift_L</keysym>
|
||||
<keysym keyval="65505" label="123">Shift_L</keysym>
|
||||
</key>
|
||||
@ -290,7 +237,6 @@
|
||||
</key>
|
||||
<key keycode="60" name="AB09">
|
||||
<keysym keyval="46">period</keysym>
|
||||
<keysym keyval="62">greater</keysym>
|
||||
</key>
|
||||
<key keycode="61" name="AB10">
|
||||
<keysym keyval="47">slash</keysym>
|
||||
|
||||
@ -32,5 +32,7 @@
|
||||
<file compressed="true" preprocess="xml-stripblanks">keyboards/symbols/ug.xml</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">keyboards/symbols/us.xml</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">keyboards/symbols/zh-bopomofo.xml</file>
|
||||
<file>icons/key-enter.svg</file>
|
||||
<file>icons/key-shift.svg</file>
|
||||
</gresource>
|
||||
</gresources>
|
||||
|
||||
9
debian/changelog
vendored
9
debian/changelog
vendored
@ -1,3 +1,12 @@
|
||||
squeekboard (1.0.11) unstable; urgency=medium
|
||||
|
||||
* Handle keyboard views according to the design
|
||||
* Fix compiler warnings and errors by addressing deprecated code
|
||||
* Remove unused XML and handling code
|
||||
* Improve rendering and responsiveness
|
||||
|
||||
-- David Boddie <david.boddie@puri.sm> Fri, 12 Jul 2019 21:19:48 +0200
|
||||
|
||||
squeekboard (1.0.10) unstable; urgency=medium
|
||||
|
||||
* Use a shared DBus definition
|
||||
|
||||
54
debian/copyright
vendored
54
debian/copyright
vendored
@ -6,17 +6,68 @@ Files: *
|
||||
Copyright: 2010-2011 Daiki Ueno <ueno@unixuser.org>
|
||||
2010-2011 Red Hat, Inc.
|
||||
2019 Purism SPC
|
||||
2019 Hysterical Raisins <sybolt-dev@xs4all.nl>
|
||||
License: GPL-3+
|
||||
|
||||
Files: eek/eek.c
|
||||
eek/eek-container.c
|
||||
eek/eek-container.h
|
||||
eek/eek-element.c
|
||||
eek/eek-element.h
|
||||
eek/eek-gtk-keyboard.c
|
||||
eek/eek-gtk-keyboard.h
|
||||
eek/eek-key.c
|
||||
eek/eek-key.h
|
||||
eek/eek-keysym.c
|
||||
eek/eek-keysym.h
|
||||
eek/eek-layout.c
|
||||
eek/eek-layout.h
|
||||
eek/eek-renderer.c
|
||||
eek/eek-renderer.h
|
||||
eek/eek-section.c
|
||||
eek/eek-section.h
|
||||
eek/eek-symbol.c
|
||||
eek/eek-symbol.h
|
||||
eek/eek-text.c
|
||||
eek/eek-text.h
|
||||
eek/eek-xkb-layout.c
|
||||
eek/eek-xkb-layout.h
|
||||
eek/eek-xkl-layout.c
|
||||
eek/eek-xkl-layout.h
|
||||
eek/eek-xml-layout.c
|
||||
eek/eek-xml-layout.c
|
||||
eek/eek-xml-layout.h
|
||||
eekboard/eekboard-client.c
|
||||
eekboard/eekboard-client.h
|
||||
eekboard/eekboard-context.c
|
||||
eekboard/eekboard-context.h
|
||||
eekboard/eekboard-context-service.c
|
||||
eekboard/eekboard-service.c
|
||||
eekboard/eekboard-service.h
|
||||
Copyright: 2010-2011 Daiki Ueno <ueno@unixuser.org>
|
||||
2010-2011 Red Hat, Inc.
|
||||
2019 Purism SPC
|
||||
2019 Hysterical Raisins <sybolt-dev@xs4all.nl>
|
||||
License: GPL-3+
|
||||
|
||||
Files: eek/layersurface.c
|
||||
src/wayland.c
|
||||
src/key-emitter.c
|
||||
meson.build
|
||||
src/meson.build
|
||||
po/meson.build
|
||||
Copyright: 2018-2019 Purism SPC
|
||||
License: GPL-3+
|
||||
|
||||
Files: data/meson.build
|
||||
data/squeekboard.gresources.xml
|
||||
data/style.css
|
||||
src/imservice.c
|
||||
src/meson.build
|
||||
src/server-context-service.c
|
||||
Copyright: 2019 Purism SPC
|
||||
2019 Hysterical Raisins <sybolt-dev@xs4all.nl>
|
||||
License: GPL-3+
|
||||
|
||||
Files: eekboard/keymap.c
|
||||
Copyright: 2000 Red Hat, Inc.
|
||||
2019 Purism, SPC
|
||||
@ -71,3 +122,4 @@ License: GPL-3+
|
||||
.
|
||||
On Debian systems, the complete text of the GNU General
|
||||
Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".
|
||||
|
||||
|
||||
@ -549,12 +549,12 @@ render_pressed_key (GtkWidget *widget,
|
||||
cairo_translate (cr, bounds.x, bounds.y);
|
||||
eek_renderer_render_key (priv->renderer, cr, key, 1.0, TRUE);
|
||||
cairo_restore (cr);
|
||||
|
||||
/*
|
||||
cairo_save (cr);
|
||||
cairo_translate (cr, large_bounds.x, large_bounds.y);
|
||||
eek_renderer_render_key (priv->renderer, cr, key, 1.5, TRUE);
|
||||
cairo_restore (cr);
|
||||
|
||||
*/
|
||||
gdk_window_end_draw_frame (window, context);
|
||||
|
||||
cairo_region_destroy (region);
|
||||
|
||||
@ -60,6 +60,20 @@ eek_gtk_renderer_real_get_icon_surface (EekRenderer *self,
|
||||
GError *error = NULL;
|
||||
cairo_surface_t *surface;
|
||||
|
||||
gchar *path = g_strconcat("/sm/puri/squeekboard/icons/", icon_name, ".svg", NULL);
|
||||
|
||||
pixbuf = gdk_pixbuf_new_from_resource_at_scale (path, size, size,
|
||||
TRUE, &error);
|
||||
|
||||
if (pixbuf != NULL)
|
||||
goto found;
|
||||
else {
|
||||
g_warning ("can't get icon pixbuf for %s: %s", path, error->message);
|
||||
g_error_free (error);
|
||||
error = NULL;
|
||||
}
|
||||
g_free(path);
|
||||
|
||||
pixbuf = gtk_icon_theme_load_icon (gtk_icon_theme_get_default (),
|
||||
icon_name,
|
||||
size,
|
||||
@ -73,6 +87,7 @@ eek_gtk_renderer_real_get_icon_surface (EekRenderer *self,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
found:
|
||||
surface = pixbuf_to_cairo_surface (pixbuf);
|
||||
g_object_unref (pixbuf);
|
||||
return surface;
|
||||
|
||||
@ -211,13 +211,23 @@ eek_keyboard_get_property (GObject *object,
|
||||
}
|
||||
|
||||
static void
|
||||
set_level_from_modifiers (EekKeyboard *self)
|
||||
set_level_from_modifiers (EekKeyboard *self, EekKey *key)
|
||||
{
|
||||
EekKeyboardPrivate *priv = EEK_KEYBOARD_GET_PRIVATE(self);
|
||||
|
||||
/* The levels are: 0 Letters, 1 Upper case letters, 2 Numbers, 3 Symbols */
|
||||
gint level = ((priv->modifiers & priv->alt_gr_mask) ? 2 : 0) |
|
||||
((priv->modifiers & EEK_SHIFT_MASK) ? 1 : 0);
|
||||
|
||||
/* Use the numbers/letters bit from the old level */
|
||||
gint level = priv->old_level & 2;
|
||||
|
||||
/* Handle non-emitting keys */
|
||||
if (key && (eek_key_get_keycode(key) == 0)) {
|
||||
const gchar *name = eek_element_get_name(EEK_ELEMENT(key));
|
||||
if (g_strcmp0(name, "ABC123") == 0)
|
||||
level ^= 2;
|
||||
}
|
||||
|
||||
level |= ((priv->modifiers & EEK_SHIFT_MASK) ? 1 : 0);
|
||||
|
||||
switch (priv->old_level) {
|
||||
case VIEW_LETTERS_UPPER:
|
||||
@ -249,6 +259,8 @@ set_level_from_modifiers (EekKeyboard *self)
|
||||
|
||||
if (level == VIEW_NUMBERS || level == VIEW_SYMBOLS)
|
||||
priv->modifier_behavior = EEK_MODIFIER_BEHAVIOR_LOCK;
|
||||
else if (level == VIEW_LETTERS_UPPER)
|
||||
priv->modifier_behavior = EEK_MODIFIER_BEHAVIOR_LATCH;
|
||||
|
||||
priv->old_level = level;
|
||||
eek_element_set_level (EEK_ELEMENT(self), level);
|
||||
@ -306,7 +318,7 @@ void eek_keyboard_press_key(EekKeyboard *keyboard, EekKey *key, guint32 timestam
|
||||
EekModifierType modifier = eek_symbol_get_modifier_mask (symbol);
|
||||
if (priv->modifier_behavior == EEK_MODIFIER_BEHAVIOR_NONE) {
|
||||
set_modifiers_with_key (keyboard, key, priv->modifiers | modifier);
|
||||
set_level_from_modifiers (keyboard);
|
||||
set_level_from_modifiers (keyboard, key);
|
||||
}
|
||||
|
||||
// "Borrowed" from eek-context-service; doesn't influence the state but forwards the event
|
||||
@ -355,7 +367,7 @@ void eek_keyboard_release_key( EekKeyboard *keyboard,
|
||||
(priv->modifiers ^ modifier) & modifier);
|
||||
break;
|
||||
}
|
||||
set_level_from_modifiers (keyboard);
|
||||
set_level_from_modifiers (keyboard, key);
|
||||
|
||||
// "Borrowed" from eek-context-service; doesn't influence the state but forwards the event
|
||||
|
||||
@ -621,7 +633,7 @@ eek_keyboard_set_modifiers (EekKeyboard *keyboard,
|
||||
{
|
||||
g_return_if_fail (EEK_IS_KEYBOARD(keyboard));
|
||||
keyboard->priv->modifiers = modifiers;
|
||||
set_level_from_modifiers (keyboard);
|
||||
set_level_from_modifiers (keyboard, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -162,9 +162,14 @@ create_keyboard_surface (EekRenderer *renderer)
|
||||
&background);
|
||||
|
||||
eek_element_get_bounds (EEK_ELEMENT(priv->keyboard), &bounds);
|
||||
keyboard_surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
|
||||
ceil(bounds.width * priv->scale),
|
||||
ceil(bounds.height * priv->scale));
|
||||
|
||||
/* Create a surface that encompasses the dimensions of the keyboard as well
|
||||
as the margin around the edge. */
|
||||
keyboard_surface = cairo_image_surface_create (
|
||||
CAIRO_FORMAT_ARGB32,
|
||||
ceil(((bounds.x * 2) + bounds.width) * priv->scale),
|
||||
ceil(((bounds.y * 2) + bounds.height) * priv->scale));
|
||||
|
||||
data.cr = cairo_create (keyboard_surface);
|
||||
data.renderer = renderer;
|
||||
|
||||
@ -492,7 +497,7 @@ render_key (EekRenderer *self,
|
||||
if (!symbol)
|
||||
return;
|
||||
|
||||
#define SCALE 0.8
|
||||
#define SCALE 0.4
|
||||
if (eek_symbol_get_icon_name (symbol)) {
|
||||
|
||||
cairo_surface_t *icon_surface =
|
||||
|
||||
@ -362,8 +362,6 @@ geometry_start_element_callback (GMarkupParseContext *pcontext,
|
||||
|
||||
if (g_strcmp0 (data->element_stack->data, "geometry") == 0)
|
||||
eek_element_set_bounds (EEK_ELEMENT(data->keyboard), &bounds);
|
||||
else if (g_strcmp0 (data->element_stack->data, "section") == 0)
|
||||
eek_element_set_bounds (EEK_ELEMENT(data->section), &bounds);
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
||||
@ -285,7 +285,7 @@ make_window (ServerContextService *context)
|
||||
PHOSH_TYPE_LAYER_SURFACE,
|
||||
"layer-shell", squeek_wayland->layer_shell,
|
||||
"wl-output", g_ptr_array_index(squeek_wayland->outputs, 0), // TODO: select output as needed,
|
||||
"height", 200,
|
||||
"height", 210,
|
||||
"anchor", ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM
|
||||
| ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT
|
||||
| ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT,
|
||||
|
||||
Reference in New Issue
Block a user