diff options
author | Søren Sandmann <sandmann@redhat.com> | 2004-12-22 19:25:24 +0000 |
---|---|---|
committer | Søren Sandmann Pedersen <ssp@src.gnome.org> | 2004-12-22 19:25:24 +0000 |
commit | 63f2fd9614e46e0ce8f6bbf61e276f6ae2b7c54a (patch) | |
tree | bafb4c20f24151e41c02c929acf849709f321ecb | |
parent | e9740d62c39fe94b5f214808704c9cb2e17818a5 (diff) | |
download | gtk+-63f2fd9614e46e0ce8f6bbf61e276f6ae2b7c54a.tar.gz |
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.
-rw-r--r-- | ChangeLog | 28 | ||||
-rw-r--r-- | ChangeLog.pre-2-10 | 28 | ||||
-rw-r--r-- | ChangeLog.pre-2-6 | 28 | ||||
-rw-r--r-- | ChangeLog.pre-2-8 | 28 | ||||
-rw-r--r-- | gdk/gdkwindow.c | 36 | ||||
-rw-r--r-- | gdk/x11/gdkwindow-x11.c | 11 | ||||
-rw-r--r-- | tests/testtoolbar.c | 15 |
7 files changed, 144 insertions, 30 deletions
@@ -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> * 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 name in the header comment. Problem reported by Seth Nickell. ->>>>>>> 1.6232 2004-12-20 Matthias Clasen <mclasen@redhat.com> * 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, Torsten Schoenfeld) +>>>>>>> 1.6233 2004-12-16 Matthias Clasen <mclasen@redhat.com> * configure.in: Bump version diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index fb25b987fa..90cd56e704 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -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> * 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 name in the header comment. Problem reported by Seth Nickell. ->>>>>>> 1.6232 2004-12-20 Matthias Clasen <mclasen@redhat.com> * 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, Torsten Schoenfeld) +>>>>>>> 1.6233 2004-12-16 Matthias Clasen <mclasen@redhat.com> * configure.in: Bump version diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index fb25b987fa..90cd56e704 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -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> * 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 name in the header comment. Problem reported by Seth Nickell. ->>>>>>> 1.6232 2004-12-20 Matthias Clasen <mclasen@redhat.com> * 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, Torsten Schoenfeld) +>>>>>>> 1.6233 2004-12-16 Matthias Clasen <mclasen@redhat.com> * configure.in: Bump version diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index fb25b987fa..90cd56e704 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -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> * 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 name in the header comment. Problem reported by Seth Nickell. ->>>>>>> 1.6232 2004-12-20 Matthias Clasen <mclasen@redhat.com> * 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, Torsten Schoenfeld) +>>>>>>> 1.6233 2004-12-16 Matthias Clasen <mclasen@redhat.com> * configure.in: Bump version diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c index 06212913bd..41e5e2ab97 100644 --- a/gdk/gdkwindow.c +++ b/gdk/gdkwindow.c @@ -2168,32 +2168,20 @@ gdk_window_process_updates_internal (GdkWindow *window) 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.window = g_object_ref (window); - event.expose.count = 0; - event.expose.region = expose_region; - gdk_region_get_clipbox (expose_region, &event.expose.area); - - (*_gdk_event_func) (&event, _gdk_event_data); - - 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); - } + event.expose.type = GDK_EXPOSE; + event.expose.window = g_object_ref (window); + event.expose.count = 0; + event.expose.region = expose_region; + gdk_region_get_clipbox (expose_region, &event.expose.area); + + (*_gdk_event_func) (&event, _gdk_event_data); + + g_object_unref (window); } if (expose_region != update_area) diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c index 8cd403c2df..b14ff9f95c 100644 --- a/gdk/x11/gdkwindow-x11.c +++ b/gdk/x11/gdkwindow-x11.c @@ -236,6 +236,13 @@ tmp_unset_bg (GdkWindow *window) obj = (GdkWindowObject *) window; 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; if (obj->bg_pixmap != GDK_NO_BG) @@ -252,6 +259,9 @@ tmp_reset_bg (GdkWindow *window) obj = (GdkWindowObject *) window; impl = GDK_WINDOW_IMPL_X11 (obj->impl); + if (!(obj->event_mask & GDK_EXPOSURE_MASK)) + return; + impl->position_info.no_bg = FALSE; if (obj->bg_pixmap == GDK_NO_BG) @@ -1107,7 +1117,6 @@ gdk_toplevel_x11_free_contents (GdkDisplay *display, toplevel->update_counter = None; XSyncIntToValue (&toplevel->current_counter_value, 0); - XSyncIntToValue (&toplevel->pending_counter_value, 0); } #endif } diff --git a/tests/testtoolbar.c b/tests/testtoolbar.c index 73e88cc428..9af5d92792 100644 --- a/tests/testtoolbar.c +++ b/tests/testtoolbar.c @@ -476,6 +476,18 @@ toolbar_drag_leave (GtkToolbar *toolbar, 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 main (gint argc, gchar **argv) { @@ -587,6 +599,7 @@ main (gint argc, gchar **argv) gtk_tool_button_set_label (GTK_TOOL_BUTTON (item), NULL); add_item_to_list (store, item, "New"); gtk_toolbar_insert (GTK_TOOLBAR (toolbar), item, -1); + g_timeout_add (3000, (GSourceFunc) timeout_cb, item); gtk_tool_item_set_expand (item, TRUE); menu = gtk_menu_new (); @@ -601,7 +614,7 @@ main (gint argc, gchar **argv) gtk_menu_tool_button_set_menu (GTK_MENU_TOOL_BUTTON (item), menu); add_item_to_list (store, item, "Open"); gtk_toolbar_insert (GTK_TOOLBAR (toolbar), item, -1); - + item = gtk_separator_tool_item_new (); add_item_to_list (store, item, "-----"); gtk_toolbar_insert (GTK_TOOLBAR (toolbar), item, -1); |