Commit 3b906a9c authored by Owen Taylor's avatar Owen Taylor Committed by Owen Taylor

Initialize private->event_mask from attributes we retrieved for the

Thu Feb 28 14:49:08 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkwindow-x11.c (gdk_window_foreign_new): Initialize
        private->event_mask from attributes we retrieved for
        the window.
parent e9af640c
Thu Feb 28 14:49:08 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkwindow-x11.c (gdk_window_foreign_new): Initialize
private->event_mask from attributes we retrieved for
the window.
2002-02-22 Havoc Pennington <hp@redhat.com>
* gtk/gtktextbuffer.c (save_range): change gravity of start/end
......
Thu Feb 28 14:49:08 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkwindow-x11.c (gdk_window_foreign_new): Initialize
private->event_mask from attributes we retrieved for
the window.
2002-02-22 Havoc Pennington <hp@redhat.com>
* gtk/gtktextbuffer.c (save_range): change gravity of start/end
......
Thu Feb 28 14:49:08 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkwindow-x11.c (gdk_window_foreign_new): Initialize
private->event_mask from attributes we retrieved for
the window.
2002-02-22 Havoc Pennington <hp@redhat.com>
* gtk/gtktextbuffer.c (save_range): change gravity of start/end
......
Thu Feb 28 14:49:08 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkwindow-x11.c (gdk_window_foreign_new): Initialize
private->event_mask from attributes we retrieved for
the window.
2002-02-22 Havoc Pennington <hp@redhat.com>
* gtk/gtktextbuffer.c (save_range): change gravity of start/end
......
Thu Feb 28 14:49:08 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkwindow-x11.c (gdk_window_foreign_new): Initialize
private->event_mask from attributes we retrieved for
the window.
2002-02-22 Havoc Pennington <hp@redhat.com>
* gtk/gtktextbuffer.c (save_range): change gravity of start/end
......
Thu Feb 28 14:49:08 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkwindow-x11.c (gdk_window_foreign_new): Initialize
private->event_mask from attributes we retrieved for
the window.
2002-02-22 Havoc Pennington <hp@redhat.com>
* gtk/gtktextbuffer.c (save_range): change gravity of start/end
......
Thu Feb 28 14:49:08 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkwindow-x11.c (gdk_window_foreign_new): Initialize
private->event_mask from attributes we retrieved for
the window.
2002-02-22 Havoc Pennington <hp@redhat.com>
* gtk/gtktextbuffer.c (save_range): change gravity of start/end
......
......@@ -629,6 +629,21 @@ gdk_window_new (GdkWindow *parent,
return window;
}
static GdkEventMask
x_event_mask_to_gdk_event_mask (long mask)
{
GdkEventMask event_mask = 0;
int i;
for (i = 0; i < _gdk_nenvent_masks; i++)
{
if (mask & _gdk_event_mask_table[i])
event_mask |= 1 << (i + 1);
}
return event_mask;
}
/**
* gdk_window_foreign_new:
* @anid: a native window handle.
......@@ -692,6 +707,8 @@ gdk_window_foreign_new (GdkNativeWindow anid)
private->window_type = GDK_WINDOW_FOREIGN;
private->destroyed = FALSE;
private->event_mask = x_event_mask_to_gdk_event_mask (attrs.your_event_mask);
if (attrs.map_state == IsUnmapped)
private->state = GDK_WINDOW_STATE_WITHDRAWN;
else
......@@ -2448,7 +2465,6 @@ gdk_window_get_events (GdkWindow *window)
{
XWindowAttributes attrs;
GdkEventMask event_mask;
int i;
g_return_val_if_fail (window != NULL, 0);
g_return_val_if_fail (GDK_IS_WINDOW (window), 0);
......@@ -2461,13 +2477,7 @@ gdk_window_get_events (GdkWindow *window)
GDK_WINDOW_XID (window),
&attrs);
event_mask = 0;
for (i = 0; i < _gdk_nenvent_masks; i++)
{
if (attrs.your_event_mask & _gdk_event_mask_table[i])
event_mask |= 1 << (i + 1);
}
event_mask = x_event_mask_to_gdk_event_mask (attrs.your_event_mask);
GDK_WINDOW_OBJECT (window)->event_mask = event_mask;
return event_mask;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment