diff --git a/meta-xfce/recipes-xfce/xfce4-settings/xfce4-settings/touchscreen/0001-add-cursor-theme-xfce-invisible.patch b/meta-xfce/recipes-xfce/xfce4-settings/xfce4-settings/touchscreen/0001-add-cursor-theme-xfce-invisible.patch
new file mode 100644
index 0000000000..9272081f01
--- /dev/null
+++ b/meta-xfce/recipes-xfce/xfce4-settings/xfce4-settings/touchscreen/0001-add-cursor-theme-xfce-invisible.patch
@@ -0,0 +1,248 @@
+From 4be18d7c8f2ac72b402dcbe8385922638fcd0a89 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?=
+Date: Tue, 30 Oct 2012 13:14:11 +0100
+Subject: [PATCH 1/5] add cursor-theme "xfce-invisible"
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Andreas Müller
+Upstream-Status: Submitted [1]
+[1] https://bugzilla.xfce.org/show_bug.cgi?id=9474
+---
+ Makefile.am | 1 +
+ configure.ac | 2 +
+ cursors/Makefile.am | 178 +++++++++++++++++++++++++++++++++++++++++++++++++++
+ cursors/index.theme | 3 +
+ 6 files changed, 184 insertions(+), 0 deletions(-)
+ create mode 100644 cursors/Makefile.am
+ create mode 100644 cursors/index.theme
+
+diff --git a/Makefile.am b/Makefile.am
+index 3060bac..3f0dd1d 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,6 +1,7 @@
+ # $Id$
+
+ SUBDIRS = \
++ cursors \
+ dialogs \
+ xfce4-settings-manager \
+ xfce4-settings-editor \
+diff --git a/configure.ac b/configure.ac
+index 0e7907d..1378049 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -157,6 +157,7 @@ dnl *** Optional support for Xcursor ***
+ dnl ************************************
+ XDT_CHECK_OPTIONAL_PACKAGE([XCURSOR], [xcursor], [1.1.0],
+ [xcursor], [Cursor themes support])
++AC_SUBST(cursordir, "\${datadir}/icons/xfce-invisible/cursors")
+
+ dnl ****************************************
+ dnl *** Optional support for Libxklavier ***
+@@ -232,6 +233,7 @@ AC_SUBST([PLATFORM_LDFLAGS])
+ AC_OUTPUT([
+ Makefile
+ po/Makefile.in
++cursors/Makefile
+ dialogs/Makefile
+ dialogs/appearance-settings/Makefile
+ dialogs/accessibility-settings/Makefile
+diff --git a/cursors/Makefile.am b/cursors/Makefile.am
+new file mode 100644
+index 0000000..c9e5a9f
+--- /dev/null
++++ b/cursors/Makefile.am
+@@ -0,0 +1,178 @@
++CURSOR_NAMES_INVISIBLE = \
++ 00008160000006810000408080010102 \
++ 028006030e0e7ebffc7f7070c0600140 \
++ 2870a09082c103050810ffdffffe0204 \
++ 03b6e0fcb3499374a867c041f52298f0 \
++ 0876e1c15ff2fc01f906f1c363074c0f \
++ 08ffe1cb5fe6fc01f906f1c063814ccf \
++ 08ffe1e65f80fcfdf9fff11263e74c48 \
++ 1001208387f90000800003000700f6ff \
++ 1081e37283d90000800003c07f3ef6bf \
++ 14fef782d02440884392942c11205230 \
++ 208530c400c041818281048008011002 \
++ 3085a0e285430894940527032f8b26df \
++ 4498f0e0c1937ffe01fd06f973665830 \
++ 5aca4d189052212118709018842178c0 \
++ 5c6cd98b3f3ebcb1f9c7f1c204630408 \
++ 6407b0e94181790501fd1e167b474872 \
++ 640fb0e74195791501fd1ed57b41487f \
++ 9081237383d90e509aa00f00170e968f \
++ 9d800788f1b08800ae810202380a0822 \
++ a2a266d0498c3104214a47bd64ab0fc8 \
++ b66166c04f8c3109214a4fbd64a50fc8 \
++ c7088f0f3e6c8088236ef8e1e3e70000 \
++ d9ce0ab605698f320427677b458ad60b \
++ e29285e634086352946a0e7090d73106 \
++ f41c0e382c94c0958e07017e42b00462 \
++ f41c0e382c97c0938e07017e42800402 \
++ fcf1c3c7cd4491d801f1e1c78f100000 \
++ fcf21c00b30f7e3f83fe0dfd12e71cff \
++ alias \
++ all-scroll \
++ arrow \
++ base_arrow_down \
++ base_arrow_up \
++ based_arrow_down \
++ based_arrow_up \
++ bd_double_arrow \
++ boat \
++ bottom_left_corner \
++ bottom_right_corner \
++ bottom_side \
++ bottom_tee \
++ cell \
++ center_ptr \
++ circle \
++ closedhand \
++ color-picker \
++ col-resize \
++ copy \
++ cross \
++ cross_reverse \
++ crossed_circle \
++ crosshair \
++ default \
++ diamond_cross \
++ dnd-ask \
++ dnd-copy \
++ dnd-link \
++ dnd-move \
++ dnd-no-drop \
++ dnd-none \
++ dot \
++ dot_box_mask \
++ dotbox \
++ double_arrow \
++ down_arrow \
++ draft_large \
++ draft_small \
++ draped_box \
++ e-resize \
++ ew-resize \
++ exchange \
++ fd_double_arrow \
++ fleur \
++ forbidden \
++ grab \
++ grabbing \
++ gumby \
++ h_double_arrow \
++ hand \
++ hand1 \
++ hand2 \
++ help \
++ ibeam \
++ icon \
++ left_arrow \
++ left_ptr \
++ left_side \
++ left_tee \
++ link \
++ ll_angle \
++ lr_angle \
++ move \
++ ne-resize \
++ nesw-resize \
++ no-drop \
++ not-allowed \
++ n-resize \
++ ns-resize \
++ nw-resize \
++ nwse-resize \
++ openhand \
++ pencil \
++ pirate \
++ plus \
++ pointer \
++ pointing_hand \
++ question_arrow \
++ right_arrow \
++ right_ptr \
++ right_side \
++ right_tee \
++ row-resize \
++ sailboat \
++ sb_down_arrow \
++ sb_h_double_arrow \
++ sb_left_arrow \
++ sb_right_arrow \
++ sb_up_arrow \
++ sb_v_double_arrow \
++ se-resize \
++ size_all \
++ size_bdiag \
++ size_fdiag \
++ size_hor \
++ size_ver \
++ sizing \
++ shuttle \
++ split_h \
++ split_v \
++ s-resize \
++ sw-resize \
++ target \
++ tcross \
++ text \
++ top_left_arrow \
++ top_left_corner \
++ top_right_corner \
++ top_side \
++ top_tee \
++ trek \
++ ul_angle \
++ up_arrow \
++ ur_angle \
++ vertical-text \
++ v_double_arrow \
++ whats_this \
++ w-resize \
++ X_cursor \
++ xterm \
++ zoom-in \
++ zoom-out
++
++CURSOR_NAMES = \
++ 3ecb610c1bf2410f44200f48c40d3599 \
++ 08e8e1c95fe2fc01f976f1e063a24ccd \
++ 00000000000000020006000e7e9ffc3f \
++ half-busy \
++ left_ptr_watch \
++ progress \
++ watch
++
++
++EXTRA_DIST = invisible wait index.theme
++
++install-data-local:
++ $(mkinstalldirs) $(DESTDIR)@cursordir@;
++ $(INSTALL_DATA) index.theme $(DESTDIR)/@cursordir@/..
++ $(INSTALL_DATA) invisible wait $(DESTDIR)@cursordir@/
++ for CURSOR in $(CURSOR_NAMES_INVISIBLE); do \
++ echo '-- Installing invisible cursor '$$CURSOR; \
++ ln -s invisible $(DESTDIR)@cursordir@/$$CURSOR; \
++ done
++ for CURSOR in $(CURSOR_NAMES); do \
++ echo '-- Installing visible cursor '$$CURSOR; \
++ ln -s wait $(DESTDIR)@cursordir@/$$CURSOR; \
++ done
++
+diff --git a/cursors/index.theme b/cursors/index.theme
+new file mode 100644
+index 0000000..0c48458
+--- /dev/null
++++ b/cursors/index.theme
+@@ -0,0 +1,3 @@
++[Icon Theme]
++Name=xfce-invisible
++Example=invisible
+--
+1.7.6.5
+
diff --git a/meta-xfce/recipes-xfce/xfce4-settings/xfce4-settings/touchscreen/0002-mouse-settings-dialog-add-touchscreen-pointer-option.patch b/meta-xfce/recipes-xfce/xfce4-settings/xfce4-settings/touchscreen/0002-mouse-settings-dialog-add-touchscreen-pointer-option.patch
new file mode 100644
index 0000000000..4151c3d784
--- /dev/null
+++ b/meta-xfce/recipes-xfce/xfce4-settings/xfce4-settings/touchscreen/0002-mouse-settings-dialog-add-touchscreen-pointer-option.patch
@@ -0,0 +1,1236 @@
+From 7c87f8f202a7743a18b8d7fdab5c66a3d54badd5 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?=
+Date: Thu, 1 Nov 2012 21:01:59 +0100
+Subject: [PATCH 2/5] mouse settings dialog: add touchscreen-pointer option
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+
+Signed-off-by: Andreas Müller
+Upstream-Status: Submitted [1]
+[1] https://bugzilla.xfce.org/show_bug.cgi?id=9474
+---
+ dialogs/mouse-settings/main.c | 56 +++++++++++++++++++++++++++++
+ dialogs/mouse-settings/mouse-dialog.glade | 28 ++++++++++++++-
+ dialogs/mouse-settings/mouse-dialog_ui.h | 1056 +++++++++++++++---------------
+ 3 files changed, 422 insertions(+), 329 deletions(-)
+
+diff --git a/dialogs/mouse-settings/main.c b/dialogs/mouse-settings/main.c
+index f4b475b..ff08219 100644
+--- a/dialogs/mouse-settings/main.c
++++ b/dialogs/mouse-settings/main.c
+@@ -956,6 +956,50 @@ mouse_settings_device_set_enabled (GtkToggleButton *button,
+
+
+
++#ifdef HAVE_XCURSOR
++static void
++mouse_settings_on_touchscreen_pointer (GtkToggleButton *button,
++ GtkBuilder *builder)
++{
++ gchar *name = NULL;
++ gchar *prop;
++ gboolean enabled;
++
++ if (locked > 0)
++ return;
++
++ if (mouse_settings_device_get_selected (builder, NULL, &name))
++ {
++ enabled = gtk_toggle_button_get_active (button);
++ prop = g_strconcat ("/", name, "/TouchscreenPointer", NULL);
++ xfconf_channel_set_bool (pointers_channel, prop, enabled);
++ g_free (prop);
++ }
++ g_free (name);
++}
++
++static void
++mouse_settings_set_touchscreen_pointer (GtkBuilder *builder)
++{
++ gchar *name = NULL;
++ gchar *prop;
++ gboolean enabled;
++ GtkToggleButton *button;
++
++ if (mouse_settings_device_get_selected (builder, NULL, &name))
++ {
++ button = GTK_TOGGLE_BUTTON (gtk_builder_get_object (builder, "touchscreen-pointer"));
++ prop = g_strconcat ("/", name, "/TouchscreenPointer", NULL);
++ enabled = xfconf_channel_get_bool (pointers_channel, prop, FALSE);
++ gtk_toggle_button_set_active (button, enabled);
++ g_free (prop);
++ }
++ g_free (name);
++}
++#endif
++
++
++
+ static void
+ mouse_settings_device_selection_changed (GtkBuilder *builder)
+ {
+@@ -1007,6 +1051,9 @@ mouse_settings_device_selection_changed (GtkBuilder *builder)
+ /* get the selected item */
+ if (mouse_settings_device_get_selected (builder, &device, NULL))
+ {
++#ifdef HAVE_XCURSOR
++ mouse_settings_set_touchscreen_pointer (builder);
++#endif
+ gdk_error_trap_push ();
+ device_info = XListInputDevices (xdisplay, &ndevices);
+ if (gdk_error_trap_pop () == 0 && device_info != NULL)
+@@ -1735,11 +1782,20 @@ main (gint argc, gchar **argv)
+ /* populate the themes treeview */
+ mouse_settings_themes_populate_store (builder);
+
++ /* connect & fill touchscreen-pointer */
++ object = gtk_builder_get_object (builder, "touchscreen-pointer");
++ g_signal_connect (G_OBJECT (object), "toggled",
++ G_CALLBACK (mouse_settings_on_touchscreen_pointer), builder);
++ mouse_settings_set_touchscreen_pointer (builder);
++
+ /* connect the cursor size in the cursor tab */
+ object = gtk_builder_get_object (builder, "theme-cursor-size");
+ xfconf_g_property_bind (xsettings_channel, "/Gtk/CursorThemeSize",
+ G_TYPE_INT, G_OBJECT (object), "value");
+ #else
++ /* hide touchscreen-pointer */
++ object = gtk_builder_get_object (builder, "touchscreen-pointer");
++ gtk_widget_hide (GTK_WIDGET (object));
+ /* hide the themes tab */
+ object = gtk_builder_get_object (builder, "themes-hbox");
+ gtk_widget_hide (GTK_WIDGET (object));
+diff --git a/dialogs/mouse-settings/mouse-dialog.glade b/dialogs/mouse-settings/mouse-dialog.glade
+index d3aab0d..573c551 100644
+--- a/dialogs/mouse-settings/mouse-dialog.glade
++++ b/dialogs/mouse-settings/mouse-dialog.glade
+@@ -323,7 +323,7 @@
+ True
+ False
+ 6
+- 3
++ 4
+ 2
+ 12
+ 6
+@@ -415,6 +415,32 @@
+ 3
+
+
++
++
++ True
++ False
++ 0
++ 0
++ 0
++
++
++ _Touchscreen pointer
++ False
++ True
++ True
++ False
++ When selected, no mouse pointer is displayed for this device and gtk TouchscreenMode is activated
++ True
++ True
++
++
++
++
++ 2
++ 3
++ 4
++
++
+
+
+
+diff --git a/dialogs/mouse-settings/mouse-dialog_ui.h b/dialogs/mouse-settings/mouse-dialog_ui.h
+index 9e0c267..8a68c3b 100644
+--- a/dialogs/mouse-settings/mouse-dialog_ui.h
++++ b/dialogs/mouse-settings/mouse-dialog_ui.h
+@@ -31,545 +31,555 @@ static const char mouse_dialog_ui[] =
+ "True Falsegtk-revert-to-saved <"
+- "object class=\"XfceTitledDialog\" id=\"mouse-dialog\">False Mouse and Touchpad cent"
+- "er-on-parent preferences-desktop"
+- "-peripherals dialog Configure pointer device"
+- " behavior and appearanceTru"
+- "e False 2 True False endgtk-close TrueTrue<"
+- "/property>True False True False"
+- "property>False 0 gtk-help False True True True Tr"
+- "ue FalseFalse 0"
+- " True False True end0 "
+- "True True 6 True False 12 6True False 12 "
+- "True False De_vice: True devic"
+- "e-combobox 0.050000000000000003 False True0 True False T"
+- "rue True 1 False True 0 _Enable this device True True FalseFalse True<"
+- "/property>True False True 1 TrueTrueTrue False6 6 True False
0 none True False 12True False 6 6True False 12 _Right-handed TrueTrue False Fa"
+- "lse True True True<"
+- "/property> False <"
+- "property name=\"fill\">True0 _Left"
+- "-handed True True Fa"
+- "lse False "
+- "True True device-right-handed<"
+- "/property> False <"
+- "property name=\"fill\">True1 Tr"
+- "ue True 0 Reverse scroll d_irection True True FalseWhen selected, the scroll wheel will work "
+- "in the opposite direction False True <"
+- "property name=\"draw_indicator\">True TrueTrue1 "
+- "True False Buttons False True 0
TrueFalse 0 none <"
++ "row> Disabled True"
++ " Edge scrolling True|
"
++ "Two-finger scrolling True|
Circular scrolling True|
16 48 24 1 11 False Mouse and Touchpad center-on-parent prefer"
++ "ences-desktop-peripherals dialog"
++ " Configure p"
++ "ointer device behavior and appearance True False 12True False 6"
+- "property>3 2 12 6 TrueFalse 0 _Accelerat"
+- "ion: True device-acceleration-scale GTK_FILL GTK_FILL True True The factor at which the "
+- "pointer\'s speed will increase as the mouse is moveddelayeddevice-acceleration 1 right 1"
+- "2 True TrueThe number of pixels the pointer must move in a sh"
+- "ort time before it starts accelerating delayed device-thres"
+- "hold 0 0 right "
+- " 1 2 12 2 TrueFalse
end gtk-helpFalse True TrueTrue True False False 0 True <"
++ "property name=\"label\">gtk-closeFalse True True True True "
++ "object>False False 0 FalseTrue "
++ "end 0 True True "
++ "6 True False 12"
++ "property>6 True False 12
True False De_vice: Truedevice-combobox 0.05000000000"
++ "0000003 FalseTrue 0 True False True True 1 <"
++ "property name=\"expand\">FalseTrue"
++ "property>0 _Enable this device FalseTrue True FalseTrue True "
++ " False True 1 True True <"
++ "property name=\"visible\">TrueF"
++ "alse 6 6 True False 0 noneTrue False12 True False0 _Sensitivity: True device-threshold"
+- "-scale 12 GTK_FILL TrueFalse 0 0 0 Reset to De_fa"
+- "ults True True True<"
+- "/property>Set the "
+- "acceleration and sensitivity for the selected device to the default val"
+- "ues False "
+- "image5 True 2 2 3
<"
+- "/child> True False Pointer Speed False True 1 TrueFalse"
+- " B_uttons and F"
+- "eedback True False True False6 6 6 6 True False"
+- "property>0 none True False 12True False 6 6Disable to_u"
+- "chpad while typing True "
++ "property>12 Ri_ght-handed False True "
+ "True False When selected, the touchpad will be disabled when the keyboard is"
+- " being used FalseTrue True True True 0 T_ap touchpad to click True True False
False Tr"
+- "ue True "
+- "True True 1 TrueFalse General T"
+- "rue "
+- "attributes> False True 0 True False0<"
+- "/property>none Tr"
+- "ue False 12 True False 6 6 True False 12 Di_sabledTrue True False False True True True False True FalseTrue True True False<"
++ "/property>True 0 Le_ft-handed F"
++ "alse True True False"
++ " True True device-ri"
++ "ght-handed False<"
++ "/property>True 1 True True 0 Edge scro_lling Reverse scroll d_irection False True True False False TrueTrue synaptics-scroll-no False True 1 Two-_finger scrolling True TrueFalse False True True synaptics-scroll-no TrueTrue2 True True 0 "
+- "child>Enable hori_zontal s"
+- "crolling True True F"
+- "alse False True True "
+- "True True 1 TrueFal"
+- "se ScrollingTrue False True 1 1 "
+- "packing>True False T_ouchpad True 1 False TrueFalse When selected, the scroll wheel will work in "
++ "the opposite direction True<"
++ "/property>True True "
++ "True 1 True "
++ "False Buttons <"
++ "property name=\"expand\">FalseTrue"
++ "property>0 "
++ "True False 0 noneTrue False"
++ "property>12 TrueFalse 6 6 TrueFalse 0 none True False12 True False 6 2 2 12 6 True False 0 "
+- "Tr_acking mode: True wacom-mode GTK_FILL True False 0_Rotation:True wacom-rotation 1 2GTK_FILL <"
+- "child>True False <"
+- "property name=\"model\">wacom-mode-store 1 12
True False wacom-rotat"
+- "ion-store 1 <"
+- "/attributes>1<"
+- "/property>2 1 2 <"
+- "/packing> T"
++ "width\">6 4 2 126 T"
+ "rue False General True False True 0 2 True False <"
+- "property name=\"label\" translatable=\"yes\">Table_tTrue 2 False "
+- "TrueTrue 2 True"
+- "property>False _Devices True "
+- "False True False 12 6True False 0none TrueFalse 12 True
Fa"
+- "lse 6 6 True False 0 Th_reshold: Truednd-threshold-scale True True 0 True<"
+- "/property>True The number of pixels the pointer mu"
+- "st move before a drag operation will start delayed dnd-thre"
+- "shold 0 right True True 1
TrueFals"
+- "e Drag and Drop"
+- " Fa"
+- "lse True 0 True False 0none TrueFalse 12 0 Acceleratio_n: Truedevice-acceleration-scale GTK_FILL GTK_FILL
"
++ "True TrueThe factor at"
++ " which the pointer\'s speed will increase as the mouse is moveddelayed device-acceleration 1 right <"
++ "packing>1 2 TrueTrue The number of pixels the pointer must "
++ "move in a short time before it starts accelerating delayed "
++ "device-threshold 0 "
++ "0 righ"
++ "t 12 1 2 True False 6 6 True False 0 "
+- "Ti_me: Truedclick-time-scale True True 0 TrueTrue Two mouse clicks in less than this leng"
+- "th of time (in milliseconds) will be considered a double clickdelayed dclick-time 0 right TrueTrue1 True False 0D_istance: Truedclick-distance-scale True True2 "
+- " True True The mouse pointer cannot move farther than this distance betwee"
+- "n two clicks for them to be considered a double click delayeddclick-distance 0 right True True 3 True False "
+- "Double Click False True 1 1
True False _Behavior True 1 False TrueFalse12 12 True True au"
+- "tomatic automaticetched-in 200 True True Fa"
+- "lse True True 0 True False 6True False 0 none False 0 Sensitivit_y: True device"
++ "-threshold-scale 1 2 GTK_FILL Tru"
++ "e False 0 0 0 _Re"
++ "set to Defaults Fals"
++ "e True True TrueSet the acc"
++ "eleration and sensitivity for the selected device to the default values"
++ " image5 True 22"
++ "property>3 True False0 00 _Touchscreen pointer False TrueTrue False When selected, no mouse pointer is displayed for this device"
++ " and gtk TouchscreenMode is activated True True 2"
++ " 3 4 "
++ "True False 12 TrueFalse Pointer "
++ "Speed "
++ " False True 1 True False B_uttons and FeedbackTrue <"
++ "property name=\"tab_fill\">False "
++ "True False 6 6 True False 0n"
++ "one "
++ "True "
++ "False 12 TrueFalse 6 12 "
++ "order_width\">6 6 <"
++ "property name=\"label\" translatable=\"yes\">Disable touchpad _while ty"
++ "ping False True True False When selected, the to"
++ "uchpad will be disabled when the keyboard is being usedTrueTrue True"
++ "property>True 0 Tap touchpad to clic_k False True <"
++ "property name=\"can_focus\">TrueFalse True True TrueTrue1 True False General True "
++ " FalseTrue 0 True False 0 noneTrue False 12 TrueFals"
++ "e 6 6 <"
++ "property name=\"visible\">TrueF"
++ "alse 12 TrueFalse 0 Scrolling"
++ " _mode: True synaptics-scroll False T"
++ "rue 0 True Falsesynaptics-scroll-store 1 0 True True 1 TrueTrue 0 "
++ "Enable hori_zontal scrollingFalse TrueTrueFalse True T"
++ "rue TrueTrue 1<"
++ "/property>
True False <"
++ "property name=\"label\" translatable=\"yes\">ScrollingTrue "
++ "False True<"
++ "/property>1 1 True False T_ouchpa"
++ "d True 1 False
True False 66 True False "
++ "0 none "
+ "True False Cursor _size: True "
+- "spin1 FalseTrue 0 True True "
+- "False FalseTrue True theme-cursor-size True True False "
+- "True 1 12True False 6 "
++ "2 212 6 True False 0 Trac_king mode: True w"
++ "acom-mode GTK_"
++ "FILL True False 0 _Rotation: True wacom-rotation 1 2 GTK_FILL True<"
++ "/property>False wacom-mode-store 1 1 2 "
++ "packing>True False wacom-rotation-store1 1 21<"
++ "/property>2 True "
++ "=\"GtkLabel\" id=\"label18\">True "
+ "False Size FalseTrue 0 "
+- "Tru"
++ "ranslatable=\"yes\">General Tru"
++ "e F"
++ "alse True 0 2 Tru"
+ "e False 0 noneTrue False6 0 0 0 0 6 618 6 True False gtk-missing-image TrueTab_let True 2 False True True 2 "
++ "True False_Devices Tru"
++ "e False TrueFals"
++ "e 12 6 True False 0 none True False12"
++ " True False 6 6 <"
++ "property name=\"visible\">TrueF"
++ "alse 0 Th_reshold: True dnd-thres"
++ "hold-scale True"
++ "property>True 0 True TrueThe number of pixels the pointer must move before"
++ " a drag operation will start delayed dnd-threshold0 ri"
++ "ght TrueTrue 1<"
++ "/property> True False <"
++ "property name=\"label\" translatable=\"yes\">Drag and Drop False True 0"
++ "property> True False 0 noneTrue False12 True False 6 6 True False 0 Ti_me: True dclick-t"
++ "ime-scale TrueTrue 0 True TrueTwo mouse clicks in less than this length of time ("
++ "in milliseconds) will be considered a double click delayed "
++ "dclick-time 0 right True True 1 True"
++ " False 0 D_"
++ "istance: True dclick-distance-scale True True 2 "
++ "child><"
++ "property name=\"visible\">TrueT"
++ "rue The "
++ "mouse pointer cannot move farther than this distance between two clicks"
++ " for them to be considered a double click delayed dclick-di"
++ "stance 0 right True True 3 TrueFals"
++ "e Double Click<"
++ "/property> Fal"
++ "se True 1 1 TrueFalse Preview False T"
+- "rue 1 False True 1 "
+- "packing>2 True False T_heme True 2 False True True "
+- "1 button1button2 164824 1 11
ABSOLUTE Pen (a"
+- "bsolute) RELATIVE Mouse (relative)|
0 None (right-handed)<"
+- "/row> 3 Half "
+- "(left-handed)|
1 Clockwise|
2 Counterclockwise|
|
"
+- "interface>"
++ "l\" translatable=\"yes\">_BehaviorTrue 1"
++ "property>False "
++ "True False 1212"
++ " True True automatic automatic etched-in200True True False TrueTrue 0 True False 6 <"
++ "object class=\"GtkFrame\" id=\"frame5\">True"
++ " False 0 noneTrue False12 True False 6 12 TrueFalse Cursor si_ze: True spin1 False True 0 "
++ " <"
++ "property name=\"visible\">TrueT"
++ "rue FalseFalse True True th"
++ "eme-cursor-size TrueTrue FalseTrue 1 "
++ "child>True False Size False True 0 True False0 none True False 600 0
0 6 6 18"
++ "6 TrueFals"
++ "e gtk-missing-image True FalsePreview False True 1 False True 1 2 "
++ "TrueFa"
++ "lse _ThemeTrue
2 Fa"
++ "lse True True 1 button2 button1"
++ " ABSOLUTE Pen (ab"
++ "solute)|
RELATIVE Mouse (relative)|
0 None (right-handed) 3 Half (l"
++ "eft-handed)|
1 Clockwise|
2 Counterclockwise|
|
"
+ };
+
+-static const unsigned mouse_dialog_ui_length = 37918u;
++static const unsigned mouse_dialog_ui_length = 38582u;
+
+--
+1.7.6.5
+
diff --git a/meta-xfce/recipes-xfce/xfce4-settings/xfce4-settings/touchscreen/0003-XfcePointersHelper-gets-a-pointer-to-XfceXSettingsHe.patch b/meta-xfce/recipes-xfce/xfce4-settings/xfce4-settings/touchscreen/0003-XfcePointersHelper-gets-a-pointer-to-XfceXSettingsHe.patch
new file mode 100644
index 0000000000..eff052b68f
--- /dev/null
+++ b/meta-xfce/recipes-xfce/xfce4-settings/xfce4-settings/touchscreen/0003-XfcePointersHelper-gets-a-pointer-to-XfceXSettingsHe.patch
@@ -0,0 +1,137 @@
+From a3b0218137c8796fbb7bd6d852dc8ab5895a65cb Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?=
+Date: Sat, 3 Nov 2012 18:32:01 +0100
+Subject: [PATCH 3/5] XfcePointersHelper gets a pointer to XfceXSettingsHelper
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+
+Signed-off-by: Andreas Müller
+Upstream-Status: Submitted [1]
+[1] https://bugzilla.xfce.org/show_bug.cgi?id=9474
+---
+ xfsettingsd/main.c | 2 +-
+ xfsettingsd/pointers.c | 55 ++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 56 insertions(+), 1 deletions(-)
+
+diff --git a/xfsettingsd/main.c b/xfsettingsd/main.c
+index 55c4183..99982f7 100644
+--- a/xfsettingsd/main.c
++++ b/xfsettingsd/main.c
+@@ -273,7 +273,7 @@ main (gint argc, gchar **argv)
+ #ifdef HAVE_XRANDR
+ displays_helper = g_object_new (XFCE_TYPE_DISPLAYS_HELPER, NULL);
+ #endif
+- pointer_helper = g_object_new (XFCE_TYPE_POINTERS_HELPER, NULL);
++ pointer_helper = g_object_new (XFCE_TYPE_POINTERS_HELPER, "xsettings-helper", xsettings_helper, NULL);
+ keyboards_helper = g_object_new (XFCE_TYPE_KEYBOARDS_HELPER, NULL);
+ accessibility_helper = g_object_new (XFCE_TYPE_ACCESSIBILITY_HELPER, NULL);
+ shortcuts_helper = g_object_new (XFCE_TYPE_KEYBOARD_SHORTCUTS_HELPER, NULL);
+diff --git a/xfsettingsd/pointers.c b/xfsettingsd/pointers.c
+index e7192e7..62ebc60 100644
+--- a/xfsettingsd/pointers.c
++++ b/xfsettingsd/pointers.c
+@@ -47,8 +47,16 @@
+
+ #define XFCONF_TYPE_G_VALUE_ARRAY (dbus_g_type_get_collection ("GPtrArray", G_TYPE_VALUE))
+
++/* Property identifiers */
++enum
++{
++ PROP_0,
++ PROP_XSETTINGS_HELPER,
++};
++
+
+
++static void xfce_pointers_helper_constructed (GObject *object);
+ static void xfce_pointers_helper_finalize (GObject *object);
+ static void xfce_pointers_helper_syndaemon_stop (XfcePointersHelper *helper);
+ static void xfce_pointers_helper_syndaemon_check (XfcePointersHelper *helper);
+@@ -63,6 +71,10 @@ static GdkFilterReturn xfce_pointers_helper_event_filter (GdkXEvent
+ GdkEvent *gdk_event,
+ gpointer user_data);
+ #endif
++static void xfce_pointers_helper_set_property (GObject *object,
++ guint prop_id,
++ const GValue *value,
++ GParamSpec *pspec);
+
+
+
+@@ -75,6 +87,8 @@ struct _XfcePointersHelper
+ {
+ GObject __parent__;
+
++ GObject *xsettings_helper;
++
+ /* xfconf channel */
+ XfconfChannel *channel;
+
+@@ -108,7 +122,18 @@ xfce_pointers_helper_class_init (XfcePointersHelperClass *klass)
+ {
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+
++ gobject_class->constructed = xfce_pointers_helper_constructed;
+ gobject_class->finalize = xfce_pointers_helper_finalize;
++ gobject_class->set_property = xfce_pointers_helper_set_property;
++
++ g_object_class_install_property (gobject_class,
++ PROP_XSETTINGS_HELPER,
++ g_param_spec_object ("xsettings-helper",
++ "xsettings-helper",
++ "xsettings-helper",
++ G_TYPE_OBJECT,
++ G_PARAM_CONSTRUCT_ONLY |
++ G_PARAM_WRITABLE));
+ }
+
+
+@@ -116,6 +141,15 @@ xfce_pointers_helper_class_init (XfcePointersHelperClass *klass)
+ static void
+ xfce_pointers_helper_init (XfcePointersHelper *helper)
+ {
++ /* All initialisation is done at xfce_pointers_helper_constructed */
++}
++
++
++
++static void
++xfce_pointers_helper_constructed (GObject *object)
++{
++ XfcePointersHelper *helper = XFCE_POINTERS_HELPER (object);
+ XExtensionVersion *version = NULL;
+ Display *xdisplay;
+ #ifdef DEVICE_HOTPLUGGING
+@@ -181,6 +215,27 @@ xfce_pointers_helper_init (XfcePointersHelper *helper)
+
+
+ static void
++xfce_pointers_helper_set_property (GObject *object,
++ guint prop_id,
++ const GValue *value,
++ GParamSpec *pspec)
++{
++ XfcePointersHelper *helper = XFCE_POINTERS_HELPER (object);
++
++ switch (prop_id)
++ {
++ case PROP_XSETTINGS_HELPER:
++ helper->xsettings_helper = g_value_get_object (value);
++ break;
++ default:
++ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
++ break;
++ }
++}
++
++
++
++static void
+ xfce_pointers_helper_finalize (GObject *object)
+ {
+ xfce_pointers_helper_syndaemon_stop (XFCE_POINTERS_HELPER (object));
+--
+1.7.6.5
+
diff --git a/meta-xfce/recipes-xfce/xfce4-settings/xfce4-settings/touchscreen/0004-XfceXSettingsHelper-gets-a-property-touchscreen-poin.patch b/meta-xfce/recipes-xfce/xfce4-settings/xfce4-settings/touchscreen/0004-XfceXSettingsHelper-gets-a-property-touchscreen-poin.patch
new file mode 100644
index 0000000000..180ccfd55f
--- /dev/null
+++ b/meta-xfce/recipes-xfce/xfce4-settings/xfce4-settings/touchscreen/0004-XfceXSettingsHelper-gets-a-property-touchscreen-poin.patch
@@ -0,0 +1,251 @@
+From 878fe1287a4c73f67dd2b51d1d7c450097aeffa7 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?=
+Date: Thu, 20 Dec 2012 16:49:18 +0100
+Subject: [PATCH 4/5] XfceXSettingsHelper gets a property
+ "touchscreen-pointer"
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+When this property is set, it overrides overrides cursor theme to
+"xfce-invisible" and sets /Gtk/TouchscreenMode.
+
+Signed-off-by: Andreas Müller
+Upstream-Status: Submitted [1]
+[1] https://bugzilla.xfce.org/show_bug.cgi?id=9474
+---
+ xfsettingsd/xsettings.c | 122 ++++++++++++++++++++++++++++++++++++++++++++-
+ xfsettingsd/xsettings.xml | 1 +
+ 2 files changed, 122 insertions(+), 1 deletions(-)
+
+diff --git a/xfsettingsd/xsettings.c b/xfsettingsd/xsettings.c
+index 7657465..76bcea1 100644
+--- a/xfsettingsd/xsettings.c
++++ b/xfsettingsd/xsettings.c
+@@ -73,6 +73,15 @@ typedef struct _XfceXSettingsNotify XfceXSettingsNotify;
+
+
+
++/* Property identifiers */
++enum
++{
++ PROP_0,
++ PROP_TOUCHSCREEN_POINTER,
++};
++
++
++
+ static void xfce_xsettings_helper_finalize (GObject *object);
+ static void xfce_xsettings_helper_fc_free (XfceXSettingsHelper *helper);
+ static gboolean xfce_xsettings_helper_fc_init (gpointer data);
+@@ -86,6 +95,10 @@ static void xfce_xsettings_helper_load (XfceXSettingsHelper *helper)
+ static void xfce_xsettings_helper_screen_free (XfceXSettingsScreen *screen);
+ static void xfce_xsettings_helper_notify_xft (XfceXSettingsHelper *helper);
+ static void xfce_xsettings_helper_notify (XfceXSettingsHelper *helper);
++static void xfce_xsettings_helper_set_property (GObject *object,
++ guint prop_id,
++ const GValue *value,
++ GParamSpec *pspec);
+
+
+
+@@ -120,6 +133,13 @@ struct _XfceXSettingsHelper
+ GPtrArray *fc_monitors;
+ guint fc_notify_timeout_id;
+ guint fc_init_id;
++
++ /* keeper for touchscreen cursor theme / last set */
++ GValue *touchscreen_cursor_value;
++ GValue *lastset_cursor_value;
++
++ /* properties */
++ gboolean touchscreen_pointer;
+ };
+
+ struct _XfceXSetting
+@@ -157,6 +177,16 @@ xfce_xsettings_helper_class_init (XfceXSettingsHelperClass *klass)
+
+ gobject_class = G_OBJECT_CLASS (klass);
+ gobject_class->finalize = xfce_xsettings_helper_finalize;
++ gobject_class->set_property = xfce_xsettings_helper_set_property;
++
++ g_object_class_install_property (gobject_class,
++ PROP_TOUCHSCREEN_POINTER,
++ g_param_spec_boolean ("touchscreen-pointer",
++ "touchscreen-pointer",
++ "touchscreen-pointer",
++ FALSE,
++ G_PARAM_WRITABLE |
++ G_PARAM_STATIC_STRINGS));
+ }
+
+
+@@ -169,6 +199,13 @@ xfce_xsettings_helper_init (XfceXSettingsHelper *helper)
+ helper->settings = g_hash_table_new_full (g_str_hash, g_str_equal,
+ g_free, xfce_xsettings_helper_setting_free);
+
++ helper->lastset_cursor_value = g_new0 (GValue, 1);
++ g_value_init(helper->lastset_cursor_value, G_TYPE_STRING);
++ g_value_set_string (helper->lastset_cursor_value, "default");
++ helper->touchscreen_cursor_value = g_new0 (GValue, 1);
++ g_value_init(helper->touchscreen_cursor_value, G_TYPE_STRING);
++ g_value_set_string (helper->touchscreen_cursor_value, "xfce-invisible");
++
+ xfce_xsettings_helper_load (helper);
+
+ g_signal_connect (G_OBJECT (helper->channel), "property-changed",
+@@ -202,6 +239,9 @@ xfce_xsettings_helper_finalize (GObject *object)
+
+ g_hash_table_destroy (helper->settings);
+
++ g_free (helper->lastset_cursor_value);
++ g_free (helper->touchscreen_cursor_value);
++
+ (*G_OBJECT_CLASS (xfce_xsettings_helper_parent_class)->finalize) (object);
+ }
+
+@@ -387,6 +427,61 @@ xfce_xsettings_helper_notify_xft_idle (gpointer data)
+
+
+
++static void
++xfce_xsettings_helper_set_property (GObject *object,
++ guint prop_id,
++ const GValue *value,
++ GParamSpec *pspec)
++{
++ gboolean touchscreen_pointer;
++ XfceXSetting *setting_theme, *setting_touchscreen;
++ XfceXSettingsHelper *helper = XFCE_XSETTINGS_HELPER (object);
++ GtkSettings *gtk_settings;
++ GValue bool_val = { 0, };
++
++ switch (prop_id)
++ {
++ case PROP_TOUCHSCREEN_POINTER:
++ touchscreen_pointer = g_value_get_boolean (value);
++ if (helper->touchscreen_pointer != touchscreen_pointer)
++ {
++ helper->touchscreen_pointer = touchscreen_pointer;
++ /* Update touchscreen-mode */
++ xfconf_channel_set_bool (helper->channel, "/Gtk/TouchscreenMode", touchscreen_pointer);
++ /* Update cursor */
++ setting_theme = g_hash_table_lookup (helper->settings, "/Gtk/CursorThemeName");
++ if (G_LIKELY (setting_theme != NULL))
++ {
++ /* update the serial */
++ setting_theme->last_change_serial = helper->serial;
++ /* update value */
++ g_value_reset (setting_theme->value);
++ g_value_copy (touchscreen_pointer ?
++ helper->touchscreen_cursor_value :
++ helper->lastset_cursor_value,
++ setting_theme->value);
++ }
++ else
++ g_critical("Setting not found for /Gtk/CursorThemeName");
++
++ if (G_LIKELY (setting_touchscreen != NULL || setting_theme != NULL))
++ {
++ /* schedule xsettings update */
++ if (helper->notify_idle_id == 0)
++ helper->notify_idle_id = g_idle_add (xfce_xsettings_helper_notify_idle, helper);
++ if (helper->notify_xft_idle_id == 0)
++ helper->notify_xft_idle_id = g_idle_add (xfce_xsettings_helper_notify_xft_idle, helper);
++ }
++ }
++ break;
++ default:
++ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
++ break;
++ }
++}
++
++
++
+ static gboolean
+ xfce_xsettings_helper_prop_valid (const gchar *prop_name,
+ const GValue *value)
+@@ -413,6 +508,28 @@ xfce_xsettings_helper_prop_valid (const gchar *prop_name,
+
+
+
++static void
++xfce_xsettings_helper_check_cursor (const gchar *prop_name,
++ GValue *value,
++ XfceXSettingsHelper *helper)
++{
++ if (g_strcmp0 (prop_name, "/Gtk/CursorThemeName") == 0)
++ {
++ /* Keep last cursor theme set */
++ g_value_reset (helper->lastset_cursor_value);
++ g_value_copy (value, helper->lastset_cursor_value);
++
++ /* invisible replacement required ? */
++ if (helper->touchscreen_pointer)
++ {
++ g_value_reset (value);
++ g_value_copy (helper->touchscreen_cursor_value, value);
++ }
++ }
++}
++
++
++
+ static gboolean
+ xfce_xsettings_helper_prop_load (gchar *prop_name,
+ GValue *value,
+@@ -426,6 +543,7 @@ xfce_xsettings_helper_prop_load (gchar *prop_name,
+
+ setting = g_slice_new0 (XfceXSetting);
+ setting->value = value;
++ xfce_xsettings_helper_check_cursor (prop_name, setting->value, helper);
+ setting->last_change_serial = helper->serial;
+
+ xfsettings_dbg_filtered (XFSD_DEBUG_XSETTINGS, "prop \"%s\" loaded (type=%s)",
+@@ -462,6 +580,7 @@ xfce_xsettings_helper_prop_changed (XfconfChannel *channel,
+ * it first */
+ g_value_reset (setting->value);
+ g_value_copy (value, setting->value);
++ xfce_xsettings_helper_check_cursor (prop_name, setting->value, helper);
+
+ /* update the serial */
+ setting->last_change_serial = helper->serial;
+@@ -475,6 +594,7 @@ xfce_xsettings_helper_prop_changed (XfconfChannel *channel,
+
+ g_value_init (setting->value, G_VALUE_TYPE (value));
+ g_value_copy (value, setting->value);
++ xfce_xsettings_helper_check_cursor (prop_name, setting->value, helper);
+
+ g_hash_table_insert (helper->settings, g_strdup (prop_name), setting);
+ }
+@@ -649,6 +769,7 @@ xfce_xsettings_helper_notify_xft (XfceXSettingsHelper *helper)
+ XfceXSetting *setting;
+ guint i;
+ GValue bool_val = { 0, };
++
+ const gchar *props[][2] =
+ {
+ /* { xfconf name}, { xft name } */
+@@ -700,7 +821,6 @@ xfce_xsettings_helper_notify_xft (XfceXSettingsHelper *helper)
+ PropModeReplace,
+ (guchar *) resource->str,
+ resource->len);
+-
+ XCloseDisplay (xdisplay);
+
+ if (gdk_error_trap_pop () != 0)
+diff --git a/xfsettingsd/xsettings.xml b/xfsettingsd/xsettings.xml
+index 0a579d6..baa413c 100644
+--- a/xfsettingsd/xsettings.xml
++++ b/xfsettingsd/xsettings.xml
+@@ -41,5 +41,6 @@
+
+
+
++
+
+
+--
+1.7.6.5
+
diff --git a/meta-xfce/recipes-xfce/xfce4-settings/xfce4-settings/touchscreen/0005-pointers-detect-a-change-of-pointer-device-used-and-.patch b/meta-xfce/recipes-xfce/xfce4-settings/xfce4-settings/touchscreen/0005-pointers-detect-a-change-of-pointer-device-used-and-.patch
new file mode 100644
index 0000000000..edcb4e1cd1
--- /dev/null
+++ b/meta-xfce/recipes-xfce/xfce4-settings/xfce4-settings/touchscreen/0005-pointers-detect-a-change-of-pointer-device-used-and-.patch
@@ -0,0 +1,582 @@
+From 37f5e33511499d320c3035c5377425004657faa5 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?=
+Date: Thu, 20 Dec 2012 16:58:19 +0100
+Subject: [PATCH 5/5] pointers: detect a change of pointer-device used and set
+ "touchscreen-pointer" as found in xfconf
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+To detect pointer device in use the DevicePresence-, DeviceMotionNotify- and
+DeviceButtonPress-events are handled. Tests showed that by repopenning and
+closing the pointer devices (e.g when another setting was modified), the events
+stopped working. Therefore all pointer devices are opened only once and managed
+in a hash table.
+
+Signed-off-by: Andreas Müller
+Upstream-Status: Submitted [1]
+[1] https://bugzilla.xfce.org/show_bug.cgi?id=9474
+---
+ xfsettingsd/pointers.c | 337 +++++++++++++++++++++++++++++++----------------
+ 1 files changed, 222 insertions(+), 115 deletions(-)
+
+diff --git a/xfsettingsd/pointers.c b/xfsettingsd/pointers.c
+index 62ebc60..32662cc 100644
+--- a/xfsettingsd/pointers.c
++++ b/xfsettingsd/pointers.c
+@@ -66,11 +66,9 @@ static void xfce_pointers_helper_channel_property_changed (XfconfCha
+ const gchar *property_name,
+ const GValue *value,
+ XfcePointersHelper *helper);
+-#ifdef DEVICE_HOTPLUGGING
+ static GdkFilterReturn xfce_pointers_helper_event_filter (GdkXEvent *xevent,
+ GdkEvent *gdk_event,
+ gpointer user_data);
+-#endif
+ static void xfce_pointers_helper_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+@@ -96,8 +94,11 @@ struct _XfcePointersHelper
+ GPid syndaemon_pid;
+ #endif
+
++ GHashTable *pointer_devices;
++ XID last_pointer_active;
++ gint device_motion_event_type;
++ gint device_button_press_event_type;
+ #ifdef DEVICE_HOTPLUGGING
+- /* device presence event type */
+ gint device_presence_event_type;
+ #endif
+ };
+@@ -117,6 +118,15 @@ G_DEFINE_TYPE (XfcePointersHelper, xfce_pointers_helper, G_TYPE_OBJECT);
+
+
+
++typedef struct
++{
++ XDevice *device;
++ gchar* name;
++}
++XfcePointerDeviceData;
++
++
++
+ static void
+ xfce_pointers_helper_class_init (XfcePointersHelperClass *klass)
+ {
+@@ -147,6 +157,18 @@ xfce_pointers_helper_init (XfcePointersHelper *helper)
+
+
+ static void
++xfce_pointers_device_close (gpointer data)
++{
++ XfcePointerDeviceData *device_data = data;
++
++ XCloseDevice (GDK_DISPLAY (), device_data->device);
++ g_free (device_data->name);
++ g_free (device_data);
++}
++
++
++
++static void
+ xfce_pointers_helper_constructed (GObject *object)
+ {
+ XfcePointersHelper *helper = XFCE_POINTERS_HELPER (object);
+@@ -185,6 +207,10 @@ xfce_pointers_helper_constructed (GObject *object)
+ helper->channel = xfconf_channel_get ("pointers");
+
+ /* restore the pointer devices */
++ helper->pointer_devices = g_hash_table_new_full (g_int_hash,
++ g_int_equal,
++ g_free,
++ xfce_pointers_device_close);
+ xfce_pointers_helper_restore_devices (helper, NULL);
+
+ /* monitor the channel */
+@@ -194,21 +220,20 @@ xfce_pointers_helper_constructed (GObject *object)
+ /* launch syndaemon if required */
+ xfce_pointers_helper_syndaemon_check (helper);
+
+-#ifdef DEVICE_HOTPLUGGING
+ if (G_LIKELY (xdisplay != NULL))
+ {
++#ifdef DEVICE_HOTPLUGGING
+ /* monitor device changes */
+ gdk_error_trap_push ();
+ DevicePresence (xdisplay, helper->device_presence_event_type, event_class);
+ XSelectExtensionEvent (xdisplay, RootWindow (xdisplay, DefaultScreen (xdisplay)), &event_class, 1);
+
+ /* add an event filter */
+- if (gdk_error_trap_pop () == 0)
+- gdk_window_add_filter (NULL, xfce_pointers_helper_event_filter, helper);
+- else
++ if (gdk_error_trap_pop () != 0)
+ g_warning ("Failed to create device filter");
+- }
+ #endif
++ gdk_window_add_filter (NULL, xfce_pointers_helper_event_filter, helper);
++ }
+ }
+ }
+
+@@ -238,7 +263,10 @@ xfce_pointers_helper_set_property (GObject *object,
+ static void
+ xfce_pointers_helper_finalize (GObject *object)
+ {
+- xfce_pointers_helper_syndaemon_stop (XFCE_POINTERS_HELPER (object));
++ XfcePointersHelper* helper = XFCE_POINTERS_HELPER (object);
++
++ xfce_pointers_helper_syndaemon_stop (helper);
++ g_hash_table_destroy (helper->pointer_devices);
+
+ (*G_OBJECT_CLASS (xfce_pointers_helper_parent_class)->finalize) (object);
+ }
+@@ -267,17 +295,17 @@ static void
+ xfce_pointers_helper_syndaemon_check (XfcePointersHelper *helper)
+ {
+ #ifdef DEVICE_PROPERTIES
+- Display *xdisplay = GDK_DISPLAY ();
+- XDeviceInfo *device_list;
+- XDevice *device;
+- gint n, ndevices;
+- Atom touchpad_type;
+- Atom touchpad_off_prop;
+- Atom *props;
+- gint i, nprops;
+- gboolean have_synaptics = FALSE;
+- gchar *args[] = { "syndaemon", "-i", "2.0", "-K", "-R", NULL };
+- GError *error = NULL;
++ Display *xdisplay = GDK_DISPLAY ();
++ XDeviceInfo *device_list;
++ XfcePointerDeviceData *device_data;
++ gint n, ndevices;
++ Atom touchpad_type;
++ Atom touchpad_off_prop;
++ Atom *props;
++ gint i, nprops;
++ gboolean have_synaptics = FALSE;
++ gchar *args[] = { "syndaemon", "-i", "2.0", "-K", "-R", NULL };
++ GError *error = NULL;
+
+ /* only stop a running daemon */
+ if (!xfconf_channel_get_bool (helper->channel, "/DisableTouchpadWhileTyping", FALSE))
+@@ -297,17 +325,16 @@ xfce_pointers_helper_syndaemon_check (XfcePointersHelper *helper)
+ if (device_list[n].type != touchpad_type)
+ continue;
+
+- gdk_error_trap_push ();
+- device = XOpenDevice (xdisplay, device_list[n].id);
+- if (gdk_error_trap_pop () != 0 || device == NULL)
++ device_data = g_hash_table_lookup (helper->pointer_devices, &device_list[n].id);
++ if (device_data == NULL)
+ {
+- g_critical ("Unable to open device %s", device_list[n].name);
++ g_critical ("xfce_pointers_helper_syndaemon_check: Unable to find device %s / ID %i in hash table", device_list[n].name, device_list[n].id);
+ break;
+ }
+
+ /* look for the Synaptics Off property */
+ gdk_error_trap_push ();
+- props = XListDeviceProperties (xdisplay, device, &nprops);
++ props = XListDeviceProperties (xdisplay, device_data->device, &nprops);
+ if (gdk_error_trap_pop () == 0
+ && props != NULL)
+ {
+@@ -317,8 +344,6 @@ xfce_pointers_helper_syndaemon_check (XfcePointersHelper *helper)
+ XFree (props);
+ }
+
+- XCloseDevice (xdisplay, device);
+-
+ if (have_synaptics)
+ break;
+ }
+@@ -844,24 +869,56 @@ xfce_pointers_helper_change_properties (gpointer key,
+
+
+ static void
++xfce_pointers_helper_change_current_device (XfcePointersHelper *helper,
++ XID *xid)
++{
++ XfcePointerDeviceData *device_data;
++ gchar* prop;
++ GValue bool_val = { 0, };
++
++ helper->last_pointer_active = *xid;
++ device_data = g_hash_table_lookup (helper->pointer_devices, xid);
++ if (device_data == NULL)
++ {
++ g_critical ("Unable to find device ID %i in hash table", *xid);
++ return;
++ }
++ if (G_LIKELY (G_IS_OBJECT (helper->xsettings_helper)))
++ {
++ prop = g_strconcat ("/", device_data->name, "/TouchscreenPointer", NULL);
++ g_value_init (&bool_val, G_TYPE_BOOLEAN);
++ g_value_set_boolean (&bool_val,
++ xfconf_channel_get_bool (helper->channel, prop, FALSE));
++ g_object_set_property (helper->xsettings_helper, "touchscreen-pointer", &bool_val);
++ g_value_unset (&bool_val);
++ g_free (prop);
++ }
++ else
++ g_critical ("xsettings_helper was not properly set");
++}
++
++
++static void
+ xfce_pointers_helper_restore_devices (XfcePointersHelper *helper,
+ XID *xid)
+ {
+- Display *xdisplay = GDK_DISPLAY ();
+- XDeviceInfo *device_list, *device_info;
+- gint n, ndevices;
+- XDevice *device;
+- gchar *device_name;
+- gchar prop[256];
+- gboolean right_handed;
+- gboolean reverse_scrolling;
+- gint threshold;
+- gdouble acceleration;
++ Display *xdisplay = GDK_DISPLAY ();
++ XDeviceInfo *device_list, *device_info;
++ gint n, ndevices;
++ XDevice *device;
++ XfcePointerDeviceData *device_data;
++ gchar *device_name;
++ gchar prop[256];
++ gboolean right_handed;
++ gboolean reverse_scrolling;
++ gint threshold;
++ gdouble acceleration;
++ XEventClass event_classes[2];
+ #ifdef DEVICE_PROPERTIES
+- GHashTable *props;
+- XfcePointerData pointer_data;
++ GHashTable *props;
++ XfcePointerData pointer_data;
+ #endif
+- const gchar *mode;
++ const gchar *mode;
+
+ gdk_error_trap_push ();
+ device_list = XListInputDevices (xdisplay, &ndevices);
+@@ -873,84 +930,107 @@ xfce_pointers_helper_restore_devices (XfcePointersHelper *helper,
+
+ for (n = 0; n < ndevices; n++)
+ {
+- /* filter the pointer devices */
++ /* filter the physical pointer devices */
+ device_info = &device_list[n];
+ if (device_info->use != IsXExtensionPointer
+- || device_info->name == NULL)
++ || device_info->name == NULL
++ || g_str_has_prefix (device_info->name, "Virtual core XTEST"))
+ continue;
+
+ /* filter out the device if one is set */
+ if (xid != NULL && device_info->id != *xid)
+ continue;
+
+- /* open the device */
+- gdk_error_trap_push ();
+- device = XOpenDevice (xdisplay, device_info->id);
+- if (gdk_error_trap_pop () != 0 || device == NULL)
++ device_data = g_hash_table_lookup (helper->pointer_devices, &device_info->id);
++ if (device_data == NULL)
+ {
+- g_critical ("Unable to open device %s", device_info->name);
+- continue;
+- }
++ /* open the device and insert to hash */
++ gdk_error_trap_push ();
++ device = XOpenDevice (xdisplay, device_info->id);
++ if (G_UNLIKELY(gdk_error_trap_pop () != 0 || device == NULL))
++ {
++ g_critical ("Unable to open device %s / ID: %i", device_info->name, device_info->id);
++ continue;
++ }
+
+- /* create a valid xfconf property name for the device */
+- device_name = xfce_pointers_helper_device_xfconf_name (device_info->name);
++ /* create a valid xfconf property name for the device */
++ device_name = xfce_pointers_helper_device_xfconf_name (device_info->name);
+
+- /* read buttonmap properties */
+- g_snprintf (prop, sizeof (prop), "/%s/RightHanded", device_name);
+- right_handed = xfconf_channel_get_bool (helper->channel, prop, -1);
++ /* add device to our list */
++ device_data = g_new (XfcePointerDeviceData, 1);
++ device_data->device = device;
++ device_data->name = device_name;
++ g_hash_table_insert (helper->pointer_devices, g_memdup (&device_info->id, sizeof(device_info->id)), device_data);
+
+- g_snprintf (prop, sizeof (prop), "/%s/ReverseScrolling", device_name);
+- reverse_scrolling = xfconf_channel_get_bool (helper->channel, prop, -1);
++ /* catch motion event / button-press for new device */
++ gdk_error_trap_push ();
++ DeviceMotionNotify (device, helper->device_motion_event_type, event_classes[0]);
++ DeviceButtonPress (device, helper->device_button_press_event_type, event_classes[1]);
++ XSelectExtensionEvent (xdisplay, RootWindow (xdisplay, DefaultScreen (xdisplay)), event_classes, 2);
++ if (G_UNLIKELY (gdk_error_trap_pop () != 0))
++ g_critical ("Unable to register DeviceButtonPress/DeviceMotionNotify for %i", device_info->id);
+
+- if (right_handed != -1 || reverse_scrolling != -1)
+- {
+- xfce_pointers_helper_change_button_mapping (device_info, device, xdisplay,
++
++ /* read buttonmap properties */
++ g_snprintf (prop, sizeof (prop), "/%s/RightHanded", device_name);
++ right_handed = xfconf_channel_get_bool (helper->channel, prop, -1);
++
++ g_snprintf (prop, sizeof (prop), "/%s/ReverseScrolling", device_name);
++ reverse_scrolling = xfconf_channel_get_bool (helper->channel, prop, -1);
++
++ if (right_handed != -1 || reverse_scrolling != -1)
++ {
++ xfce_pointers_helper_change_button_mapping (device_info, device, xdisplay,
+ right_handed, reverse_scrolling);
+- }
++ }
+
+- /* read feedback settings */
+- g_snprintf (prop, sizeof (prop), "/%s/Threshold", device_name);
+- threshold = xfconf_channel_get_int (helper->channel, prop, -1);
++ /* read feedback settings */
++ g_snprintf (prop, sizeof (prop), "/%s/Threshold", device_name);
++ threshold = xfconf_channel_get_int (helper->channel, prop, -1);
+
+- g_snprintf (prop, sizeof (prop), "/%s/Acceleration", device_name);
+- acceleration = xfconf_channel_get_double (helper->channel, prop, -1.00);
++ g_snprintf (prop, sizeof (prop), "/%s/Acceleration", device_name);
++ acceleration = xfconf_channel_get_double (helper->channel, prop, -1.00);
+
+- if (threshold != -1 || acceleration != -1.00)
+- {
+- xfce_pointers_helper_change_feedback (device_info, device, xdisplay,
+- threshold, acceleration);
+- }
++ if (threshold != -1 || acceleration != -1.00)
++ {
++ xfce_pointers_helper_change_feedback (device_info, device, xdisplay,
++ threshold, acceleration);
++ }
+
+- /* read mode settings */
+- g_snprintf (prop, sizeof (prop), "/%s/Mode", device_name);
+- mode = xfconf_channel_get_string (helper->channel, prop, NULL);
++ /* read mode settings */
++ g_snprintf (prop, sizeof (prop), "/%s/Mode", device_name);
++ mode = xfconf_channel_get_string (helper->channel, prop, NULL);
+
+- if (mode != NULL)
+- xfce_pointers_helper_change_mode (device_info, device, xdisplay, mode);
++ if (mode != NULL)
++ xfce_pointers_helper_change_mode (device_info, device, xdisplay, mode);
+
+ #ifdef DEVICE_PROPERTIES
+- /* set device properties */
+- g_snprintf (prop, sizeof (prop), "/%s/Properties", device_name);
+- props = xfconf_channel_get_properties (helper->channel, prop);
++ /* set device properties */
++ g_snprintf (prop, sizeof (prop), "/%s/Properties", device_name);
++ props = xfconf_channel_get_properties (helper->channel, prop);
+
+- if (props != NULL)
+- {
+- pointer_data.xdisplay = xdisplay;
+- pointer_data.device = device;
+- pointer_data.device_info = device_info;
+- pointer_data.prop_name_len = strlen (prop) + 1;
++ if (props != NULL)
++ {
++ pointer_data.xdisplay = xdisplay;
++ pointer_data.device = device;
++ pointer_data.device_info = device_info;
++ pointer_data.prop_name_len = strlen (prop) + 1;
+
+- g_hash_table_foreach (props, xfce_pointers_helper_change_properties, &pointer_data);
++ g_hash_table_foreach (props, xfce_pointers_helper_change_properties, &pointer_data);
+
+- g_hash_table_destroy (props);
+- }
++ g_hash_table_destroy (props);
++ }
+ #endif
+-
+- g_free (device_name);
+- XCloseDevice (xdisplay, device);
++ }
+ }
+-
+ XFreeDeviceList (device_list);
++ if (G_LIKELY (device_data != NULL))
++ {
++ if (helper->last_pointer_active != device_data->device->device_id)
++ xfce_pointers_helper_change_current_device (helper, &device_data->device->device_id);
++ }
++ else
++ g_critical("no device selected in xfce_pointers_helper_restore_devices");
+ }
+
+
+@@ -961,12 +1041,12 @@ xfce_pointers_helper_channel_property_changed (XfconfChannel *channel,
+ const GValue *value,
+ XfcePointersHelper *helper)
+ {
+- Display *xdisplay = GDK_DISPLAY ();
+- XDeviceInfo *device_list, *device_info;
+- XDevice *device;
+- gint n, ndevices;
+- gchar **names;
+- gchar *device_name;
++ Display *xdisplay = GDK_DISPLAY ();
++ XDeviceInfo *device_list, *device_info;
++ XfcePointerDeviceData *device_data;
++ gint n, ndevices;
++ gchar **names;
++ gchar *device_name;
+
+ if (G_UNLIKELY (property_name == NULL))
+ return;
+@@ -996,63 +1076,72 @@ xfce_pointers_helper_channel_property_changed (XfconfChannel *channel,
+ /* filter the pointer devices */
+ device_info = &device_list[n];
+ if (device_info->use != IsXExtensionPointer
+- || device_info->name == NULL)
++ || device_info->name == NULL
++ || g_str_has_prefix (device_info->name, "Virtual core XTEST"))
+ continue;
+
+ /* search the device name */
+ device_name = xfce_pointers_helper_device_xfconf_name (device_info->name);
+ if (strcmp (names[0], device_name) == 0)
+ {
+- /* open the device */
+- gdk_error_trap_push ();
+- device = XOpenDevice (xdisplay, device_info->id);
+- if (gdk_error_trap_pop () != 0 || device == NULL)
++ /* find the device */
++ device_data = g_hash_table_lookup (helper->pointer_devices, &device_info->id);
++ if (device_data == NULL)
+ {
+- g_critical ("Unable to open device %s", device_info->name);
++ g_critical ("xfce_pointers_helper_channel_property_changed: Unable to find device %s / ID %i in hash table", device_info->name, device_info->id);
+ continue;
+ }
+
+ /* check the property that requires updating */
+ if (strcmp (names[1], "RightHanded") == 0)
+ {
+- xfce_pointers_helper_change_button_mapping (device_info, device, xdisplay,
++ xfce_pointers_helper_change_button_mapping (device_info, device_data->device, xdisplay,
+ g_value_get_boolean (value), -1);
+ }
+ else if (strcmp (names[1], "ReverseScrolling") == 0)
+ {
+- xfce_pointers_helper_change_button_mapping (device_info, device, xdisplay,
++ xfce_pointers_helper_change_button_mapping (device_info, device_data->device, xdisplay,
+ -1, g_value_get_boolean (value));
+ }
+ else if (strcmp (names[1], "Threshold") == 0)
+ {
+- xfce_pointers_helper_change_feedback (device_info, device, xdisplay,
++ xfce_pointers_helper_change_feedback (device_info, device_data->device, xdisplay,
+ g_value_get_int (value), -2.00);
+ }
+ else if (strcmp (names[1], "Acceleration") == 0)
+ {
+- xfce_pointers_helper_change_feedback (device_info, device, xdisplay,
++ xfce_pointers_helper_change_feedback (device_info, device_data->device, xdisplay,
+ -2, g_value_get_double (value));
+ }
+ #ifdef DEVICE_PROPERTIES
+ else if (strcmp (names[1], "Properties") == 0)
+ {
+- xfce_pointers_helper_change_property (device_info, device, xdisplay,
++ xfce_pointers_helper_change_property (device_info, device_data->device, xdisplay,
+ names[2], value);
+ }
+ #endif
+ else if (strcmp (names[1], "Mode") == 0)
+ {
+- xfce_pointers_helper_change_mode (device_info, device, xdisplay,
++ xfce_pointers_helper_change_mode (device_info, device_data->device, xdisplay,
+ g_value_get_string (value));
+ }
++ else if (strcmp (names[1], "TouchscreenPointer") == 0)
++ {
++ /* only hide if the current device's property was changed */
++ if (device_info->id == helper->last_pointer_active)
++ {
++ if (G_LIKELY (G_IS_OBJECT (helper->xsettings_helper)))
++ g_object_set_property (helper->xsettings_helper, "touchscreen-pointer", value);
++ else
++ g_critical ("xsettings_helper was not properly set");
++ }
++ }
+ else
+ {
+ g_warning ("Unknown property %s set for device %s",
+ property_name, device_info->name);
+ }
+
+- XCloseDevice (xdisplay, device);
+-
+ /* stop searching */
+ n = ndevices;
+ }
+@@ -1068,26 +1157,44 @@ xfce_pointers_helper_channel_property_changed (XfconfChannel *channel,
+
+
+
+-#ifdef DEVICE_HOTPLUGGING
+ static GdkFilterReturn
+ xfce_pointers_helper_event_filter (GdkXEvent *xevent,
+ GdkEvent *gdk_event,
+ gpointer user_data)
+ {
++ XDevicePresenceNotifyEvent *dpn_event;
+ XEvent *event = xevent;
+- XDevicePresenceNotifyEvent *dpn_event = xevent;
+ XfcePointersHelper *helper = XFCE_POINTERS_HELPER (user_data);
+
+- if (event->type == helper->device_presence_event_type)
++ /* Comparison for device changed is done here redundantly to prevent call
++ * on every mouse move.
++ */
++ if (event->type == helper->device_motion_event_type
++ && helper->last_pointer_active != ((XDeviceMotionEvent*)xevent)->deviceid)
++ xfce_pointers_helper_change_current_device (helper, &((XDeviceMotionEvent*)xevent)->deviceid);
++ else if (event->type == helper->device_button_press_event_type
++ && helper->last_pointer_active != ((XDeviceButtonEvent*)xevent)->deviceid)
++ xfce_pointers_helper_change_current_device (helper, &((XDeviceButtonEvent*)xevent)->deviceid);
++
++#ifdef DEVICE_HOTPLUGGING
++ /* handle device add/remove */
++ else if (event->type == helper->device_presence_event_type)
+ {
++ dpn_event = xevent;
+ /* restore device settings */
+ if (dpn_event->devchange == DeviceAdded)
+ xfce_pointers_helper_restore_devices (helper, &dpn_event->deviceid);
++ else if(dpn_event->devchange == DeviceRemoved)
++ /* we could try to find a remaining pointer to set that as active
++ * one but that might not fit and as soon as the user works with
++ * another pointer we are changing to correct one.
++ */
++ g_hash_table_remove (helper->pointer_devices, &dpn_event->deviceid);
+
+ /* check if we need to launch syndaemon */
+ xfce_pointers_helper_syndaemon_check (helper);
+ }
++#endif
+
+ return GDK_FILTER_CONTINUE;
+ }
+-#endif
+--
+1.7.6.5
+
diff --git a/meta-xfce/recipes-xfce/xfce4-settings/xfce4-settings/touchscreen/invisible b/meta-xfce/recipes-xfce/xfce4-settings/xfce4-settings/touchscreen/invisible
new file mode 100644
index 0000000000..ef4d9aadb6
Binary files /dev/null and b/meta-xfce/recipes-xfce/xfce4-settings/xfce4-settings/touchscreen/invisible differ
diff --git a/meta-xfce/recipes-xfce/xfce4-settings/xfce4-settings/touchscreen/wait b/meta-xfce/recipes-xfce/xfce4-settings/xfce4-settings/touchscreen/wait
new file mode 100644
index 0000000000..8b9ac7e20a
Binary files /dev/null and b/meta-xfce/recipes-xfce/xfce4-settings/xfce4-settings/touchscreen/wait differ
diff --git a/meta-xfce/recipes-xfce/xfce4-settings/xfce4-settings_4.10.0.bb b/meta-xfce/recipes-xfce/xfce4-settings/xfce4-settings_4.10.0.bb
index 7075e2a534..9b6205b2dd 100644
--- a/meta-xfce/recipes-xfce/xfce4-settings/xfce4-settings_4.10.0.bb
+++ b/meta-xfce/recipes-xfce/xfce4-settings/xfce4-settings_4.10.0.bb
@@ -3,15 +3,29 @@ SECTION = "x11/wm"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
DEPENDS = "exo garcon gtk+ libxfce4util libxfce4ui xfconf dbus-glib libxi virtual/libx11 xrandr libnotify libxcursor libxklavier"
-PR = "r1"
+PR = "r2"
inherit xfce
SRC_URI += "file://0001-xsettings.xml-remove-trouble-causing-comment.patch \
- file://0002-xsettings.xml-Set-default-themes.patch"
+ file://0002-xsettings.xml-Set-default-themes.patch \
+ file://touchscreen/invisible \
+ file://touchscreen/wait \
+ file://touchscreen/0001-add-cursor-theme-xfce-invisible.patch \
+ file://touchscreen/0002-mouse-settings-dialog-add-touchscreen-pointer-option.patch \
+ file://touchscreen/0003-XfcePointersHelper-gets-a-pointer-to-XfceXSettingsHe.patch \
+ file://touchscreen/0004-XfceXSettingsHelper-gets-a-property-touchscreen-poin.patch \
+ file://touchscreen/0005-pointers-detect-a-change-of-pointer-device-used-and-.patch \
+"
SRC_URI[md5sum] = "cc4dd9179ead9046c056431f01a12000"
SRC_URI[sha256sum] = "0843f09ba9673f1d1b5df8dce4a17b63c183a9ba3be75fb6ef99a67fc8c1f77e"
FILES_${PN} += "${libdir}/xfce4"
+do_install_prepend() {
+ # somehow binary files are not patched correctly by oe-patch - so copy them
+ cp ${WORKDIR}/touchscreen/invisible ${S}/cursors
+ cp ${WORKDIR}/touchscreen/wait ${S}/cursors
+}
+
RRECOMMENDS_${PN} += "gnome-icon-theme"