Add sensitivity-changing timeout. Written by Christian Persch.

Wed Dec 22 14:22:19 2004  Søren Sandmann  <sandmann@redhat.com>

	* tests/testtoolbar.c (timeout_cb): Add sensitivity-changing
	timeout. Written by Christian Persch.

Wed Dec 22 14:14:02 2004  Søren Sandmann  <sandmann@redhat.com>

	Bug #161561

	* gdk/x11/gdkwindow-x11.c (tmp_{re,un}set_bg): Only set/reset the
	background for windows that get expose events.

	* gdk/gdkwindow.c (gdk_window_process_updates_internal): Remove
	hack to repaint !expose windows.
This commit is contained in:
Søren Sandmann 2004-12-22 19:25:24 +00:00 committed by Søren Sandmann Pedersen
parent e9740d62c3
commit 63f2fd9614
7 changed files with 144 additions and 30 deletions

View File

@ -1,3 +1,29 @@
Wed Dec 22 14:22:19 2004 Søren Sandmann <sandmann@redhat.com>
* tests/testtoolbar.c (timeout_cb): Add sensitivity-changing
timeout. Written by Christian Persch.
Wed Dec 22 14:14:02 2004 Søren Sandmann <sandmann@redhat.com>
Bug #161561
* gdk/x11/gdkwindow-x11.c (tmp_{re,un}set_bg): Only set/reset the
background for windows that get expose events.
* gdk/gdkwindow.c (gdk_window_process_updates_internal): Remove
hack to repaint !expose windows.
Wed Dec 22 11:35:41 2004 Søren Sandmann <sandmann@redhat.com>
Bug #147497, make menu items activate immediately when you release
the button.
* gtk/gtkmenu.c (gtk_menu_enter_notify, menu_motion_notify): Make
items activate immediately.
* gtk/gtkmenu.c (definitely_within_item): New function
* gtk/gtkmenu.c (check_threshold): New function
2004-12-22 Matthias Clasen <mclasen@redhat.com> 2004-12-22 Matthias Clasen <mclasen@redhat.com>
* gtk/gtklabel.c (gtk_label_setup_mnemonic): Don't forget to * gtk/gtklabel.c (gtk_label_setup_mnemonic): Don't forget to
@ -26,7 +52,6 @@ Wed Dec 22 01:24:01 2004 Jonathan Blandford <jrb@redhat.com>
* gtk/queryimmodules.c (main): print out the version and binary * gtk/queryimmodules.c (main): print out the version and binary
name in the header comment. Problem reported by Seth Nickell. name in the header comment. Problem reported by Seth Nickell.
>>>>>>> 1.6232
2004-12-20 Matthias Clasen <mclasen@redhat.com> 2004-12-20 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkliststore.c (gtk_list_store_sort_iter_changed): Pass a * gtk/gtkliststore.c (gtk_list_store_sort_iter_changed): Pass a
@ -65,6 +90,7 @@ Wed Dec 22 01:24:01 2004 Jonathan Blandford <jrb@redhat.com>
(gtk_about_dialog_init): Add missing initializations. (#161646, (gtk_about_dialog_init): Add missing initializations. (#161646,
Torsten Schoenfeld) Torsten Schoenfeld)
>>>>>>> 1.6233
2004-12-16 Matthias Clasen <mclasen@redhat.com> 2004-12-16 Matthias Clasen <mclasen@redhat.com>
* configure.in: Bump version * configure.in: Bump version

View File

@ -1,3 +1,29 @@
Wed Dec 22 14:22:19 2004 Søren Sandmann <sandmann@redhat.com>
* tests/testtoolbar.c (timeout_cb): Add sensitivity-changing
timeout. Written by Christian Persch.
Wed Dec 22 14:14:02 2004 Søren Sandmann <sandmann@redhat.com>
Bug #161561
* gdk/x11/gdkwindow-x11.c (tmp_{re,un}set_bg): Only set/reset the
background for windows that get expose events.
* gdk/gdkwindow.c (gdk_window_process_updates_internal): Remove
hack to repaint !expose windows.
Wed Dec 22 11:35:41 2004 Søren Sandmann <sandmann@redhat.com>
Bug #147497, make menu items activate immediately when you release
the button.
* gtk/gtkmenu.c (gtk_menu_enter_notify, menu_motion_notify): Make
items activate immediately.
* gtk/gtkmenu.c (definitely_within_item): New function
* gtk/gtkmenu.c (check_threshold): New function
2004-12-22 Matthias Clasen <mclasen@redhat.com> 2004-12-22 Matthias Clasen <mclasen@redhat.com>
* gtk/gtklabel.c (gtk_label_setup_mnemonic): Don't forget to * gtk/gtklabel.c (gtk_label_setup_mnemonic): Don't forget to
@ -26,7 +52,6 @@ Wed Dec 22 01:24:01 2004 Jonathan Blandford <jrb@redhat.com>
* gtk/queryimmodules.c (main): print out the version and binary * gtk/queryimmodules.c (main): print out the version and binary
name in the header comment. Problem reported by Seth Nickell. name in the header comment. Problem reported by Seth Nickell.
>>>>>>> 1.6232
2004-12-20 Matthias Clasen <mclasen@redhat.com> 2004-12-20 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkliststore.c (gtk_list_store_sort_iter_changed): Pass a * gtk/gtkliststore.c (gtk_list_store_sort_iter_changed): Pass a
@ -65,6 +90,7 @@ Wed Dec 22 01:24:01 2004 Jonathan Blandford <jrb@redhat.com>
(gtk_about_dialog_init): Add missing initializations. (#161646, (gtk_about_dialog_init): Add missing initializations. (#161646,
Torsten Schoenfeld) Torsten Schoenfeld)
>>>>>>> 1.6233
2004-12-16 Matthias Clasen <mclasen@redhat.com> 2004-12-16 Matthias Clasen <mclasen@redhat.com>
* configure.in: Bump version * configure.in: Bump version

View File

@ -1,3 +1,29 @@
Wed Dec 22 14:22:19 2004 Søren Sandmann <sandmann@redhat.com>
* tests/testtoolbar.c (timeout_cb): Add sensitivity-changing
timeout. Written by Christian Persch.
Wed Dec 22 14:14:02 2004 Søren Sandmann <sandmann@redhat.com>
Bug #161561
* gdk/x11/gdkwindow-x11.c (tmp_{re,un}set_bg): Only set/reset the
background for windows that get expose events.
* gdk/gdkwindow.c (gdk_window_process_updates_internal): Remove
hack to repaint !expose windows.
Wed Dec 22 11:35:41 2004 Søren Sandmann <sandmann@redhat.com>
Bug #147497, make menu items activate immediately when you release
the button.
* gtk/gtkmenu.c (gtk_menu_enter_notify, menu_motion_notify): Make
items activate immediately.
* gtk/gtkmenu.c (definitely_within_item): New function
* gtk/gtkmenu.c (check_threshold): New function
2004-12-22 Matthias Clasen <mclasen@redhat.com> 2004-12-22 Matthias Clasen <mclasen@redhat.com>
* gtk/gtklabel.c (gtk_label_setup_mnemonic): Don't forget to * gtk/gtklabel.c (gtk_label_setup_mnemonic): Don't forget to
@ -26,7 +52,6 @@ Wed Dec 22 01:24:01 2004 Jonathan Blandford <jrb@redhat.com>
* gtk/queryimmodules.c (main): print out the version and binary * gtk/queryimmodules.c (main): print out the version and binary
name in the header comment. Problem reported by Seth Nickell. name in the header comment. Problem reported by Seth Nickell.
>>>>>>> 1.6232
2004-12-20 Matthias Clasen <mclasen@redhat.com> 2004-12-20 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkliststore.c (gtk_list_store_sort_iter_changed): Pass a * gtk/gtkliststore.c (gtk_list_store_sort_iter_changed): Pass a
@ -65,6 +90,7 @@ Wed Dec 22 01:24:01 2004 Jonathan Blandford <jrb@redhat.com>
(gtk_about_dialog_init): Add missing initializations. (#161646, (gtk_about_dialog_init): Add missing initializations. (#161646,
Torsten Schoenfeld) Torsten Schoenfeld)
>>>>>>> 1.6233
2004-12-16 Matthias Clasen <mclasen@redhat.com> 2004-12-16 Matthias Clasen <mclasen@redhat.com>
* configure.in: Bump version * configure.in: Bump version

View File

@ -1,3 +1,29 @@
Wed Dec 22 14:22:19 2004 Søren Sandmann <sandmann@redhat.com>
* tests/testtoolbar.c (timeout_cb): Add sensitivity-changing
timeout. Written by Christian Persch.
Wed Dec 22 14:14:02 2004 Søren Sandmann <sandmann@redhat.com>
Bug #161561
* gdk/x11/gdkwindow-x11.c (tmp_{re,un}set_bg): Only set/reset the
background for windows that get expose events.
* gdk/gdkwindow.c (gdk_window_process_updates_internal): Remove
hack to repaint !expose windows.
Wed Dec 22 11:35:41 2004 Søren Sandmann <sandmann@redhat.com>
Bug #147497, make menu items activate immediately when you release
the button.
* gtk/gtkmenu.c (gtk_menu_enter_notify, menu_motion_notify): Make
items activate immediately.
* gtk/gtkmenu.c (definitely_within_item): New function
* gtk/gtkmenu.c (check_threshold): New function
2004-12-22 Matthias Clasen <mclasen@redhat.com> 2004-12-22 Matthias Clasen <mclasen@redhat.com>
* gtk/gtklabel.c (gtk_label_setup_mnemonic): Don't forget to * gtk/gtklabel.c (gtk_label_setup_mnemonic): Don't forget to
@ -26,7 +52,6 @@ Wed Dec 22 01:24:01 2004 Jonathan Blandford <jrb@redhat.com>
* gtk/queryimmodules.c (main): print out the version and binary * gtk/queryimmodules.c (main): print out the version and binary
name in the header comment. Problem reported by Seth Nickell. name in the header comment. Problem reported by Seth Nickell.
>>>>>>> 1.6232
2004-12-20 Matthias Clasen <mclasen@redhat.com> 2004-12-20 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkliststore.c (gtk_list_store_sort_iter_changed): Pass a * gtk/gtkliststore.c (gtk_list_store_sort_iter_changed): Pass a
@ -65,6 +90,7 @@ Wed Dec 22 01:24:01 2004 Jonathan Blandford <jrb@redhat.com>
(gtk_about_dialog_init): Add missing initializations. (#161646, (gtk_about_dialog_init): Add missing initializations. (#161646,
Torsten Schoenfeld) Torsten Schoenfeld)
>>>>>>> 1.6233
2004-12-16 Matthias Clasen <mclasen@redhat.com> 2004-12-16 Matthias Clasen <mclasen@redhat.com>
* configure.in: Bump version * configure.in: Bump version

View File

@ -2168,32 +2168,20 @@ gdk_window_process_updates_internal (GdkWindow *window)
window_region); window_region);
gdk_region_destroy (window_region); gdk_region_destroy (window_region);
if (!gdk_region_empty (expose_region)) if (!gdk_region_empty (expose_region) &&
(private->event_mask & GDK_EXPOSURE_MASK))
{ {
if (private->event_mask & GDK_EXPOSURE_MASK) GdkEvent event;
{
GdkEvent event;
event.expose.type = GDK_EXPOSE; event.expose.type = GDK_EXPOSE;
event.expose.window = g_object_ref (window); event.expose.window = g_object_ref (window);
event.expose.count = 0; event.expose.count = 0;
event.expose.region = expose_region; event.expose.region = expose_region;
gdk_region_get_clipbox (expose_region, &event.expose.area); gdk_region_get_clipbox (expose_region, &event.expose.area);
(*_gdk_event_func) (&event, _gdk_event_data); (*_gdk_event_func) (&event, _gdk_event_data);
g_object_unref (window); g_object_unref (window);
}
else
{
/* Windows without GDK_EXPOSURE_MASK still need to
* get their backgrounds painted, because it
* may have been temporarily set to None when
* the expose was generated
*/
gdk_window_begin_paint_region (window, expose_region);
gdk_window_end_paint (window);
}
} }
if (expose_region != update_area) if (expose_region != update_area)

View File

@ -236,6 +236,13 @@ tmp_unset_bg (GdkWindow *window)
obj = (GdkWindowObject *) window; obj = (GdkWindowObject *) window;
impl = GDK_WINDOW_IMPL_X11 (obj->impl); impl = GDK_WINDOW_IMPL_X11 (obj->impl);
/* For windows without EXPOSURE_MASK, we can't do this
* unsetting because such windows depend on the drawing
* that the X server is going to do
*/
if (!(obj->event_mask & GDK_EXPOSURE_MASK))
return;
impl->position_info.no_bg = TRUE; impl->position_info.no_bg = TRUE;
if (obj->bg_pixmap != GDK_NO_BG) if (obj->bg_pixmap != GDK_NO_BG)
@ -252,6 +259,9 @@ tmp_reset_bg (GdkWindow *window)
obj = (GdkWindowObject *) window; obj = (GdkWindowObject *) window;
impl = GDK_WINDOW_IMPL_X11 (obj->impl); impl = GDK_WINDOW_IMPL_X11 (obj->impl);
if (!(obj->event_mask & GDK_EXPOSURE_MASK))
return;
impl->position_info.no_bg = FALSE; impl->position_info.no_bg = FALSE;
if (obj->bg_pixmap == GDK_NO_BG) if (obj->bg_pixmap == GDK_NO_BG)
@ -1107,7 +1117,6 @@ gdk_toplevel_x11_free_contents (GdkDisplay *display,
toplevel->update_counter = None; toplevel->update_counter = None;
XSyncIntToValue (&toplevel->current_counter_value, 0); XSyncIntToValue (&toplevel->current_counter_value, 0);
XSyncIntToValue (&toplevel->pending_counter_value, 0);
} }
#endif #endif
} }

View File

@ -476,6 +476,18 @@ toolbar_drag_leave (GtkToolbar *toolbar,
gtk_toolbar_set_drop_highlight_item (toolbar, NULL, 0); gtk_toolbar_set_drop_highlight_item (toolbar, NULL, 0);
} }
static gboolean
timeout_cb (GtkWidget *widget)
{
static gboolean sensitive = TRUE;
sensitive = !sensitive;
gtk_widget_set_sensitive (widget, sensitive);
return TRUE;
}
gint gint
main (gint argc, gchar **argv) main (gint argc, gchar **argv)
{ {
@ -587,6 +599,7 @@ main (gint argc, gchar **argv)
gtk_tool_button_set_label (GTK_TOOL_BUTTON (item), NULL); gtk_tool_button_set_label (GTK_TOOL_BUTTON (item), NULL);
add_item_to_list (store, item, "New"); add_item_to_list (store, item, "New");
gtk_toolbar_insert (GTK_TOOLBAR (toolbar), item, -1); gtk_toolbar_insert (GTK_TOOLBAR (toolbar), item, -1);
g_timeout_add (3000, (GSourceFunc) timeout_cb, item);
gtk_tool_item_set_expand (item, TRUE); gtk_tool_item_set_expand (item, TRUE);
menu = gtk_menu_new (); menu = gtk_menu_new ();