[gtk+/client-side-decorations: 4/50] wip
- From: Cody Russell <bratsche src gnome org>
- To: svn-commits-list gnome org
- Subject: [gtk+/client-side-decorations: 4/50] wip
- Date: Wed, 8 Jul 2009 15:28:29 +0000 (UTC)
commit 20fb0912f83de7214148c0c5db2ddd6f67a19696
Author: Cody Russell <crussell canonical com>
Date: Sat May 16 12:05:10 2009 -0400
wip
gtk/gtkwindow-decorate.c | 10 +++++++++-
gtk/gtkwindow.c | 2 +-
2 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkwindow-decorate.c b/gtk/gtkwindow-decorate.c
index 31ad8f9..2fbe002 100644
--- a/gtk/gtkwindow-decorate.c
+++ b/gtk/gtkwindow-decorate.c
@@ -17,13 +17,14 @@
* Boston, MA 02111-1307, USA.
*/
-/*
+/*
* Authors: Alexander Larsson <alexl redhat com>
*/
#include "config.h"
#include "gtkprivate.h"
#include "gtkwindow.h"
+#include "gtklabel.h"
#include "gtkhbox.h"
#include "gtkbutton.h"
#include "gtkmain.h"
@@ -80,6 +81,7 @@ struct _GtkWindowDecoration
GtkWindowResizeType resize;
GtkWidget *hbox;
+ GtkWidget *label_widget;
GtkWidget *close_button;
GtkWidget *max_button;
GtkWidget *min_button;
@@ -153,8 +155,10 @@ gtk_decorated_window_init (GtkWindow *window)
deco->round_corners = TRUE;
deco->radius = 5;
+ deco->label_widget = gtk_label_new ("This is a test");
deco->close_button = gtk_button_new_from_stock ("stock-smiley-26");
deco->hbox = gtk_hbox_new (FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (deco->hbox), deco->label_widget, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (deco->hbox), deco->close_button, FALSE, FALSE, 0);
gtk_widget_show_all (deco->hbox);
gtk_widget_set_parent_window (deco->hbox, window->frame);
@@ -368,6 +372,10 @@ gtk_decorated_window_frame_event (GtkWindow *window, GdkEvent *event)
expose_event = (GdkEventExpose *)event;
if (deco->decorated)
gtk_decorated_window_paint (widget, &expose_event->area);
+
+ gtk_container_propagate_expose (GTK_CONTAINER (window),
+ deco->hbox,
+ event);
return TRUE;
break;
case GDK_CONFIGURE:
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 6b7d2ec..2ee012e 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -4868,7 +4868,7 @@ gtk_window_realize (GtkWidget *widget)
if (priv->opacity_set)
gdk_window_set_opacity (window->frame, priv->opacity);
- gdk_window_set_user_data (window->frame, widget);
+ gdk_window_set_user_data (window->frame, window);
attributes.window_type = GDK_WINDOW_CHILD;
attributes.x = window->frame_left;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]