ed Feb 27 19:16:50 2002 Owen Taylor <otaylor@redhat.com>

* gdk/x11/gdkwindow-x11.c (gdk_window_new):
        * gdk/x11/gdkwindow-x11.c (gdk_window_get_events):
        * gdk/x11/gdkwindow-x11.c (gdk_window_set_events):
        * gdk/win32/gdkwindow-win32.c (gdk_window_set_events):
        * gdk/win32/gdkwindow-win32.c (gdk_window_new):
        * gdk/gdkwindow.h (struct _GdkWindowObject):
        * gdk/linux-fb/gdkwindow-fb.c (gdk_window_set_events):
        Save the window's event mask in window->event_mask.

        * gdk/gdkwindow.c (gdk_window_process_updates_internal): Only
        generate expose events if GDK_EXPOSE_MASK is included
        window->event_mask. (#54506)
This commit is contained in:
Owen Taylor 2002-02-28 00:26:51 +00:00
parent 07bdeb1871
commit 7ea17ce7fd
12 changed files with 124 additions and 8 deletions

View File

@ -1,9 +1,24 @@
Wed Feb 27 19:16:50 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkwindow-x11.c (gdk_window_new):
* gdk/x11/gdkwindow-x11.c (gdk_window_get_events):
* gdk/x11/gdkwindow-x11.c (gdk_window_set_events):
* gdk/win32/gdkwindow-win32.c (gdk_window_set_events):
* gdk/win32/gdkwindow-win32.c (gdk_window_new):
* gdk/gdkwindow.h (struct _GdkWindowObject):
* gdk/linux-fb/gdkwindow-fb.c (gdk_window_set_events):
Save the window's event mask in window->event_mask.
* gdk/gdkwindow.c (gdk_window_process_updates_internal): Only
generate expose events if GDK_EXPOSE_MASK is included
window->event_mask. (#54506)
Wed Feb 27 18:50:29 2002 Owen Taylor <otaylor@redhat.com> Wed Feb 27 18:50:29 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_event): Allow focus-change * gtk/gtkwidget.c (gtk_widget_event): Allow focus-change
events to be sent to unrealized widgets; they aren't events to be sent to unrealized widgets; they aren't
really normal events in that they have anything to really normal events in that they have anything to
do with widget->window. (#72914) do with widget->window. (#72914, Andreas J. Guelzow)
Wed Feb 27 18:39:25 2002 Owen Taylor <otaylor@redhat.com> Wed Feb 27 18:39:25 2002 Owen Taylor <otaylor@redhat.com>

View File

@ -1,9 +1,24 @@
Wed Feb 27 19:16:50 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkwindow-x11.c (gdk_window_new):
* gdk/x11/gdkwindow-x11.c (gdk_window_get_events):
* gdk/x11/gdkwindow-x11.c (gdk_window_set_events):
* gdk/win32/gdkwindow-win32.c (gdk_window_set_events):
* gdk/win32/gdkwindow-win32.c (gdk_window_new):
* gdk/gdkwindow.h (struct _GdkWindowObject):
* gdk/linux-fb/gdkwindow-fb.c (gdk_window_set_events):
Save the window's event mask in window->event_mask.
* gdk/gdkwindow.c (gdk_window_process_updates_internal): Only
generate expose events if GDK_EXPOSE_MASK is included
window->event_mask. (#54506)
Wed Feb 27 18:50:29 2002 Owen Taylor <otaylor@redhat.com> Wed Feb 27 18:50:29 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_event): Allow focus-change * gtk/gtkwidget.c (gtk_widget_event): Allow focus-change
events to be sent to unrealized widgets; they aren't events to be sent to unrealized widgets; they aren't
really normal events in that they have anything to really normal events in that they have anything to
do with widget->window. (#72914) do with widget->window. (#72914, Andreas J. Guelzow)
Wed Feb 27 18:39:25 2002 Owen Taylor <otaylor@redhat.com> Wed Feb 27 18:39:25 2002 Owen Taylor <otaylor@redhat.com>

View File

@ -1,9 +1,24 @@
Wed Feb 27 19:16:50 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkwindow-x11.c (gdk_window_new):
* gdk/x11/gdkwindow-x11.c (gdk_window_get_events):
* gdk/x11/gdkwindow-x11.c (gdk_window_set_events):
* gdk/win32/gdkwindow-win32.c (gdk_window_set_events):
* gdk/win32/gdkwindow-win32.c (gdk_window_new):
* gdk/gdkwindow.h (struct _GdkWindowObject):
* gdk/linux-fb/gdkwindow-fb.c (gdk_window_set_events):
Save the window's event mask in window->event_mask.
* gdk/gdkwindow.c (gdk_window_process_updates_internal): Only
generate expose events if GDK_EXPOSE_MASK is included
window->event_mask. (#54506)
Wed Feb 27 18:50:29 2002 Owen Taylor <otaylor@redhat.com> Wed Feb 27 18:50:29 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_event): Allow focus-change * gtk/gtkwidget.c (gtk_widget_event): Allow focus-change
events to be sent to unrealized widgets; they aren't events to be sent to unrealized widgets; they aren't
really normal events in that they have anything to really normal events in that they have anything to
do with widget->window. (#72914) do with widget->window. (#72914, Andreas J. Guelzow)
Wed Feb 27 18:39:25 2002 Owen Taylor <otaylor@redhat.com> Wed Feb 27 18:39:25 2002 Owen Taylor <otaylor@redhat.com>

View File

@ -1,9 +1,24 @@
Wed Feb 27 19:16:50 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkwindow-x11.c (gdk_window_new):
* gdk/x11/gdkwindow-x11.c (gdk_window_get_events):
* gdk/x11/gdkwindow-x11.c (gdk_window_set_events):
* gdk/win32/gdkwindow-win32.c (gdk_window_set_events):
* gdk/win32/gdkwindow-win32.c (gdk_window_new):
* gdk/gdkwindow.h (struct _GdkWindowObject):
* gdk/linux-fb/gdkwindow-fb.c (gdk_window_set_events):
Save the window's event mask in window->event_mask.
* gdk/gdkwindow.c (gdk_window_process_updates_internal): Only
generate expose events if GDK_EXPOSE_MASK is included
window->event_mask. (#54506)
Wed Feb 27 18:50:29 2002 Owen Taylor <otaylor@redhat.com> Wed Feb 27 18:50:29 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_event): Allow focus-change * gtk/gtkwidget.c (gtk_widget_event): Allow focus-change
events to be sent to unrealized widgets; they aren't events to be sent to unrealized widgets; they aren't
really normal events in that they have anything to really normal events in that they have anything to
do with widget->window. (#72914) do with widget->window. (#72914, Andreas J. Guelzow)
Wed Feb 27 18:39:25 2002 Owen Taylor <otaylor@redhat.com> Wed Feb 27 18:39:25 2002 Owen Taylor <otaylor@redhat.com>

View File

@ -1,9 +1,24 @@
Wed Feb 27 19:16:50 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkwindow-x11.c (gdk_window_new):
* gdk/x11/gdkwindow-x11.c (gdk_window_get_events):
* gdk/x11/gdkwindow-x11.c (gdk_window_set_events):
* gdk/win32/gdkwindow-win32.c (gdk_window_set_events):
* gdk/win32/gdkwindow-win32.c (gdk_window_new):
* gdk/gdkwindow.h (struct _GdkWindowObject):
* gdk/linux-fb/gdkwindow-fb.c (gdk_window_set_events):
Save the window's event mask in window->event_mask.
* gdk/gdkwindow.c (gdk_window_process_updates_internal): Only
generate expose events if GDK_EXPOSE_MASK is included
window->event_mask. (#54506)
Wed Feb 27 18:50:29 2002 Owen Taylor <otaylor@redhat.com> Wed Feb 27 18:50:29 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_event): Allow focus-change * gtk/gtkwidget.c (gtk_widget_event): Allow focus-change
events to be sent to unrealized widgets; they aren't events to be sent to unrealized widgets; they aren't
really normal events in that they have anything to really normal events in that they have anything to
do with widget->window. (#72914) do with widget->window. (#72914, Andreas J. Guelzow)
Wed Feb 27 18:39:25 2002 Owen Taylor <otaylor@redhat.com> Wed Feb 27 18:39:25 2002 Owen Taylor <otaylor@redhat.com>

View File

@ -1,9 +1,24 @@
Wed Feb 27 19:16:50 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkwindow-x11.c (gdk_window_new):
* gdk/x11/gdkwindow-x11.c (gdk_window_get_events):
* gdk/x11/gdkwindow-x11.c (gdk_window_set_events):
* gdk/win32/gdkwindow-win32.c (gdk_window_set_events):
* gdk/win32/gdkwindow-win32.c (gdk_window_new):
* gdk/gdkwindow.h (struct _GdkWindowObject):
* gdk/linux-fb/gdkwindow-fb.c (gdk_window_set_events):
Save the window's event mask in window->event_mask.
* gdk/gdkwindow.c (gdk_window_process_updates_internal): Only
generate expose events if GDK_EXPOSE_MASK is included
window->event_mask. (#54506)
Wed Feb 27 18:50:29 2002 Owen Taylor <otaylor@redhat.com> Wed Feb 27 18:50:29 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_event): Allow focus-change * gtk/gtkwidget.c (gtk_widget_event): Allow focus-change
events to be sent to unrealized widgets; they aren't events to be sent to unrealized widgets; they aren't
really normal events in that they have anything to really normal events in that they have anything to
do with widget->window. (#72914) do with widget->window. (#72914, Andreas J. Guelzow)
Wed Feb 27 18:39:25 2002 Owen Taylor <otaylor@redhat.com> Wed Feb 27 18:39:25 2002 Owen Taylor <otaylor@redhat.com>

View File

@ -1,9 +1,24 @@
Wed Feb 27 19:16:50 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkwindow-x11.c (gdk_window_new):
* gdk/x11/gdkwindow-x11.c (gdk_window_get_events):
* gdk/x11/gdkwindow-x11.c (gdk_window_set_events):
* gdk/win32/gdkwindow-win32.c (gdk_window_set_events):
* gdk/win32/gdkwindow-win32.c (gdk_window_new):
* gdk/gdkwindow.h (struct _GdkWindowObject):
* gdk/linux-fb/gdkwindow-fb.c (gdk_window_set_events):
Save the window's event mask in window->event_mask.
* gdk/gdkwindow.c (gdk_window_process_updates_internal): Only
generate expose events if GDK_EXPOSE_MASK is included
window->event_mask. (#54506)
Wed Feb 27 18:50:29 2002 Owen Taylor <otaylor@redhat.com> Wed Feb 27 18:50:29 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_event): Allow focus-change * gtk/gtkwidget.c (gtk_widget_event): Allow focus-change
events to be sent to unrealized widgets; they aren't events to be sent to unrealized widgets; they aren't
really normal events in that they have anything to really normal events in that they have anything to
do with widget->window. (#72914) do with widget->window. (#72914, Andreas J. Guelzow)
Wed Feb 27 18:39:25 2002 Owen Taylor <otaylor@redhat.com> Wed Feb 27 18:39:25 2002 Owen Taylor <otaylor@redhat.com>

View File

@ -2065,7 +2065,8 @@ gdk_window_process_updates_internal (GdkWindow *window)
GdkRegion *update_area = private->update_area; GdkRegion *update_area = private->update_area;
private->update_area = NULL; private->update_area = NULL;
if (_gdk_event_func && gdk_window_is_viewable (window)) if (_gdk_event_func && gdk_window_is_viewable (window) &&
(private->event_mask & GDK_EXPOSURE_MASK))
{ {
GdkEvent event; GdkEvent event;
GdkRectangle window_rect; GdkRectangle window_rect;

View File

@ -260,6 +260,8 @@ struct _GdkWindowObject
guint modal_hint : 1; guint modal_hint : 1;
guint destroyed : 2; guint destroyed : 2;
GdkEventMask event_mask;
}; };
struct _GdkWindowObjectClass struct _GdkWindowObjectClass

View File

@ -1751,6 +1751,8 @@ gdk_window_set_events (GdkWindow *window,
if (!GDK_WINDOW_DESTROYED (window)) if (!GDK_WINDOW_DESTROYED (window))
GDK_WINDOW_IMPL_FBDATA (window)->event_mask = event_mask; GDK_WINDOW_IMPL_FBDATA (window)->event_mask = event_mask;
GDK_WINDOW_OBJECT (window)->event_mask = event_mask;
} }
void void

View File

@ -487,6 +487,7 @@ gdk_window_new (GdkWindow *parent,
title = "GDK client window"; title = "GDK client window";
impl->event_mask = GDK_STRUCTURE_MASK | attributes->event_mask; impl->event_mask = GDK_STRUCTURE_MASK | attributes->event_mask;
private->event_mask = impl->event_mask;
if (private->parent && private->parent->guffaw_gravity) if (private->parent && private->parent->guffaw_gravity)
{ {
@ -1941,6 +1942,7 @@ gdk_window_set_events (GdkWindow *window,
if (GDK_WINDOW_DESTROYED (window)) if (GDK_WINDOW_DESTROYED (window))
return; return;
GDK_WINDOW_OBJECT (window)->event_mask = event_mask;
GDK_WINDOW_IMPL_WIN32 (GDK_WINDOW_OBJECT (window)->impl)->event_mask = event_mask; GDK_WINDOW_IMPL_WIN32 (GDK_WINDOW_OBJECT (window)->impl)->event_mask = event_mask;
} }

View File

@ -414,6 +414,7 @@ gdk_window_new (GdkWindow *parent,
if (attributes->event_mask & (1 << (i + 1))) if (attributes->event_mask & (1 << (i + 1)))
xattributes.event_mask |= _gdk_event_mask_table[i]; xattributes.event_mask |= _gdk_event_mask_table[i];
} }
private->event_mask = attributes->event_mask;
if (xattributes.event_mask) if (xattributes.event_mask)
xattributes_mask |= CWEventMask; xattributes_mask |= CWEventMask;
@ -2467,6 +2468,8 @@ gdk_window_get_events (GdkWindow *window)
event_mask |= 1 << (i + 1); event_mask |= 1 << (i + 1);
} }
GDK_WINDOW_OBJECT (window)->event_mask = event_mask;
return event_mask; return event_mask;
} }
} }
@ -2494,6 +2497,7 @@ gdk_window_set_events (GdkWindow *window,
if (!GDK_WINDOW_DESTROYED (window)) if (!GDK_WINDOW_DESTROYED (window))
{ {
GDK_WINDOW_OBJECT (window)->event_mask = event_mask;
xevent_mask = StructureNotifyMask; xevent_mask = StructureNotifyMask;
for (i = 0; i < _gdk_nenvent_masks; i++) for (i = 0; i < _gdk_nenvent_masks; i++)
{ {