diff options
author | Monsta <[email protected]> | 2015-11-02 22:00:29 +0300 |
---|---|---|
committer | Wolfgang Ulbrich <[email protected]> | 2015-11-13 11:26:49 +0100 |
commit | 8760b08f28f44f46edcca119fef1f768a93267bd (patch) | |
tree | 1130d7f59582e3ac66e430e1f523a89c7b58b4cf | |
parent | 06ccb7a39e494e731436f7e6de044ff113c14896 (diff) | |
download | mate-desktop-8760b08f28f44f46edcca119fef1f768a93267bd.tar.bz2 mate-desktop-8760b08f28f44f46edcca119fef1f768a93267bd.tar.xz |
refactor draw/expose code a bit and set the correct return type
-rw-r--r-- | libmate-desktop/mate-colorbutton.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/libmate-desktop/mate-colorbutton.c b/libmate-desktop/mate-colorbutton.c index ff62e16..2f65e64 100644 --- a/libmate-desktop/mate-colorbutton.c +++ b/libmate-desktop/mate-colorbutton.c @@ -257,26 +257,24 @@ mate_color_button_get_checkered (void) } /* Handle exposure events for the color picker's drawing area */ -#if GTK_CHECK_VERSION (3, 0, 0) static gboolean +#if GTK_CHECK_VERSION (3, 0, 0) draw (GtkWidget *widget, cairo_t *cr, gpointer data) #else -static gint expose_event (GtkWidget *widget, GdkEventExpose *event, gpointer data) #endif { MateColorButton *color_button = MATE_COLOR_BUTTON (data); - GtkAllocation allocation; cairo_pattern_t *checkered; -#if !GTK_CHECK_VERSION (3, 0, 0) - cairo_t *cr; - cr = gdk_cairo_create (event->window); +#if !GTK_CHECK_VERSION (3, 0, 0) + cairo_t *cr = gdk_cairo_create (event->window); + GtkAllocation allocation; gtk_widget_get_allocation (widget, &allocation); gdk_cairo_rectangle (cr, &allocation); cairo_clip (cr); |