mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-23 20:30:15 +00:00
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:
parent
e9740d62c3
commit
63f2fd9614
28
ChangeLog
28
ChangeLog
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user