[gnome-control-center] wacom: Show the cursor in the calibrator UI when used from test_wacom
- From: Joaquim Manuel Pereira Rocha <jrocha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] wacom: Show the cursor in the calibrator UI when used from test_wacom
- Date: Tue, 16 Apr 2013 12:47:45 +0000 (UTC)
commit 3702a5679379099d6f8d5cc22e7a1f8b1b9b22bc
Author: Joaquim Rocha <me joaquimrocha com>
Date: Tue Apr 16 14:25:29 2013 +0200
wacom: Show the cursor in the calibrator UI when used from test_wacom
This functionality is dictated by the definition of FAKE_AREA in the
CPPFLAGS.
panels/wacom/calibrator/Makefile.am | 1 +
panels/wacom/calibrator/gui_gtk.c | 7 ++++++-
2 files changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/panels/wacom/calibrator/Makefile.am b/panels/wacom/calibrator/Makefile.am
index de4a5cc..74d4385 100644
--- a/panels/wacom/calibrator/Makefile.am
+++ b/panels/wacom/calibrator/Makefile.am
@@ -21,6 +21,7 @@ libwacom_calibrator_la_LDFLAGS = $(PANEL_LDFLAGS)
libwacom_calibrator_test_la_SOURCES = $(libwacom_calibrator_la_SOURCES)
+libwacom_calibrator_test_la_CPPFLAGS = -DFAKE_AREA
libwacom_calibrator_test_la_LIBADD = $(libwacom_calibrator_la_LIBADD)
libwacom_calibrator_test_la_LDFLAGS = $(libwacom_calibrator_la_LDFLAGS)
diff --git a/panels/wacom/calibrator/gui_gtk.c b/panels/wacom/calibrator/gui_gtk.c
index 91fc4f7..62bffbe 100644
--- a/panels/wacom/calibrator/gui_gtk.c
+++ b/panels/wacom/calibrator/gui_gtk.c
@@ -460,7 +460,9 @@ calib_area_new (GdkScreen *screen,
GdkRectangle rect;
GdkWindow *window;
GdkRGBA black;
+#ifndef FAKE_AREA
GdkCursor *cursor;
+#endif /* FAKE_AREA */
g_return_val_if_fail (old_axis, NULL);
g_return_val_if_fail (callback, NULL);
@@ -494,10 +496,13 @@ calib_area_new (GdkScreen *screen,
window = gtk_widget_get_window (calib_area->window);
gdk_window_set_background_rgba (window, &black);
- /* No cursor */
+#ifndef FAKE_AREA
+ /* No cursor (unless we're faking the area
+ which might be convenient) */
cursor = gdk_cursor_new (GDK_BLANK_CURSOR);
gdk_window_set_cursor (window, cursor);
g_object_unref (cursor);
+#endif /* FAKE_AREA */
/* Listen for mouse events */
gtk_widget_add_events (calib_area->window, GDK_KEY_RELEASE_MASK | GDK_BUTTON_PRESS_MASK);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]