-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
052582b
commit 43b7c6c
Showing
7 changed files
with
182 additions
and
0 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
recipes-support/onboard/files/0001-add-xfce-to-autostart-onlyshowin.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
diff --git a/data/onboard-autostart.desktop.in b/data/onboard-autostart.desktop.in | ||
index 8fb55ac..cf022a0 100644 | ||
--- a/data/onboard-autostart.desktop.in | ||
+++ b/data/onboard-autostart.desktop.in | ||
@@ -9,4 +9,4 @@ NoDisplay=true | ||
X-Ubuntu-Gettext-Domain=onboard | ||
AutostartCondition=GSettings org.gnome.desktop.a11y.applications screen-keyboard-enabled | ||
X-GNOME-AutoRestart=true | ||
-OnlyShowIn=GNOME;Unity;MATE; | ||
+OnlyShowIn=GNOME;Unity;MATE;XFCE; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# We need accessibility on in order to use Onboard's auto-show. | ||
[org/gnome/desktop/interface] | ||
toolkit-accessibility=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<?xml version="1.0"?> | ||
<!-- | ||
Copyright (c) 2022 National Instruments | ||
SPDX-License-Identifier: GPL-3.0 | ||
--> | ||
<color_scheme name="NI" format="2.1"> | ||
<window type="key-popup"> | ||
<color element="border" rgb="#044123" opacity="0.0"/> | ||
</window> | ||
|
||
<layer> <color element="background" rgb="#044123" opacity="1.0"/> </layer> | ||
<layer> <color element="background" rgb="#044123" opacity="0.9"/> </layer> | ||
<layer> <color element="background" rgb="#044123" opacity="0.9"/> </layer> | ||
|
||
<key_group> | ||
<color element="fill" rgb="#f4f4f4"/> | ||
<color element="stroke" rgb="#000000" opacity="0.0" /> | ||
<color element="label" rgb="#044123"/> | ||
icon0 | ||
|
||
<key_group> | ||
<color element="fill" rgb="#ffffff"/> | ||
icon1, icon2 | ||
</key_group> | ||
|
||
<!-- dark keys --> | ||
<key_group> | ||
<color element="fill" rgb="#cddcc8"/> | ||
<color element="label" rgb="#044123"/> | ||
icon3, | ||
RCTL, LCTL, RALT, LALT, LWIN, CAPS, | ||
LFSH, RTSH, NMLK, | ||
MENU, RWIN, BKSP, TAB, RTRN, | ||
KPDL, KPEN, KPSU, KPDV, KPAD, KPMU, | ||
LEFT, RGHT, UP, DOWN, INS, DELE, HOME, END, PGUP, PGDN, | ||
F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, | ||
Prnt, Pause, ESC, Scroll, | ||
secondaryclick, middleclick, doubleclick, dragclick, hoverclick, | ||
hide, showclick, move, layer, | ||
quit | ||
|
||
<!-- word suggestions --> | ||
<key_group> | ||
<color element="fill" rgb="#cddcc8"/> | ||
wordlist, prediction, pause-learning.wordlist, language.wordlist, hide.wordlist | ||
</key_group> | ||
</key_group> | ||
|
||
<!-- snippets --> | ||
<key_group> | ||
<color element="fill" rgb="#f4f4f4"/> | ||
m0, m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14, m15 | ||
</key_group> | ||
|
||
<!-- red preferences --> | ||
<key_group> | ||
<color element="fill" rgb="#eb8768"/> | ||
settings | ||
</key_group> | ||
</key_group> | ||
</color_scheme> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0"?> | ||
<!-- | ||
Copyright (c) 2022 National Instruments | ||
SPDX-License-Identifier: GPL-3.0 | ||
--> | ||
<theme name="NI" format="1.3"> | ||
<color_scheme>NI</color_scheme> | ||
<key_style>flat</key_style> | ||
<roundrect_radius>20</roundrect_radius> | ||
<key_fill_gradient>30</key_fill_gradient> | ||
<key_stroke_gradient>70</key_stroke_gradient> | ||
<key_gradient_direction>-3</key_gradient_direction> | ||
<key_label_font></key_label_font> | ||
<key_label_overrides></key_label_overrides> | ||
</theme> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[main] | ||
layout=Compact | ||
theme=NI | ||
key-label-font=DejaVu Sans | ||
|
||
[window] | ||
force-to-top=True | ||
|
||
[auto-show] | ||
# Enable autoshow when there's no keyboard detected. | ||
enabled=True | ||
keyboard-device-detection-enabled=True | ||
keyboard-device-detection-exceptions=['::noserial'] |
37 changes: 37 additions & 0 deletions
37
recipes-support/onboard/files/onboard_hover_seg_fault.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- a/Onboard/osk/osk_devices.c | ||
+++ b/Onboard/osk/osk_devices.c | ||
@@ -97,13 +97,15 @@ osk_device_event_dealloc (OskDeviceEvent | ||
static OskDeviceEvent* | ||
new_device_event (void) | ||
{ | ||
- OskDeviceEvent *ev = PyObject_New(OskDeviceEvent, &osk_device_event_type); | ||
+ OskDeviceEvent *ev; | ||
+ PyGILState_STATE gstate = PyGILState_Ensure(); | ||
+ ev = PyObject_New(OskDeviceEvent, &osk_device_event_type); | ||
if (ev) | ||
{ | ||
osk_device_event_type.tp_init((PyObject*) ev, NULL, NULL); | ||
- return ev; | ||
} | ||
- return NULL; | ||
+ PyGILState_Release(gstate); | ||
+ return ev; | ||
} | ||
|
||
static PyObject * | ||
@@ -334,6 +336,7 @@ osk_devices_dealloc (OskDevices *dev) | ||
static void | ||
queue_event (OskDevices* dev, OskDeviceEvent* event, Bool discard_pending) | ||
{ | ||
+ PyGILState_STATE state = PyGILState_Ensure (); | ||
GQueue* queue = dev->event_queue; | ||
if (queue) | ||
{ | ||
@@ -364,6 +367,7 @@ queue_event (OskDevices* dev, OskDeviceE | ||
Py_INCREF(event); | ||
g_queue_push_head(queue, event); | ||
} | ||
+ PyGILState_Release (state); | ||
} | ||
|
||
static gboolean idle_process_event_queue (OskDevices* dev) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
FILESEXTRAPATHS:prepend := "${THISDIR}/files:" | ||
|
||
# file://0001-add-xfce-to-autostart-onlyshowin.patch | ||
|
||
SRC_URI += " \ | ||
file://0001-add-xfce-to-autostart-onlyshowin.patch \ | ||
file://onboard_hover_seg_fault.patch \ | ||
file://01-gnome-accessibility \ | ||
file://NI.colors \ | ||
file://NI.theme \ | ||
file://onboard-defaults.conf \ | ||
" | ||
|
||
CFLAGS += "-Werror=declaration-after-statement" | ||
|
||
do_install:append () { | ||
install -d ${D}${sysconfdir}/dconf/db/local.d | ||
install -d ${D}${sysconfdir}/onboard | ||
install -d ${D}${datadir}/onboard/themes | ||
|
||
install -m 644 ${WORKDIR}/01-gnome-accessibility ${D}${sysconfdir}/dconf/db/local.d/ | ||
install -m 644 ${WORKDIR}/onboard-defaults.conf ${D}${sysconfdir}/onboard/ | ||
|
||
install -m 644 ${WORKDIR}/NI.colors ${D}${datadir}/onboard/themes/ | ||
install -m 644 ${WORKDIR}/NI.theme ${D}${datadir}/onboard/themes/ | ||
} | ||
|
||
pkg_postinst:${PN} () { | ||
dconf update | ||
} | ||
|
||
|
||
CONFFILES:${PN}:append := " \ | ||
${sysconfdir}/onboard/onboard-defaults.conf \ | ||
${sysconfdir}/dconf/db/local.d/01-gnome-accessibility \ | ||
" | ||
|
||
RDEPENDS:${PN}:append = " dconf" | ||
# Onboard uses unicode glyphs in its key_defs.xml file, which means | ||
# we need a font that has those glyphs present. | ||
RDEPENDS:${PN}:append = " ttf-dejavu-sans" |