[cheese/wip/hans-fixes: 35/35] cheese-flash: Fix the flash no longer being white
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cheese/wip/hans-fixes: 35/35] cheese-flash: Fix the flash no longer being white
- Date: Fri, 14 Jun 2013 22:26:37 +0000 (UTC)
commit 80123db8b8b85db8323f06941b1cb7611a61a50c
Author: Hans de Goede <hdegoede redhat com>
Date: Thu Jun 13 12:39:44 2013 +0200
cheese-flash: Fix the flash no longer being white
Signed-off-by: Hans de Goede <hdegoede redhat com>
libcheese/cheese-flash.c | 23 ++++-------------------
1 files changed, 4 insertions(+), 19 deletions(-)
---
diff --git a/libcheese/cheese-flash.c b/libcheese/cheese-flash.c
index fd46818..37cd36d 100644
--- a/libcheese/cheese-flash.c
+++ b/libcheese/cheese-flash.c
@@ -76,29 +76,13 @@ struct _CheeseFlashPrivate
guint fade_timeout_tag;
};
-/*
- * cheese_flash_draw_event_cb:
- * @widget: the #CheeseFlash
- * @cr: the Cairo context
- * @user_data: the user data of the signal
- *
- * Draw the flash.
- *
- * Returns: %TRUE
- */
-static gboolean
-cheese_flash_draw_event_cb (GtkWidget *widget, cairo_t *cr, gpointer user_data)
-{
- cairo_fill (cr);
- return TRUE;
-}
-
static void
cheese_flash_init (CheeseFlash *self)
{
CheeseFlashPrivate *priv = self->priv = CHEESE_FLASH_GET_PRIVATE (self);
cairo_region_t *input_region;
GtkWindow *window = GTK_WINDOW (self);
+ const GdkColor white = { 0, 65535, 65535, 65535 };
priv->flash_timeout_tag = 0;
priv->fade_timeout_tag = 0;
@@ -113,13 +97,14 @@ cheese_flash_init (CheeseFlash *self)
gtk_window_set_accept_focus (window, FALSE);
gtk_window_set_focus_on_map (window, FALSE);
+ /* Make it white */
+ gtk_widget_modify_bg (GTK_WIDGET (window), GTK_STATE_NORMAL, &white);
+
/* Don't consume input */
gtk_widget_realize (GTK_WIDGET (window));
input_region = cairo_region_create ();
gdk_window_input_shape_combine_region (gtk_widget_get_window (GTK_WIDGET (window)), input_region, 0, 0);
cairo_region_destroy (input_region);
-
- g_signal_connect (G_OBJECT (window), "draw", G_CALLBACK (cheese_flash_draw_event_cb), NULL);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]