aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc/e-canvas.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-01-13 06:54:29 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-01-14 03:17:42 +0800
commita6d296b998729abc78e634844cc4a3aeda7d0327 (patch)
tree136c24bd250a288f8152cd563969f3954adc75be /widgets/misc/e-canvas.c
parent4d114e022ca38e7aeb6cc2cc3715f7dca69c82a6 (diff)
downloadgsoc2013-evolution-a6d296b998729abc78e634844cc4a3aeda7d0327.tar
gsoc2013-evolution-a6d296b998729abc78e634844cc4a3aeda7d0327.tar.gz
gsoc2013-evolution-a6d296b998729abc78e634844cc4a3aeda7d0327.tar.bz2
gsoc2013-evolution-a6d296b998729abc78e634844cc4a3aeda7d0327.tar.lz
gsoc2013-evolution-a6d296b998729abc78e634844cc4a3aeda7d0327.tar.xz
gsoc2013-evolution-a6d296b998729abc78e634844cc4a3aeda7d0327.tar.zst
gsoc2013-evolution-a6d296b998729abc78e634844cc4a3aeda7d0327.zip
Baby steps toward GSEAL compliance.
Diffstat (limited to 'widgets/misc/e-canvas.c')
-rw-r--r--widgets/misc/e-canvas.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/widgets/misc/e-canvas.c b/widgets/misc/e-canvas.c
index 5f719fed80..f1b7713f43 100644
--- a/widgets/misc/e-canvas.c
+++ b/widgets/misc/e-canvas.c
@@ -458,6 +458,7 @@ static gint
e_canvas_button (GtkWidget *widget, GdkEventButton *event)
{
GnomeCanvas *canvas;
+ GdkWindow *bin_window;
gint mask;
gint retval;
@@ -468,6 +469,7 @@ e_canvas_button (GtkWidget *widget, GdkEventButton *event)
retval = FALSE;
canvas = GNOME_CANVAS (widget);
+ bin_window = gtk_layout_get_bin_window (GTK_LAYOUT (canvas));
d(g_print ("button %d, event type %d, grabbed=%p, current=%p\n",
event->button,
@@ -477,7 +479,7 @@ e_canvas_button (GtkWidget *widget, GdkEventButton *event)
/* dispatch normally regardless of the event's window if an item has
has a pointer grab in effect */
- if (!canvas->grabbed_item && event->window != canvas->layout.bin_window)
+ if (!canvas->grabbed_item && event->window != bin_window)
return retval;
switch (event->button) {
@@ -557,17 +559,20 @@ void
e_canvas_item_grab_focus (GnomeCanvasItem *item, gboolean widget_too)
{
GnomeCanvasItem *focused_item;
+ GdkWindow *bin_window;
GdkEvent ev;
g_return_if_fail (item != NULL);
g_return_if_fail (GNOME_IS_CANVAS_ITEM (item));
g_return_if_fail (gtk_widget_get_can_focus (GTK_WIDGET (item->canvas)));
+ bin_window = gtk_layout_get_bin_window (GTK_LAYOUT (item->canvas));
+
focused_item = item->canvas->focused_item;
if (focused_item) {
ev.focus_change.type = GDK_FOCUS_CHANGE;
- ev.focus_change.window = GTK_LAYOUT (item->canvas)->bin_window;
+ ev.focus_change.window = bin_window;
ev.focus_change.send_event = FALSE;
ev.focus_change.in = FALSE;
@@ -582,7 +587,7 @@ e_canvas_item_grab_focus (GnomeCanvasItem *item, gboolean widget_too)
if (item) {
ev.focus_change.type = GDK_FOCUS_CHANGE;
- ev.focus_change.window = GTK_LAYOUT (item->canvas)->bin_window;
+ ev.focus_change.window = bin_window;
ev.focus_change.send_event = FALSE;
ev.focus_change.in = TRUE;
@@ -665,13 +670,16 @@ static void
e_canvas_realize (GtkWidget *widget)
{
ECanvas *ecanvas = E_CANVAS (widget);
+ GdkWindow *window;
if (GTK_WIDGET_CLASS (e_canvas_parent_class)->realize)
(* GTK_WIDGET_CLASS (e_canvas_parent_class)->realize) (widget);
- gdk_window_set_back_pixmap (GTK_LAYOUT (widget)->bin_window, NULL, FALSE);
+ window = gtk_layout_get_bin_window (GTK_LAYOUT (widget));
+ gdk_window_set_back_pixmap (window, NULL, FALSE);
- gtk_im_context_set_client_window (ecanvas->im_context, widget->window);
+ window = gtk_widget_get_window (widget);
+ gtk_im_context_set_client_window (ecanvas->im_context, window);
}
static void