summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorinfirit <[email protected]>2015-09-07 00:22:12 +0200
committerinfirit <[email protected]>2015-09-07 00:57:10 +0200
commit8b237cf41192cb75f3ff00a2c3b3d3c050c71bf7 (patch)
tree8a42533d1284dc08fd718a1f9b7de26c1e8a0aae
parentc8f01f720cfe1e048932ee912cb2039c85ab2622 (diff)
downloadlibmatekbd-8b237cf41192cb75f3ff00a2c3b3d3c050c71bf7.tar.bz2
libmatekbd-8b237cf41192cb75f3ff00a2c3b3d3c050c71bf7.tar.xz
Gtk3: Use draw as callback function
-rw-r--r--libmatekbd/matekbd-keyboard-drawing.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/libmatekbd/matekbd-keyboard-drawing.c b/libmatekbd/matekbd-keyboard-drawing.c
index 4b1c5ef..643a371 100644
--- a/libmatekbd/matekbd-keyboard-drawing.c
+++ b/libmatekbd/matekbd-keyboard-drawing.c
@@ -1406,13 +1406,15 @@ free_render_context (MatekbdKeyboardDrawing * drawing)
}
static gboolean
-expose_event (GtkWidget * widget,
#if GTK_CHECK_VERSION (3, 0, 0)
- cairo_t *cr,
+draw (GtkWidget *widget,
+ cairo_t *cr,
+ MatekbdKeyboardDrawing *drawing)
#else
- GdkEventExpose * event,
+expose_event (GtkWidget *widget,
+ GdkEventExpose *event,
+ MatekbdKeyboardDrawing *drawing)
#endif
- MatekbdKeyboardDrawing * drawing)
{
GtkAllocation allocation;
@@ -2141,10 +2143,11 @@ matekbd_keyboard_drawing_init (MatekbdKeyboardDrawing * drawing)
| GDK_FOCUS_CHANGE_MASK);
#if GTK_CHECK_VERSION (3, 0, 0)
g_signal_connect (G_OBJECT (drawing), "draw",
+ G_CALLBACK (draw), drawing);
#else
g_signal_connect (G_OBJECT (drawing), "expose-event",
-#endif
G_CALLBACK (expose_event), drawing);
+#endif
g_signal_connect_after (G_OBJECT (drawing), "key-press-event",
G_CALLBACK (key_event), drawing);
g_signal_connect_after (G_OBJECT (drawing), "key-release-event",