Mercurial > dwindows
comparison gtk4/dw.c @ 2340:d797d1cec06b
GTK4: Remove some debug code and safety checks in new dw_flush() code.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Wed, 03 Mar 2021 03:59:20 +0000 |
parents | 6ad84c425bbd |
children | 1a630cddf384 |
comparison
equal
deleted
inserted
replaced
2339:6ad84c425bbd | 2340:d797d1cec06b |
---|---|
708 static gint _dw_button_press_event(GtkGestureSingle *gesture, int n_press, double x, double y, gpointer data) | 708 static gint _dw_button_press_event(GtkGestureSingle *gesture, int n_press, double x, double y, gpointer data) |
709 { | 709 { |
710 SignalHandler work = _dw_get_signal_handler(data); | 710 SignalHandler work = _dw_get_signal_handler(data); |
711 int retval = FALSE; | 711 int retval = FALSE; |
712 | 712 |
713 dw_debug("Button press event %dx%d\n", (int)x, (int)y); | |
714 if(work.window) | 713 if(work.window) |
715 { | 714 { |
716 int (*buttonfunc)(HWND, int, int, int, void *) = work.func; | 715 int (*buttonfunc)(HWND, int, int, int, void *) = work.func; |
717 int mybutton = gtk_gesture_single_get_current_button(gesture); | 716 int mybutton = gtk_gesture_single_get_current_button(gesture); |
718 | 717 |
7052 DW_FUNCTION_RETURN_THIS(pixmap); | 7051 DW_FUNCTION_RETURN_THIS(pixmap); |
7053 } | 7052 } |
7054 | 7053 |
7055 static void _dw_flush_dirty(gpointer widget, gpointer data) | 7054 static void _dw_flush_dirty(gpointer widget, gpointer data) |
7056 { | 7055 { |
7057 gtk_widget_queue_draw(GTK_WIDGET(widget)); | 7056 if(widget && GTK_IS_WIDGET(widget)) |
7057 gtk_widget_queue_draw(GTK_WIDGET(widget)); | |
7058 } | 7058 } |
7059 | 7059 |
7060 /* Call this after drawing to the screen to make sure | 7060 /* Call this after drawing to the screen to make sure |
7061 * anything you have drawn is visible. | 7061 * anything you have drawn is visible. |
7062 */ | 7062 */ |