[Xfce4-commits] <thunar:nick/1.8> Update background on style changes.
Nick Schermer
noreply at xfce.org
Sun Aug 4 21:52:18 CEST 2013
Updating branch refs/heads/nick/1.8
to 66e8d46ea1d693dc62cbfaf250c07b05ca10de7b (commit)
from 6beeef33d489e853ce034b1c57f64badc0aadaf9 (commit)
commit 66e8d46ea1d693dc62cbfaf250c07b05ca10de7b
Author: Nick Schermer <nick at xfce.org>
Date: Thu Aug 1 01:53:33 2013 +0200
Update background on style changes.
thunar/thunar-desktop-window.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/thunar/thunar-desktop-window.c b/thunar/thunar-desktop-window.c
index e36cdbb..f9200d9 100644
--- a/thunar/thunar-desktop-window.c
+++ b/thunar/thunar-desktop-window.c
@@ -38,6 +38,8 @@ static void thunar_desktop_window_size_request (GtkWidget
GtkRequisition *requisition);
static void thunar_desktop_window_realize (GtkWidget *widget);
static void thunar_desktop_window_unrealize (GtkWidget *widget);
+static void thunar_desktop_window_style_set (GtkWidget *widget,
+ GtkStyle *old_style);
static gboolean thunar_desktop_window_expose_event (GtkWidget *widget,
GdkEventExpose *event);
static gboolean thunar_desktop_window_button_press_event (GtkWidget *widget,
@@ -48,6 +50,7 @@ static gboolean thunar_desktop_window_delete_event (GtkWidget
GdkEventAny *event);
+
struct _ThunarDesktopWindowClass
{
GtkWindowClass __parent__;
@@ -75,6 +78,7 @@ thunar_desktop_window_class_init (ThunarDesktopWindowClass *klass)
gtkwidget_class->size_request = thunar_desktop_window_size_request;
gtkwidget_class->realize = thunar_desktop_window_realize;
gtkwidget_class->unrealize = thunar_desktop_window_unrealize;
+ gtkwidget_class->style_set = thunar_desktop_window_style_set;
gtkwidget_class->expose_event = thunar_desktop_window_expose_event;
gtkwidget_class->button_press_event = thunar_desktop_window_button_press_event;
gtkwidget_class->scroll_event = thunar_desktop_window_scroll_event;
@@ -195,6 +199,19 @@ thunar_desktop_window_unrealize (GtkWidget *widget)
+static void
+thunar_desktop_window_style_set (GtkWidget *widget,
+ GtkStyle *old_style)
+{
+ if (old_style != NULL)
+ {
+ /* redraw to apply on top of new style */
+ gtk_widget_queue_draw (widget);
+ }
+}
+
+
+
static gboolean
thunar_desktop_window_expose_event (GtkWidget *widget,
GdkEventExpose *event)
More information about the Xfce4-commits
mailing list