[mousetweaks] Remove GdkGc based drawing code
- From: Gerd Kohlberger <gerdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mousetweaks] Remove GdkGc based drawing code
- Date: Sun, 10 Oct 2010 13:06:42 +0000 (UTC)
commit 12a6b244cb88d18de6d474c149f711ec424ca3c7
Author: Gerd Kohlberger <gerdk src gnome org>
Date: Sun Oct 10 14:58:11 2010 +0200
Remove GdkGc based drawing code
Fixes building with GTK 3.
src/mt-main.c | 46 ----------------------------------------------
src/mt-main.h | 2 --
2 files changed, 0 insertions(+), 48 deletions(-)
---
diff --git a/src/mt-main.c b/src/mt-main.c
index 5b66f56..1f18af7 100644
--- a/src/mt-main.c
+++ b/src/mt-main.c
@@ -280,25 +280,6 @@ mt_main_analyze_gesture (MtData *mt)
}
static void
-mt_main_draw_line (MtData *mt, gint x1, gint y1, gint x2, gint y2)
-{
- GdkWindow *root;
- GdkGC *gc;
-
- root = gdk_screen_get_root_window (mt_main_current_screen (mt));
- gc = gdk_gc_new (root);
- gdk_gc_set_subwindow (gc, GDK_INCLUDE_INFERIORS);
- gdk_gc_set_function (gc, GDK_INVERT);
- gdk_gc_set_line_attributes (gc, 1,
- GDK_LINE_SOLID,
- GDK_CAP_ROUND,
- GDK_JOIN_ROUND);
- gdk_draw_arc (root, gc, TRUE, x1 - 4, y1 - 4, 8, 8, 0, 23040);
- gdk_draw_line (root, gc, x1, y1, x2, y2);
- g_object_unref (gc);
-}
-
-static void
dwell_start_gesture (MtData *mt)
{
GdkCursor *cursor;
@@ -331,15 +312,6 @@ dwell_stop_gesture (MtData *mt)
else
mt_main_set_cursor (mt, GDK_LEFT_PTR);
- if (mt->x_old > -1 && mt->y_old > -1)
- {
- mt_main_draw_line (mt,
- mt->pointer_x, mt->pointer_y,
- mt->x_old, mt->y_old);
- mt->x_old = -1;
- mt->y_old = -1;
- }
-
mt->dwell_gesture_started = FALSE;
mt_timer_stop (mt->dwell_timer);
}
@@ -440,21 +412,6 @@ global_motion_event (MtListener *listener,
mt->pointer_y = event->y;
mt_timer_start (mt->dwell_timer);
}
-
- if (mt->dwell_gesture_started)
- {
- if (mt->x_old > -1 && mt->y_old > -1)
- {
- mt_main_draw_line (mt,
- mt->pointer_x, mt->pointer_y,
- mt->x_old, mt->y_old);
- }
- mt_main_draw_line (mt,
- mt->pointer_x, mt->pointer_y,
- event->x, event->y);
- mt->x_old = event->x;
- mt->y_old = event->y;
- }
}
}
@@ -773,9 +730,6 @@ mt_data_init (void)
mt->service = mt_service_get_default ();
mt->n_screens = gdk_display_get_n_screens (gdk_display_get_default ());
- mt->x_old = -1;
- mt->y_old = -1;
-
return mt;
}
diff --git a/src/mt-main.h b/src/mt-main.h
index aae9f52..818f020 100644
--- a/src/mt-main.h
+++ b/src/mt-main.h
@@ -41,8 +41,6 @@ struct _MtData
gint direction;
gint pointer_x;
gint pointer_y;
- gint x_old;
- gint y_old;
/* options */
gint threshold;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]