+Fri Jan 15 10:22:21 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwidget.c (gtk_widget_class_init):
+ nparams for selection_get should be 3, not 2.
+ [ From Damon Chaplin <damon@karuna.freeserve.co.uk> ]
+
+ * gtk/gtkeventbox.c (gtk_event_box_paint): Add a paint
+ routine so queued redraws work inside event boxes.
+
+Thu Jan 14 17:47:37 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable): Only
+ redraw character under cursor when not displaying
+ highlighted selection.
+
+ * gdk/gdkrgb.c (gdk_rgb_init): Add in a cast to
+ gpointer to make IRIX cc happy.
+
+Thu Jan 14 12:29:50 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkcheckbutton.c (gtk_check_button_draw): Restructure
+ the drawing code to remove a bit of duplication -
+ and to remove a call to gtk_widget_draw_focus()
+ that queues a redraw when an expose occurs.
+
+ * gtk/gtklabel.c (gtk_label_expose): Fix up handling
+ of ypadding.
+
+ * gtk/gtknotebook.c (gtk_notebook_draw): If we redraw
+ the whole widget, also redraw the corresponding
+ areas of the child widget. (have_visible_child
+ still has some problems)
+
+ * gdk/gdkpixmap.c: Change some g_new's to g_new0 so
+ that fields unused for pixmaps get initialzized
+ sanely.
+
+ * gdk/gdk.h gdk/gdkwindow.c gdk/gdkprivate.h: Add new calls
+ gdk_window_is_visible() and gdk_window_is_viewable()
+ and a mapped flag to the window private structure.
+
+ * gtk/gtkbin.c gtk/gtkclist.c gtk/gtkfixed.c gtk/gtkitem.c
+ gtk/gtklayout.c gtk/gtklist.c gtk/gtkmenushell.c
+ gtk/gtknotebook.c gtk/gtkpaned.c gtk/gtktree.c
+ gtk/gtktreeitem.c gtk/gtkviewport.c:
+ Map windows after mapping children.
+
+ * gtk/gtkwidget.c (gtk_widget_clip_rect): Handle
+ rectangles completely clipped away correctly.
+
+ * gtk/gtkwidget.c (gtk_widget_idle_draw): Don't
+ call gtk_widget_draw if width or height is 0.
+
+ * gtk/gtkwidget.c (gtk_widget_idle_draw): Don't
+ rely on GTK_REDRAW_PENDING after we've cleared
+ it. (This was causing draw-combining to not
+ happen at all).
+
+ * gtk/gtkbin.c gtk/gtkscale.c: Remove uneccessary calls
+ to gtk_widget_queue_draw() when mapping.
+
+Thu Jan 14 11:29:53 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkdnd.c (gtk_drag_get_event_action): Make
+ MOD1-drag also do action ask.
+
+ * gtk/gtkdnd.c (gtk_drag_button_release_cb): Send the
+ button-release event we simulate to get grabs released,
+ with a window of GDK_ROOT_PARENT instead of the actual
+ widget. This is a bad hack in some sense, but seems
+ to work nicely. (It's sort of like what you would
+ if you grabbed on button press, then the user
+ released outside of the widget.)
+
+Thu Jan 14 20:29:16 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkstyle.[ch] (gtk_style_apply_default_background):
+ Change copy_area => !set_bg. Use tile instead of
+ gdk_window_copy_area when drawing without !set_bg.
+
+ This does mess up timj's neat check-button example,
+ but is consistent with how we interpret background
+ pixmaps everywhere else in the default scheme.
+
+ Restructure code for clarity.
+
+Thu Jan 14 19:19:51 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkevents.c: Do all event processing in
+ dispatch() instead of prepare() and check().
+
Wed Jan 13 22:34:29 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkbutton.c gtk/gtkclist.c gtk/gtkhandlebox.c
+Fri Jan 15 10:22:21 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwidget.c (gtk_widget_class_init):
+ nparams for selection_get should be 3, not 2.
+ [ From Damon Chaplin <damon@karuna.freeserve.co.uk> ]
+
+ * gtk/gtkeventbox.c (gtk_event_box_paint): Add a paint
+ routine so queued redraws work inside event boxes.
+
+Thu Jan 14 17:47:37 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable): Only
+ redraw character under cursor when not displaying
+ highlighted selection.
+
+ * gdk/gdkrgb.c (gdk_rgb_init): Add in a cast to
+ gpointer to make IRIX cc happy.
+
+Thu Jan 14 12:29:50 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkcheckbutton.c (gtk_check_button_draw): Restructure
+ the drawing code to remove a bit of duplication -
+ and to remove a call to gtk_widget_draw_focus()
+ that queues a redraw when an expose occurs.
+
+ * gtk/gtklabel.c (gtk_label_expose): Fix up handling
+ of ypadding.
+
+ * gtk/gtknotebook.c (gtk_notebook_draw): If we redraw
+ the whole widget, also redraw the corresponding
+ areas of the child widget. (have_visible_child
+ still has some problems)
+
+ * gdk/gdkpixmap.c: Change some g_new's to g_new0 so
+ that fields unused for pixmaps get initialzized
+ sanely.
+
+ * gdk/gdk.h gdk/gdkwindow.c gdk/gdkprivate.h: Add new calls
+ gdk_window_is_visible() and gdk_window_is_viewable()
+ and a mapped flag to the window private structure.
+
+ * gtk/gtkbin.c gtk/gtkclist.c gtk/gtkfixed.c gtk/gtkitem.c
+ gtk/gtklayout.c gtk/gtklist.c gtk/gtkmenushell.c
+ gtk/gtknotebook.c gtk/gtkpaned.c gtk/gtktree.c
+ gtk/gtktreeitem.c gtk/gtkviewport.c:
+ Map windows after mapping children.
+
+ * gtk/gtkwidget.c (gtk_widget_clip_rect): Handle
+ rectangles completely clipped away correctly.
+
+ * gtk/gtkwidget.c (gtk_widget_idle_draw): Don't
+ call gtk_widget_draw if width or height is 0.
+
+ * gtk/gtkwidget.c (gtk_widget_idle_draw): Don't
+ rely on GTK_REDRAW_PENDING after we've cleared
+ it. (This was causing draw-combining to not
+ happen at all).
+
+ * gtk/gtkbin.c gtk/gtkscale.c: Remove uneccessary calls
+ to gtk_widget_queue_draw() when mapping.
+
+Thu Jan 14 11:29:53 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkdnd.c (gtk_drag_get_event_action): Make
+ MOD1-drag also do action ask.
+
+ * gtk/gtkdnd.c (gtk_drag_button_release_cb): Send the
+ button-release event we simulate to get grabs released,
+ with a window of GDK_ROOT_PARENT instead of the actual
+ widget. This is a bad hack in some sense, but seems
+ to work nicely. (It's sort of like what you would
+ if you grabbed on button press, then the user
+ released outside of the widget.)
+
+Thu Jan 14 20:29:16 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkstyle.[ch] (gtk_style_apply_default_background):
+ Change copy_area => !set_bg. Use tile instead of
+ gdk_window_copy_area when drawing without !set_bg.
+
+ This does mess up timj's neat check-button example,
+ but is consistent with how we interpret background
+ pixmaps everywhere else in the default scheme.
+
+ Restructure code for clarity.
+
+Thu Jan 14 19:19:51 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkevents.c: Do all event processing in
+ dispatch() instead of prepare() and check().
+
Wed Jan 13 22:34:29 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkbutton.c gtk/gtkclist.c gtk/gtkhandlebox.c
+Fri Jan 15 10:22:21 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwidget.c (gtk_widget_class_init):
+ nparams for selection_get should be 3, not 2.
+ [ From Damon Chaplin <damon@karuna.freeserve.co.uk> ]
+
+ * gtk/gtkeventbox.c (gtk_event_box_paint): Add a paint
+ routine so queued redraws work inside event boxes.
+
+Thu Jan 14 17:47:37 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable): Only
+ redraw character under cursor when not displaying
+ highlighted selection.
+
+ * gdk/gdkrgb.c (gdk_rgb_init): Add in a cast to
+ gpointer to make IRIX cc happy.
+
+Thu Jan 14 12:29:50 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkcheckbutton.c (gtk_check_button_draw): Restructure
+ the drawing code to remove a bit of duplication -
+ and to remove a call to gtk_widget_draw_focus()
+ that queues a redraw when an expose occurs.
+
+ * gtk/gtklabel.c (gtk_label_expose): Fix up handling
+ of ypadding.
+
+ * gtk/gtknotebook.c (gtk_notebook_draw): If we redraw
+ the whole widget, also redraw the corresponding
+ areas of the child widget. (have_visible_child
+ still has some problems)
+
+ * gdk/gdkpixmap.c: Change some g_new's to g_new0 so
+ that fields unused for pixmaps get initialzized
+ sanely.
+
+ * gdk/gdk.h gdk/gdkwindow.c gdk/gdkprivate.h: Add new calls
+ gdk_window_is_visible() and gdk_window_is_viewable()
+ and a mapped flag to the window private structure.
+
+ * gtk/gtkbin.c gtk/gtkclist.c gtk/gtkfixed.c gtk/gtkitem.c
+ gtk/gtklayout.c gtk/gtklist.c gtk/gtkmenushell.c
+ gtk/gtknotebook.c gtk/gtkpaned.c gtk/gtktree.c
+ gtk/gtktreeitem.c gtk/gtkviewport.c:
+ Map windows after mapping children.
+
+ * gtk/gtkwidget.c (gtk_widget_clip_rect): Handle
+ rectangles completely clipped away correctly.
+
+ * gtk/gtkwidget.c (gtk_widget_idle_draw): Don't
+ call gtk_widget_draw if width or height is 0.
+
+ * gtk/gtkwidget.c (gtk_widget_idle_draw): Don't
+ rely on GTK_REDRAW_PENDING after we've cleared
+ it. (This was causing draw-combining to not
+ happen at all).
+
+ * gtk/gtkbin.c gtk/gtkscale.c: Remove uneccessary calls
+ to gtk_widget_queue_draw() when mapping.
+
+Thu Jan 14 11:29:53 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkdnd.c (gtk_drag_get_event_action): Make
+ MOD1-drag also do action ask.
+
+ * gtk/gtkdnd.c (gtk_drag_button_release_cb): Send the
+ button-release event we simulate to get grabs released,
+ with a window of GDK_ROOT_PARENT instead of the actual
+ widget. This is a bad hack in some sense, but seems
+ to work nicely. (It's sort of like what you would
+ if you grabbed on button press, then the user
+ released outside of the widget.)
+
+Thu Jan 14 20:29:16 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkstyle.[ch] (gtk_style_apply_default_background):
+ Change copy_area => !set_bg. Use tile instead of
+ gdk_window_copy_area when drawing without !set_bg.
+
+ This does mess up timj's neat check-button example,
+ but is consistent with how we interpret background
+ pixmaps everywhere else in the default scheme.
+
+ Restructure code for clarity.
+
+Thu Jan 14 19:19:51 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkevents.c: Do all event processing in
+ dispatch() instead of prepare() and check().
+
Wed Jan 13 22:34:29 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkbutton.c gtk/gtkclist.c gtk/gtkhandlebox.c
+Fri Jan 15 10:22:21 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwidget.c (gtk_widget_class_init):
+ nparams for selection_get should be 3, not 2.
+ [ From Damon Chaplin <damon@karuna.freeserve.co.uk> ]
+
+ * gtk/gtkeventbox.c (gtk_event_box_paint): Add a paint
+ routine so queued redraws work inside event boxes.
+
+Thu Jan 14 17:47:37 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable): Only
+ redraw character under cursor when not displaying
+ highlighted selection.
+
+ * gdk/gdkrgb.c (gdk_rgb_init): Add in a cast to
+ gpointer to make IRIX cc happy.
+
+Thu Jan 14 12:29:50 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkcheckbutton.c (gtk_check_button_draw): Restructure
+ the drawing code to remove a bit of duplication -
+ and to remove a call to gtk_widget_draw_focus()
+ that queues a redraw when an expose occurs.
+
+ * gtk/gtklabel.c (gtk_label_expose): Fix up handling
+ of ypadding.
+
+ * gtk/gtknotebook.c (gtk_notebook_draw): If we redraw
+ the whole widget, also redraw the corresponding
+ areas of the child widget. (have_visible_child
+ still has some problems)
+
+ * gdk/gdkpixmap.c: Change some g_new's to g_new0 so
+ that fields unused for pixmaps get initialzized
+ sanely.
+
+ * gdk/gdk.h gdk/gdkwindow.c gdk/gdkprivate.h: Add new calls
+ gdk_window_is_visible() and gdk_window_is_viewable()
+ and a mapped flag to the window private structure.
+
+ * gtk/gtkbin.c gtk/gtkclist.c gtk/gtkfixed.c gtk/gtkitem.c
+ gtk/gtklayout.c gtk/gtklist.c gtk/gtkmenushell.c
+ gtk/gtknotebook.c gtk/gtkpaned.c gtk/gtktree.c
+ gtk/gtktreeitem.c gtk/gtkviewport.c:
+ Map windows after mapping children.
+
+ * gtk/gtkwidget.c (gtk_widget_clip_rect): Handle
+ rectangles completely clipped away correctly.
+
+ * gtk/gtkwidget.c (gtk_widget_idle_draw): Don't
+ call gtk_widget_draw if width or height is 0.
+
+ * gtk/gtkwidget.c (gtk_widget_idle_draw): Don't
+ rely on GTK_REDRAW_PENDING after we've cleared
+ it. (This was causing draw-combining to not
+ happen at all).
+
+ * gtk/gtkbin.c gtk/gtkscale.c: Remove uneccessary calls
+ to gtk_widget_queue_draw() when mapping.
+
+Thu Jan 14 11:29:53 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkdnd.c (gtk_drag_get_event_action): Make
+ MOD1-drag also do action ask.
+
+ * gtk/gtkdnd.c (gtk_drag_button_release_cb): Send the
+ button-release event we simulate to get grabs released,
+ with a window of GDK_ROOT_PARENT instead of the actual
+ widget. This is a bad hack in some sense, but seems
+ to work nicely. (It's sort of like what you would
+ if you grabbed on button press, then the user
+ released outside of the widget.)
+
+Thu Jan 14 20:29:16 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkstyle.[ch] (gtk_style_apply_default_background):
+ Change copy_area => !set_bg. Use tile instead of
+ gdk_window_copy_area when drawing without !set_bg.
+
+ This does mess up timj's neat check-button example,
+ but is consistent with how we interpret background
+ pixmaps everywhere else in the default scheme.
+
+ Restructure code for clarity.
+
+Thu Jan 14 19:19:51 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkevents.c: Do all event processing in
+ dispatch() instead of prepare() and check().
+
Wed Jan 13 22:34:29 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkbutton.c gtk/gtkclist.c gtk/gtkhandlebox.c
+Fri Jan 15 10:22:21 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwidget.c (gtk_widget_class_init):
+ nparams for selection_get should be 3, not 2.
+ [ From Damon Chaplin <damon@karuna.freeserve.co.uk> ]
+
+ * gtk/gtkeventbox.c (gtk_event_box_paint): Add a paint
+ routine so queued redraws work inside event boxes.
+
+Thu Jan 14 17:47:37 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable): Only
+ redraw character under cursor when not displaying
+ highlighted selection.
+
+ * gdk/gdkrgb.c (gdk_rgb_init): Add in a cast to
+ gpointer to make IRIX cc happy.
+
+Thu Jan 14 12:29:50 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkcheckbutton.c (gtk_check_button_draw): Restructure
+ the drawing code to remove a bit of duplication -
+ and to remove a call to gtk_widget_draw_focus()
+ that queues a redraw when an expose occurs.
+
+ * gtk/gtklabel.c (gtk_label_expose): Fix up handling
+ of ypadding.
+
+ * gtk/gtknotebook.c (gtk_notebook_draw): If we redraw
+ the whole widget, also redraw the corresponding
+ areas of the child widget. (have_visible_child
+ still has some problems)
+
+ * gdk/gdkpixmap.c: Change some g_new's to g_new0 so
+ that fields unused for pixmaps get initialzized
+ sanely.
+
+ * gdk/gdk.h gdk/gdkwindow.c gdk/gdkprivate.h: Add new calls
+ gdk_window_is_visible() and gdk_window_is_viewable()
+ and a mapped flag to the window private structure.
+
+ * gtk/gtkbin.c gtk/gtkclist.c gtk/gtkfixed.c gtk/gtkitem.c
+ gtk/gtklayout.c gtk/gtklist.c gtk/gtkmenushell.c
+ gtk/gtknotebook.c gtk/gtkpaned.c gtk/gtktree.c
+ gtk/gtktreeitem.c gtk/gtkviewport.c:
+ Map windows after mapping children.
+
+ * gtk/gtkwidget.c (gtk_widget_clip_rect): Handle
+ rectangles completely clipped away correctly.
+
+ * gtk/gtkwidget.c (gtk_widget_idle_draw): Don't
+ call gtk_widget_draw if width or height is 0.
+
+ * gtk/gtkwidget.c (gtk_widget_idle_draw): Don't
+ rely on GTK_REDRAW_PENDING after we've cleared
+ it. (This was causing draw-combining to not
+ happen at all).
+
+ * gtk/gtkbin.c gtk/gtkscale.c: Remove uneccessary calls
+ to gtk_widget_queue_draw() when mapping.
+
+Thu Jan 14 11:29:53 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkdnd.c (gtk_drag_get_event_action): Make
+ MOD1-drag also do action ask.
+
+ * gtk/gtkdnd.c (gtk_drag_button_release_cb): Send the
+ button-release event we simulate to get grabs released,
+ with a window of GDK_ROOT_PARENT instead of the actual
+ widget. This is a bad hack in some sense, but seems
+ to work nicely. (It's sort of like what you would
+ if you grabbed on button press, then the user
+ released outside of the widget.)
+
+Thu Jan 14 20:29:16 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkstyle.[ch] (gtk_style_apply_default_background):
+ Change copy_area => !set_bg. Use tile instead of
+ gdk_window_copy_area when drawing without !set_bg.
+
+ This does mess up timj's neat check-button example,
+ but is consistent with how we interpret background
+ pixmaps everywhere else in the default scheme.
+
+ Restructure code for clarity.
+
+Thu Jan 14 19:19:51 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkevents.c: Do all event processing in
+ dispatch() instead of prepare() and check().
+
Wed Jan 13 22:34:29 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkbutton.c gtk/gtkclist.c gtk/gtkhandlebox.c
+Fri Jan 15 10:22:21 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwidget.c (gtk_widget_class_init):
+ nparams for selection_get should be 3, not 2.
+ [ From Damon Chaplin <damon@karuna.freeserve.co.uk> ]
+
+ * gtk/gtkeventbox.c (gtk_event_box_paint): Add a paint
+ routine so queued redraws work inside event boxes.
+
+Thu Jan 14 17:47:37 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable): Only
+ redraw character under cursor when not displaying
+ highlighted selection.
+
+ * gdk/gdkrgb.c (gdk_rgb_init): Add in a cast to
+ gpointer to make IRIX cc happy.
+
+Thu Jan 14 12:29:50 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkcheckbutton.c (gtk_check_button_draw): Restructure
+ the drawing code to remove a bit of duplication -
+ and to remove a call to gtk_widget_draw_focus()
+ that queues a redraw when an expose occurs.
+
+ * gtk/gtklabel.c (gtk_label_expose): Fix up handling
+ of ypadding.
+
+ * gtk/gtknotebook.c (gtk_notebook_draw): If we redraw
+ the whole widget, also redraw the corresponding
+ areas of the child widget. (have_visible_child
+ still has some problems)
+
+ * gdk/gdkpixmap.c: Change some g_new's to g_new0 so
+ that fields unused for pixmaps get initialzized
+ sanely.
+
+ * gdk/gdk.h gdk/gdkwindow.c gdk/gdkprivate.h: Add new calls
+ gdk_window_is_visible() and gdk_window_is_viewable()
+ and a mapped flag to the window private structure.
+
+ * gtk/gtkbin.c gtk/gtkclist.c gtk/gtkfixed.c gtk/gtkitem.c
+ gtk/gtklayout.c gtk/gtklist.c gtk/gtkmenushell.c
+ gtk/gtknotebook.c gtk/gtkpaned.c gtk/gtktree.c
+ gtk/gtktreeitem.c gtk/gtkviewport.c:
+ Map windows after mapping children.
+
+ * gtk/gtkwidget.c (gtk_widget_clip_rect): Handle
+ rectangles completely clipped away correctly.
+
+ * gtk/gtkwidget.c (gtk_widget_idle_draw): Don't
+ call gtk_widget_draw if width or height is 0.
+
+ * gtk/gtkwidget.c (gtk_widget_idle_draw): Don't
+ rely on GTK_REDRAW_PENDING after we've cleared
+ it. (This was causing draw-combining to not
+ happen at all).
+
+ * gtk/gtkbin.c gtk/gtkscale.c: Remove uneccessary calls
+ to gtk_widget_queue_draw() when mapping.
+
+Thu Jan 14 11:29:53 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkdnd.c (gtk_drag_get_event_action): Make
+ MOD1-drag also do action ask.
+
+ * gtk/gtkdnd.c (gtk_drag_button_release_cb): Send the
+ button-release event we simulate to get grabs released,
+ with a window of GDK_ROOT_PARENT instead of the actual
+ widget. This is a bad hack in some sense, but seems
+ to work nicely. (It's sort of like what you would
+ if you grabbed on button press, then the user
+ released outside of the widget.)
+
+Thu Jan 14 20:29:16 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkstyle.[ch] (gtk_style_apply_default_background):
+ Change copy_area => !set_bg. Use tile instead of
+ gdk_window_copy_area when drawing without !set_bg.
+
+ This does mess up timj's neat check-button example,
+ but is consistent with how we interpret background
+ pixmaps everywhere else in the default scheme.
+
+ Restructure code for clarity.
+
+Thu Jan 14 19:19:51 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkevents.c: Do all event processing in
+ dispatch() instead of prepare() and check().
+
Wed Jan 13 22:34:29 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkbutton.c gtk/gtkclist.c gtk/gtkhandlebox.c
+Fri Jan 15 10:22:21 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwidget.c (gtk_widget_class_init):
+ nparams for selection_get should be 3, not 2.
+ [ From Damon Chaplin <damon@karuna.freeserve.co.uk> ]
+
+ * gtk/gtkeventbox.c (gtk_event_box_paint): Add a paint
+ routine so queued redraws work inside event boxes.
+
+Thu Jan 14 17:47:37 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable): Only
+ redraw character under cursor when not displaying
+ highlighted selection.
+
+ * gdk/gdkrgb.c (gdk_rgb_init): Add in a cast to
+ gpointer to make IRIX cc happy.
+
+Thu Jan 14 12:29:50 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkcheckbutton.c (gtk_check_button_draw): Restructure
+ the drawing code to remove a bit of duplication -
+ and to remove a call to gtk_widget_draw_focus()
+ that queues a redraw when an expose occurs.
+
+ * gtk/gtklabel.c (gtk_label_expose): Fix up handling
+ of ypadding.
+
+ * gtk/gtknotebook.c (gtk_notebook_draw): If we redraw
+ the whole widget, also redraw the corresponding
+ areas of the child widget. (have_visible_child
+ still has some problems)
+
+ * gdk/gdkpixmap.c: Change some g_new's to g_new0 so
+ that fields unused for pixmaps get initialzized
+ sanely.
+
+ * gdk/gdk.h gdk/gdkwindow.c gdk/gdkprivate.h: Add new calls
+ gdk_window_is_visible() and gdk_window_is_viewable()
+ and a mapped flag to the window private structure.
+
+ * gtk/gtkbin.c gtk/gtkclist.c gtk/gtkfixed.c gtk/gtkitem.c
+ gtk/gtklayout.c gtk/gtklist.c gtk/gtkmenushell.c
+ gtk/gtknotebook.c gtk/gtkpaned.c gtk/gtktree.c
+ gtk/gtktreeitem.c gtk/gtkviewport.c:
+ Map windows after mapping children.
+
+ * gtk/gtkwidget.c (gtk_widget_clip_rect): Handle
+ rectangles completely clipped away correctly.
+
+ * gtk/gtkwidget.c (gtk_widget_idle_draw): Don't
+ call gtk_widget_draw if width or height is 0.
+
+ * gtk/gtkwidget.c (gtk_widget_idle_draw): Don't
+ rely on GTK_REDRAW_PENDING after we've cleared
+ it. (This was causing draw-combining to not
+ happen at all).
+
+ * gtk/gtkbin.c gtk/gtkscale.c: Remove uneccessary calls
+ to gtk_widget_queue_draw() when mapping.
+
+Thu Jan 14 11:29:53 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkdnd.c (gtk_drag_get_event_action): Make
+ MOD1-drag also do action ask.
+
+ * gtk/gtkdnd.c (gtk_drag_button_release_cb): Send the
+ button-release event we simulate to get grabs released,
+ with a window of GDK_ROOT_PARENT instead of the actual
+ widget. This is a bad hack in some sense, but seems
+ to work nicely. (It's sort of like what you would
+ if you grabbed on button press, then the user
+ released outside of the widget.)
+
+Thu Jan 14 20:29:16 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkstyle.[ch] (gtk_style_apply_default_background):
+ Change copy_area => !set_bg. Use tile instead of
+ gdk_window_copy_area when drawing without !set_bg.
+
+ This does mess up timj's neat check-button example,
+ but is consistent with how we interpret background
+ pixmaps everywhere else in the default scheme.
+
+ Restructure code for clarity.
+
+Thu Jan 14 19:19:51 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkevents.c: Do all event processing in
+ dispatch() instead of prepare() and check().
+
Wed Jan 13 22:34:29 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkbutton.c gtk/gtkclist.c gtk/gtkhandlebox.c
*/
void gdk_window_merge_child_shapes (GdkWindow *window);
+/*
+ * Check if a window has been shown, and whether all it's
+ * parents up to a toplevel have been shown, respectively.
+ * Note that a window that is_viewable below is not necessarily
+ * viewable in the X sense.
+ */
+gboolean gdk_window_is_visible (GdkWindow *window);
+gboolean gdk_window_is_viewable (GdkWindow *window);
+
/*
* The following function adds a global filter for all client
* messages of type message_type
if (depth == -1)
depth = gdk_window_get_visual (window)->depth;
- private = g_new (GdkWindowPrivate, 1);
+ private = g_new0 (GdkWindowPrivate, 1);
pixmap = (GdkPixmap*) private;
private->xdisplay = window_private->xdisplay;
if (window_private->destroyed)
return NULL;
- private = g_new (GdkWindowPrivate, 1);
+ private = g_new0 (GdkWindowPrivate, 1);
pixmap = (GdkPixmap*) private;
private->parent = NULL;
if (depth == -1)
depth = gdk_window_get_visual (window)->depth;
- private = g_new (GdkWindowPrivate, 1);
+ private = g_new0 (GdkWindowPrivate, 1);
pixmap = (GdkPixmap*) private;
private->parent = NULL;
guint8 window_type;
guint ref_count;
guint destroyed : 2;
+ guint mapped : 1;
gint extension_events;
if (image_info->bitmap)
/* Use malloc() instead of g_malloc since X will free() this mem */
static_image[i] = gdk_image_new_bitmap (image_info->visual,
- malloc (IMAGE_WIDTH * IMAGE_HEIGHT >> 3),
+ (gpointer) malloc (IMAGE_WIDTH * IMAGE_HEIGHT >> 3),
IMAGE_WIDTH, IMAGE_HEIGHT);
else
static_image[i] = gdk_image_new (GDK_IMAGE_FASTEST,
private->xdisplay = parent_display;
private->destroyed = FALSE;
+ private->mapped = FALSE;
private->resize_count = 0;
private->ref_count = 1;
xattributes_mask = 0;
private->ref_count = 1;
private->window_type = GDK_WINDOW_FOREIGN;
private->destroyed = FALSE;
+ private->mapped = (attrs.map_state != IsUnmapped);
private->extension_events = 0;
private->colormap = NULL;
private = (GdkWindowPrivate*) window;
if (!private->destroyed)
{
+ private->mapped = TRUE;
XRaiseWindow (private->xdisplay, private->xwindow);
XMapWindow (private->xdisplay, private->xwindow);
}
private = (GdkWindowPrivate*) window;
if (!private->destroyed)
- XUnmapWindow (private->xdisplay, private->xwindow);
+ {
+ private->mapped = FALSE;
+ XUnmapWindow (private->xdisplay, private->xwindow);
+ }
}
void
#endif
}
+/*************************************************************
+ * gdk_window_is_visible:
+ * Check if the given window is mapped.
+ * arguments:
+ * window:
+ * results:
+ * is the window mapped
+ *************************************************************/
+
+gboolean
+gdk_window_is_visible (GdkWindow *window)
+{
+ GdkWindowPrivate *private = (GdkWindowPrivate *)window;
+
+ g_return_val_if_fail (window != NULL, FALSE);
+
+ return private->mapped;
+}
+
+/*************************************************************
+ * gdk_window_is_viewable:
+ * Check if the window and all ancestors of the window
+ * are mapped. (This is not necessarily "viewable" in
+ * the X sense, since we only check as far as we have
+ * GDK window parents, not to the root window)
+ * arguments:
+ * window:
+ * results:
+ * is the window viewable
+ *************************************************************/
+
+gboolean
+gdk_window_is_viewable (GdkWindow *window)
+{
+ GdkWindowPrivate *private = (GdkWindowPrivate *)window;
+
+ g_return_val_if_fail (window != NULL, FALSE);
+
+ while (private && (private != &gdk_root_parent))
+ {
+ if (!private->mapped)
+ return FALSE;
+
+ private = (GdkWindowPrivate *)private->parent;
+ }
+
+ return TRUE;
+}
+
void
gdk_drawable_set_data (GdkDrawable *drawable,
const gchar *key,
g_dataset_set_data_full (drawable, key, data, destroy_func);
}
+
if (depth == -1)
depth = gdk_window_get_visual (window)->depth;
- private = g_new (GdkWindowPrivate, 1);
+ private = g_new0 (GdkWindowPrivate, 1);
pixmap = (GdkPixmap*) private;
private->xdisplay = window_private->xdisplay;
if (window_private->destroyed)
return NULL;
- private = g_new (GdkWindowPrivate, 1);
+ private = g_new0 (GdkWindowPrivate, 1);
pixmap = (GdkPixmap*) private;
private->parent = NULL;
if (depth == -1)
depth = gdk_window_get_visual (window)->depth;
- private = g_new (GdkWindowPrivate, 1);
+ private = g_new0 (GdkWindowPrivate, 1);
pixmap = (GdkPixmap*) private;
private->parent = NULL;
private->xdisplay = parent_display;
private->destroyed = FALSE;
+ private->mapped = FALSE;
private->resize_count = 0;
private->ref_count = 1;
xattributes_mask = 0;
private->ref_count = 1;
private->window_type = GDK_WINDOW_FOREIGN;
private->destroyed = FALSE;
+ private->mapped = (attrs.map_state != IsUnmapped);
private->extension_events = 0;
private->colormap = NULL;
private = (GdkWindowPrivate*) window;
if (!private->destroyed)
{
+ private->mapped = TRUE;
XRaiseWindow (private->xdisplay, private->xwindow);
XMapWindow (private->xdisplay, private->xwindow);
}
private = (GdkWindowPrivate*) window;
if (!private->destroyed)
- XUnmapWindow (private->xdisplay, private->xwindow);
+ {
+ private->mapped = FALSE;
+ XUnmapWindow (private->xdisplay, private->xwindow);
+ }
}
void
#endif
}
+/*************************************************************
+ * gdk_window_is_visible:
+ * Check if the given window is mapped.
+ * arguments:
+ * window:
+ * results:
+ * is the window mapped
+ *************************************************************/
+
+gboolean
+gdk_window_is_visible (GdkWindow *window)
+{
+ GdkWindowPrivate *private = (GdkWindowPrivate *)window;
+
+ g_return_val_if_fail (window != NULL, FALSE);
+
+ return private->mapped;
+}
+
+/*************************************************************
+ * gdk_window_is_viewable:
+ * Check if the window and all ancestors of the window
+ * are mapped. (This is not necessarily "viewable" in
+ * the X sense, since we only check as far as we have
+ * GDK window parents, not to the root window)
+ * arguments:
+ * window:
+ * results:
+ * is the window viewable
+ *************************************************************/
+
+gboolean
+gdk_window_is_viewable (GdkWindow *window)
+{
+ GdkWindowPrivate *private = (GdkWindowPrivate *)window;
+
+ g_return_val_if_fail (window != NULL, FALSE);
+
+ while (private && (private != &gdk_root_parent))
+ {
+ if (!private->mapped)
+ return FALSE;
+
+ private = (GdkWindowPrivate *)private->parent;
+ }
+
+ return TRUE;
+}
+
void
gdk_drawable_set_data (GdkDrawable *drawable,
const gchar *key,
g_dataset_set_data_full (drawable, key, data, destroy_func);
}
+
GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED);
bin = GTK_BIN (widget);
- if (!GTK_WIDGET_NO_WINDOW (widget))
- gdk_window_show (widget->window);
- else
- gtk_widget_queue_draw (widget);
-
if (bin->child &&
GTK_WIDGET_VISIBLE (bin->child) &&
!GTK_WIDGET_MAPPED (bin->child))
gtk_widget_map (bin->child);
+
+ if (!GTK_WIDGET_NO_WINDOW (widget))
+ gdk_window_show (widget->window);
}
static void
GtkAllocation *allocation);
static gint gtk_check_button_expose (GtkWidget *widget,
GdkEventExpose *event);
+static void gtk_check_button_paint (GtkWidget *widget,
+ GdkRectangle *area);
static void gtk_check_button_draw_indicator (GtkCheckButton *check_button,
GdkRectangle *area);
static void gtk_real_check_button_draw_indicator (GtkCheckButton *check_button,
return check_button;
}
+/* This should only be called when toggle_button->draw_indicator
+ * is true.
+ */
+static void
+gtk_check_button_paint (GtkWidget *widget,
+ GdkRectangle *area)
+{
+ GtkCheckButton *check_button;
+
+ g_return_if_fail (widget != NULL);
+ g_return_if_fail (GTK_IS_CHECK_BUTTON (widget));
+
+ check_button = GTK_CHECK_BUTTON (widget);
+
+ if (GTK_WIDGET_DRAWABLE (widget))
+ {
+ gint border_width;
+
+ gtk_check_button_draw_indicator (check_button, area);
+
+ border_width = GTK_CONTAINER (widget)->border_width;
+ if (GTK_WIDGET_HAS_FOCUS (widget))
+ gtk_paint_focus (widget->style, widget->window,
+ NULL, widget, "checkbutton",
+ border_width + widget->allocation.x,
+ border_width + widget->allocation.y,
+ widget->allocation.width - 2 * border_width - 1,
+ widget->allocation.height - 2 * border_width - 1);
+ }
+}
+
static void
gtk_check_button_draw (GtkWidget *widget,
GdkRectangle *area)
{
if (toggle_button->draw_indicator)
{
- gint border_width;
-
- gtk_check_button_draw_indicator (check_button, area);
-
- border_width = GTK_CONTAINER (widget)->border_width;
- if (GTK_WIDGET_HAS_FOCUS (widget))
- gtk_paint_focus (widget->style, widget->window,
- NULL, widget, "checkbutton",
- border_width + widget->allocation.x,
- border_width + widget->allocation.y,
- widget->allocation.width - 2 * border_width - 1,
- widget->allocation.height - 2 * border_width - 1);
-
- if (bin->child && GTK_WIDGET_NO_WINDOW (bin->child) &&
- gtk_widget_intersect (bin->child, area, &child_area))
+ gtk_check_button_paint (widget, area);
+
+ if (bin->child && gtk_widget_intersect (bin->child, area, &child_area))
gtk_widget_draw (bin->child, &child_area);
}
else
{
if (toggle_button->draw_indicator)
{
- gtk_check_button_draw_indicator (check_button, &event->area);
+ gtk_check_button_paint (widget, &event->area);
child_event = *event;
if (bin->child && GTK_WIDGET_NO_WINDOW (bin->child) &&
gtk_widget_intersect (bin->child, &event->area, &child_event.area))
gtk_widget_event (bin->child, (GdkEvent*) &child_event);
-
- gtk_widget_draw_focus (widget);
}
else
{
{
GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED);
- gdk_window_show (widget->window);
- gdk_window_show (clist->title_window);
- gdk_window_show (clist->clist_window);
-
/* map column buttons */
for (i = 0; i < clist->columns; i++)
if (clist->column[i].button &&
if (clist->column[i].window && clist->column[i].button)
gdk_window_show (clist->column[i].window);
+ gdk_window_show (clist->title_window);
+ gdk_window_show (clist->clist_window);
+ gdk_window_show (widget->window);
+
/* unfreeze the list */
clist->freeze_count = 0;
}
/* Draw the character under the cursor again
*/
- if (editable->current_pos < entry->text_length)
+ if ((editable->current_pos < entry->text_length) &&
+ (editable->selection_start_pos == editable->selection_end_pos))
gdk_draw_text_wc (drawable, widget->style->font,
widget->style->fg_gc[GTK_WIDGET_STATE (widget)],
xoffset, yoffset,
entry->text + editable->current_pos, 1);
- }
+ }
#ifdef USE_XIM
GtkRequisition *requisition);
static void gtk_event_box_size_allocate (GtkWidget *widget,
GtkAllocation *allocation);
-static void gtk_event_box_draw (GtkWidget *widget,
- GdkRectangle *area);
-static gint gtk_event_box_expose (GtkWidget *widget,
- GdkEventExpose *event);
+static void gtk_event_box_paint (GtkWidget *widget,
+ GdkRectangle *area);
+static void gtk_event_box_draw (GtkWidget *widget,
+ GdkRectangle *area);
+static gint gtk_event_box_expose (GtkWidget *widget,
+ GdkEventExpose *event);
GtkType
}
}
+static void
+gtk_event_box_paint (GtkWidget *widget,
+ GdkRectangle *area)
+{
+ gtk_paint_flat_box (widget->style, widget->window,
+ widget->state, GTK_SHADOW_NONE,
+ area, widget, "eventbox",
+ 0, 0, -1, -1);
+}
+
static void
gtk_event_box_draw (GtkWidget *widget,
- GdkRectangle *area)
+ GdkRectangle *area)
{
GtkBin *bin;
GdkRectangle tmp_area;
tmp_area = *area;
tmp_area.x -= GTK_CONTAINER (widget)->border_width;
tmp_area.y -= GTK_CONTAINER (widget)->border_width;
+
+ gtk_event_box_paint (widget, &tmp_area);
if (bin->child)
{
{
bin = GTK_BIN (widget);
+ gtk_event_box_paint (widget, &event->area);
+
child_event = *event;
if (bin->child &&
GTK_WIDGET_NO_WINDOW (bin->child) &&
GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED);
fixed = GTK_FIXED (widget);
- gdk_window_show (widget->window);
-
children = fixed->children;
while (children)
{
!GTK_WIDGET_MAPPED (child->widget))
gtk_widget_map (child->widget);
}
+
+ gdk_window_show (widget->window);
}
static void
bin = GTK_BIN (widget);
hb = GTK_HANDLE_BOX (widget);
- gdk_window_show (hb->bin_window);
- gdk_window_show (widget->window);
+ if (bin->child &&
+ GTK_WIDGET_VISIBLE (bin->child) &&
+ !GTK_WIDGET_MAPPED (bin->child))
+ gtk_widget_map (bin->child);
if (hb->child_detached && !hb->float_window_mapped)
{
hb->float_window_mapped = TRUE;
}
- if (bin->child &&
- GTK_WIDGET_VISIBLE (bin->child) &&
- !GTK_WIDGET_MAPPED (bin->child))
- gtk_widget_map (bin->child);
+ gdk_window_show (hb->bin_window);
+ gdk_window_show (widget->window);
}
static void
GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED);
- gdk_window_show (widget->window);
-
bin = GTK_BIN (widget);
if (bin->child &&
GTK_WIDGET_VISIBLE (bin->child) &&
!GTK_WIDGET_MAPPED (bin->child))
gtk_widget_map (bin->child);
+
+ gdk_window_show (widget->window);
}
static void
y = (widget->allocation.y
+ (widget->allocation.height
- - widget->requisition.height - 2 * misc->ypad) * misc->yalign
+ - widget->requisition.height) * misc->yalign
+ misc->ypad + 0.5);
for (word = label->words; word; word = word->next)
{
GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED);
- gdk_window_show (widget->window);
- gdk_window_show (layout->bin_window);
-
tmp_list = layout->children;
while (tmp_list)
{
tmp_list = tmp_list->next;
}
-
+
+ gdk_window_show (layout->bin_window);
+ gdk_window_show (widget->window);
}
static void
GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED);
list = GTK_LIST (widget);
- gdk_window_show (widget->window);
-
children = list->children;
while (children)
{
!GTK_WIDGET_MAPPED (child))
gtk_widget_map (child);
}
+
+ gdk_window_show (widget->window);
}
static void
menu_shell = GTK_MENU_SHELL (widget);
GTK_WIDGET_SET_FLAGS (menu_shell, GTK_MAPPED);
- gdk_window_show (widget->window);
children = menu_shell->children;
while (children)
if (GTK_WIDGET_VISIBLE (child) && !GTK_WIDGET_MAPPED (child))
gtk_widget_map (child);
}
+
+ gdk_window_show (widget->window);
}
static void
g_return_if_fail (GTK_IS_NOTEBOOK (widget));
GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED);
- gdk_window_show (widget->window);
notebook = GTK_NOTEBOOK (widget);
gtk_widget_map (page->tab_label);
}
}
+
+ gdk_window_show (widget->window);
}
static void
{
GtkNotebook *notebook;
GdkRectangle child_area;
+ GdkRectangle draw_area;
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_NOTEBOOK (widget));
notebook = GTK_NOTEBOOK (widget);
+ draw_area = *area;
+
if (GTK_WIDGET_DRAWABLE (widget))
{
gboolean have_visible_child;
if (have_visible_child != notebook->have_visible_child)
{
- GdkRectangle full_area;
-
notebook->have_visible_child = have_visible_child;
- full_area.x = 0;
- full_area.y = 0;
- full_area.width = widget->allocation.width;
- full_area.height = widget->allocation.height;
- gtk_notebook_paint (widget, &full_area);
+ draw_area.x = 0;
+ draw_area.y = 0;
+ draw_area.width = widget->allocation.width;
+ draw_area.height = widget->allocation.height;
}
- else
- gtk_notebook_paint (widget, area);
+
+ gtk_notebook_paint (widget, &draw_area);
gtk_widget_draw_focus (widget);
if (notebook->cur_page && GTK_WIDGET_VISIBLE (notebook->cur_page->child) &&
- gtk_widget_intersect (notebook->cur_page->child, area, &child_area))
+ gtk_widget_intersect (notebook->cur_page->child, &draw_area, &child_area))
gtk_widget_draw (notebook->cur_page->child, &child_area);
}
else
GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED);
paned = GTK_PANED (widget);
- gdk_window_show (widget->window);
-
if (paned->child1 &&
GTK_WIDGET_VISIBLE (paned->child1) &&
!GTK_WIDGET_MAPPED (paned->child1))
GTK_WIDGET_VISIBLE (paned->child2) &&
!GTK_WIDGET_MAPPED (paned->child2))
gtk_widget_map (paned->child2);
+
+ gdk_window_show (widget->window);
}
static void
GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED);
range = GTK_RANGE (widget);
- if (GTK_WIDGET_NO_WINDOW (widget))
- gtk_widget_queue_draw (widget);
-
gdk_window_show (range->trough);
}
GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED);
tree = GTK_TREE (widget);
- gdk_window_show (widget->window);
-
if(GTK_IS_TREE(widget->parent))
{
/* set root tree for this tree */
gtk_widget_map (child);
}
}
+
+ gdk_window_show (widget->window);
}
static gint
GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED);
- gdk_window_show (widget->window);
-
if(item->pixmaps_box &&
GTK_WIDGET_VISIBLE (item->pixmaps_box) &&
!GTK_WIDGET_MAPPED (item->pixmaps_box))
GTK_WIDGET_VISIBLE (bin->child) &&
!GTK_WIDGET_MAPPED (bin->child))
gtk_widget_map (bin->child);
+
+ gdk_window_show (widget->window);
}
static void
GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED);
bin = GTK_BIN (widget);
- gdk_window_show (widget->window);
-
if (bin->child &&
GTK_WIDGET_VISIBLE (bin->child) &&
!GTK_WIDGET_MAPPED (bin->child))
gtk_widget_map (bin->child);
+
+ gdk_window_show (widget->window);
}
static void
object_class->type,
GTK_SIGNAL_OFFSET (GtkWidgetClass, selection_get),
gtk_marshal_NONE__POINTER_UINT_UINT,
- GTK_TYPE_NONE, 2,
+ GTK_TYPE_NONE, 3,
GTK_TYPE_SELECTION_DATA,
GTK_TYPE_UINT,
GTK_TYPE_UINT);
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_WIDGET (widget));
- gtk_widget_queue_draw_data (widget, x, y, width, height, NULL);
+ if (widget->window && gdk_window_is_viewable (widget->window))
+ gtk_widget_queue_draw_data (widget, x, y, width, height, NULL);
}
void
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_WIDGET (widget));
- gtk_widget_queue_draw_data (widget, 0, 0, -1, -1, NULL);
+ if (widget->window && gdk_window_is_viewable (widget->window))
+ gtk_widget_queue_draw_data (widget, 0, 0, -1, -1, NULL);
}
void
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_WIDGET (widget));
+ if (!(widget->window && gdk_window_is_viewable (widget->window)))
+ return;
+
/* Find the correct widget */
if (GTK_WIDGET_NO_WINDOW (widget))
if (rect->x < 0)
{
- rect->width += rect->x;
+ rect->width = (width > -rect->x) ? width + rect->x : 0;
rect->x = 0;
}
if (rect->y < 0)
{
- rect->height += rect->y;
+ rect->height = (height > -rect->y) ? width + rect->y : 0;
rect->y = 0;
}
if (rect->x + rect->width > width)
- rect->width = width - rect->x;
+ rect->width = (width > rect->x) ? width - rect->x : 0;
if (rect->y + rect->height > height)
- rect->height = height - rect->y;
+ rect->height = (height > rect->y) ? height - rect->y : 0;
}
if (!window)
}
static gint
-gtk_widget_idle_draw (gpointer data)
+gtk_widget_idle_draw (gpointer cb_data)
{
GSList *widget_list;
GSList *old_queue;
gtk_object_set_data_by_id (GTK_OBJECT (widget),
draw_data_tmp_key_id,
draw_data_list);
-
+
+ /* XXX: Since we are unsetting this flag here, further
+ * down the only way we can check if a redraw is queued
+ * on a given widget is by calling gtk_object_get_data.
+ * for speed purposes we might well want a private
+ * flag GTK_REDRAW_PROCESSING or something.
+ */
GTK_PRIVATE_UNSET_FLAG (widget, GTK_REDRAW_PENDING);
while (draw_data_list)
if (parent)
parent = parent->parent;
-
- if (parent && GTK_WIDGET_REDRAW_PENDING (parent))
+
+ if (parent)
parent_list = gtk_object_get_data_by_id (GTK_OBJECT (parent),
draw_data_tmp_key_id);
else
while (draw_data_list)
{
GtkDrawData *data = draw_data_list->data;
- gtk_widget_draw (widget, &data->rect);
+ if ((data->rect.width != 0) || (data->rect.height != 0))
+ gtk_widget_draw (widget, &data->rect);
if (draw_data_list->next)
draw_data_list = draw_data_list->next;
needs_draw = TRUE;
}
}
- else if (widget->allocation.width != real_allocation.width ||
- widget->allocation.height != real_allocation.height)
+ else if ((widget->allocation.width != real_allocation.width ||
+ widget->allocation.height != real_allocation.height))
{
needs_draw = TRUE;
}
style "window"
{
- # bg_pixmap[NORMAL] = "marble.xpm"
+# bg_pixmap[NORMAL] = "marble.xpm"
}
style "scale"
style "window"
{
- # bg_pixmap[NORMAL] = "marble.xpm"
+# bg_pixmap[NORMAL] = "marble.xpm"
}
style "scale"