]> Pileus Git - ~andy/gtk/commitdiff
nparams for selection_get should be 3, not 2. [ From Damon Chaplin
authorOwen Taylor <otaylor@redhat.com>
Fri, 15 Jan 1999 16:00:39 +0000 (16:00 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Fri, 15 Jan 1999 16:00:39 +0000 (16:00 +0000)
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.

35 files changed:
ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gdk/gdk.h
gdk/gdkpixmap.c
gdk/gdkprivate.h
gdk/gdkrgb.c
gdk/gdkwindow.c
gdk/x11/gdkpixmap-x11.c
gdk/x11/gdkwindow-x11.c
gtk/gtkbin.c
gtk/gtkcheckbutton.c
gtk/gtkclist.c
gtk/gtkentry.c
gtk/gtkeventbox.c
gtk/gtkfixed.c
gtk/gtkhandlebox.c
gtk/gtkitem.c
gtk/gtklabel.c
gtk/gtklayout.c
gtk/gtklist.c
gtk/gtkmenushell.c
gtk/gtknotebook.c
gtk/gtkpaned.c
gtk/gtkscale.c
gtk/gtktree.c
gtk/gtktreeitem.c
gtk/gtkviewport.c
gtk/gtkwidget.c
gtk/testgtkrc
tests/testgtkrc

index 59534b2617b52d0123a5d8db81f22a490475a9b5..c5c3f282965bffe527d5acc98bd47f679a5352fe 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,94 @@
+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
index 59534b2617b52d0123a5d8db81f22a490475a9b5..c5c3f282965bffe527d5acc98bd47f679a5352fe 100644 (file)
@@ -1,3 +1,94 @@
+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
index 59534b2617b52d0123a5d8db81f22a490475a9b5..c5c3f282965bffe527d5acc98bd47f679a5352fe 100644 (file)
@@ -1,3 +1,94 @@
+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
index 59534b2617b52d0123a5d8db81f22a490475a9b5..c5c3f282965bffe527d5acc98bd47f679a5352fe 100644 (file)
@@ -1,3 +1,94 @@
+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
index 59534b2617b52d0123a5d8db81f22a490475a9b5..c5c3f282965bffe527d5acc98bd47f679a5352fe 100644 (file)
@@ -1,3 +1,94 @@
+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
index 59534b2617b52d0123a5d8db81f22a490475a9b5..c5c3f282965bffe527d5acc98bd47f679a5352fe 100644 (file)
@@ -1,3 +1,94 @@
+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
index 59534b2617b52d0123a5d8db81f22a490475a9b5..c5c3f282965bffe527d5acc98bd47f679a5352fe 100644 (file)
@@ -1,3 +1,94 @@
+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
index a35f6e57bc394349f466325f1dfb66e4dd111367..e3030b3bcc974be386ffafb99feca956b297814a 100644 (file)
--- a/gdk/gdk.h
+++ b/gdk/gdk.h
@@ -218,6 +218,15 @@ void gdk_window_set_child_shapes (GdkWindow *window);
  */
 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
index f76e097d32cff7d8b6d00023ff70d3791b51f438..8df3145d7d06853efab7b3c8106d1233036758fe 100644 (file)
@@ -64,7 +64,7 @@ gdk_pixmap_new (GdkWindow *window,
   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;
@@ -106,7 +106,7 @@ gdk_bitmap_create_from_data (GdkWindow   *window,
   if (window_private->destroyed)
     return NULL;
 
-  private = g_new (GdkWindowPrivate, 1);
+  private = g_new0 (GdkWindowPrivate, 1);
   pixmap = (GdkPixmap*) private;
 
   private->parent = NULL;
@@ -158,7 +158,7 @@ gdk_pixmap_create_from_data (GdkWindow   *window,
   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;
index bc971a097f70d0ae3e6cc9d4d5a7b96d5f8e10ee..42b6a5ea4c6c7124f119d53439b77002743ff5fc 100644 (file)
@@ -63,6 +63,7 @@ struct _GdkWindowPrivate
   guint8 window_type;
   guint ref_count;
   guint destroyed : 2;
+  guint mapped : 1;
 
   gint extension_events;
 
index 542e61d373e26cc83ae37269a409ac8814e481ca..51c14399a56fe19c5bb2dc052654bcf3086de274 100644 (file)
@@ -642,7 +642,7 @@ gdk_rgb_init (void)
        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,
index b0931484b3894febfb51286ccb2b25ea1aa41b47..56e8cdfb81c01f71f3c0388c69860f12b4f1d420 100644 (file)
@@ -277,6 +277,7 @@ gdk_window_new (GdkWindow     *parent,
 
   private->xdisplay = parent_display;
   private->destroyed = FALSE;
+  private->mapped = FALSE;
   private->resize_count = 0;
   private->ref_count = 1;
   xattributes_mask = 0;
@@ -511,6 +512,7 @@ gdk_window_foreign_new (guint32 anid)
   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;
@@ -716,6 +718,7 @@ gdk_window_show (GdkWindow *window)
   private = (GdkWindowPrivate*) window;
   if (!private->destroyed)
     {
+      private->mapped = TRUE;
       XRaiseWindow (private->xdisplay, private->xwindow);
       XMapWindow (private->xdisplay, private->xwindow);
     }
@@ -730,7 +733,10 @@ gdk_window_hide (GdkWindow *window)
 
   private = (GdkWindowPrivate*) window;
   if (!private->destroyed)
-    XUnmapWindow (private->xdisplay, private->xwindow);
+    {
+      private->mapped = FALSE;
+      XUnmapWindow (private->xdisplay, private->xwindow);
+    }
 }
 
 void
@@ -2470,6 +2476,55 @@ gdk_window_merge_child_shapes (GdkWindow *window)
 #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,
@@ -2479,3 +2534,4 @@ gdk_drawable_set_data (GdkDrawable   *drawable,
   g_dataset_set_data_full (drawable, key, data, destroy_func);
 }
 
+
index f76e097d32cff7d8b6d00023ff70d3791b51f438..8df3145d7d06853efab7b3c8106d1233036758fe 100644 (file)
@@ -64,7 +64,7 @@ gdk_pixmap_new (GdkWindow *window,
   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;
@@ -106,7 +106,7 @@ gdk_bitmap_create_from_data (GdkWindow   *window,
   if (window_private->destroyed)
     return NULL;
 
-  private = g_new (GdkWindowPrivate, 1);
+  private = g_new0 (GdkWindowPrivate, 1);
   pixmap = (GdkPixmap*) private;
 
   private->parent = NULL;
@@ -158,7 +158,7 @@ gdk_pixmap_create_from_data (GdkWindow   *window,
   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;
index b0931484b3894febfb51286ccb2b25ea1aa41b47..56e8cdfb81c01f71f3c0388c69860f12b4f1d420 100644 (file)
@@ -277,6 +277,7 @@ gdk_window_new (GdkWindow     *parent,
 
   private->xdisplay = parent_display;
   private->destroyed = FALSE;
+  private->mapped = FALSE;
   private->resize_count = 0;
   private->ref_count = 1;
   xattributes_mask = 0;
@@ -511,6 +512,7 @@ gdk_window_foreign_new (guint32 anid)
   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;
@@ -716,6 +718,7 @@ gdk_window_show (GdkWindow *window)
   private = (GdkWindowPrivate*) window;
   if (!private->destroyed)
     {
+      private->mapped = TRUE;
       XRaiseWindow (private->xdisplay, private->xwindow);
       XMapWindow (private->xdisplay, private->xwindow);
     }
@@ -730,7 +733,10 @@ gdk_window_hide (GdkWindow *window)
 
   private = (GdkWindowPrivate*) window;
   if (!private->destroyed)
-    XUnmapWindow (private->xdisplay, private->xwindow);
+    {
+      private->mapped = FALSE;
+      XUnmapWindow (private->xdisplay, private->xwindow);
+    }
 }
 
 void
@@ -2470,6 +2476,55 @@ gdk_window_merge_child_shapes (GdkWindow *window)
 #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,
@@ -2479,3 +2534,4 @@ gdk_drawable_set_data (GdkDrawable   *drawable,
   g_dataset_set_data_full (drawable, key, data, destroy_func);
 }
 
+
index 30d60fbc34afaa6dd4ffb0f20d111176d9e43141..b5e5005fe610369db17122f3bfc031dca71740d6 100644 (file)
@@ -119,15 +119,13 @@ gtk_bin_map (GtkWidget *widget)
   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
index b77a373b9d1dfd9993746fb42ae1c33db929b5b4..1e69eb56d9ba625f1007e73fdcbdcc7555de66cd 100644 (file)
@@ -37,6 +37,8 @@ static void gtk_check_button_size_allocate       (GtkWidget           *widget,
                                                  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,
@@ -119,6 +121,37 @@ gtk_check_button_new_with_label (const gchar *label)
   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)
@@ -140,21 +173,9 @@ gtk_check_button_draw (GtkWidget    *widget,
     {
       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
@@ -280,14 +301,12 @@ gtk_check_button_expose (GtkWidget      *widget,
     {
       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
        {
index 0a0e176d5e934697d4626777ffdfe8f52986fbf0..c6cbcc7a0580d1dad16cbce6b1d436dffbf016ed 100644 (file)
@@ -4615,10 +4615,6 @@ gtk_clist_map (GtkWidget *widget)
     {
       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 &&
@@ -4631,6 +4627,10 @@ gtk_clist_map (GtkWidget *widget)
        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;
     }
index cdb06877f054fd81eb5f933a2dddc6e08a464387..67cf4624fae1e3de808e279cd961b5d523267dcd 100644 (file)
@@ -1457,12 +1457,13 @@ gtk_entry_draw_cursor_on_drawable (GtkEntry *entry, GdkDrawable *drawable)
          
          /* 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
index c4dccd925a0977d125f3272b176e312d1302d5d6..3880a050a9fbb3a4617b72f2bc05edc441ec0339 100644 (file)
@@ -27,10 +27,12 @@ static void gtk_event_box_size_request             (GtkWidget        *widget,
                                                    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
@@ -181,9 +183,19 @@ gtk_event_box_size_allocate (GtkWidget     *widget,
     }
 }
 
+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;
@@ -198,6 +210,8 @@ gtk_event_box_draw (GtkWidget    *widget,
       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)
        {
@@ -222,6 +236,8 @@ gtk_event_box_expose (GtkWidget      *widget,
     {
       bin = GTK_BIN (widget);
 
+      gtk_event_box_paint (widget, &event->area);
+      
       child_event = *event;
       if (bin->child &&
          GTK_WIDGET_NO_WINDOW (bin->child) &&
index 8e51bb2e620039bca0f5cde95604886585ba7632..ef75f7728f13eacc721b8b6eae61bf4f5185a1e9 100644 (file)
@@ -197,8 +197,6 @@ gtk_fixed_map (GtkWidget *widget)
   GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED);
   fixed = GTK_FIXED (widget);
 
-  gdk_window_show (widget->window);
-
   children = fixed->children;
   while (children)
     {
@@ -209,6 +207,8 @@ gtk_fixed_map (GtkWidget *widget)
          !GTK_WIDGET_MAPPED (child->widget))
        gtk_widget_map (child->widget);
     }
+
+  gdk_window_show (widget->window);
 }
 
 static void
index de0f01250b49b160049cc9d81422333541f34218..ff72ce08d7e49cef6235c9991b8cbb6c8d57574f 100644 (file)
@@ -259,8 +259,10 @@ gtk_handle_box_map (GtkWidget *widget)
   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)
     {
@@ -268,10 +270,8 @@ gtk_handle_box_map (GtkWidget *widget)
       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
index febdff8a773234eb0ed9d2f76c6aa6cb342eae5b..92547af4a9fe55d7ed3a46e5810f3a0c61bc9af3 100644 (file)
@@ -147,14 +147,14 @@ gtk_item_map (GtkWidget *widget)
 
   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
index 0c53fa73fb26de85c202440dbf9afa3d4b232070..13e9679fbf0c409fecc1aff7abda5cfc408e587e 100644 (file)
@@ -929,7 +929,7 @@ gtk_label_expose (GtkWidget      *widget,
       
       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)
        {
index e2616f1dde08b57a552f847392b4f784b4c9e7cb..e56b3eeea7c463aa6012d637778bbc10a47a1b0e 100644 (file)
@@ -456,9 +456,6 @@ gtk_layout_map (GtkWidget *widget)
 
   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)
     {
@@ -475,7 +472,9 @@ gtk_layout_map (GtkWidget *widget)
 
       tmp_list = tmp_list->next;
     }
-  
+
+  gdk_window_show (layout->bin_window);
+  gdk_window_show (widget->window);
 }
 
 static void 
index 0a2f0c3a7b947b6557e5ed930fd57d83981bf658..c0d5f246c9649dfa9576b0d3a82cd8bd84a314de 100644 (file)
@@ -435,8 +435,6 @@ gtk_list_map (GtkWidget *widget)
   GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED);
   list = GTK_LIST (widget);
 
-  gdk_window_show (widget->window);
-
   children = list->children;
   while (children)
     {
@@ -447,6 +445,8 @@ gtk_list_map (GtkWidget *widget)
          !GTK_WIDGET_MAPPED (child))
        gtk_widget_map (child);
     }
+
+  gdk_window_show (widget->window);
 }
 
 static void
index 7583ea71f9b007d90dbd9415b822422cae941088..b044b7ef2a4b6bb0d0d3fc76ee44164acd9a7640 100644 (file)
@@ -367,7 +367,6 @@ gtk_menu_shell_map (GtkWidget *widget)
 
   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)
@@ -378,6 +377,8 @@ gtk_menu_shell_map (GtkWidget *widget)
       if (GTK_WIDGET_VISIBLE (child) && !GTK_WIDGET_MAPPED (child))
        gtk_widget_map (child);
     }
+
+  gdk_window_show (widget->window);
 }
 
 static void
index eea6d90a3ba2f4bbccdd9596609155e18b54cc70..75d96dd7aa5b95d33d9f399e91d28ecf4792f192 100644 (file)
@@ -477,7 +477,6 @@ gtk_notebook_map (GtkWidget *widget)
   g_return_if_fail (GTK_IS_NOTEBOOK (widget));
 
   GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED);
-  gdk_window_show (widget->window);
 
   notebook = GTK_NOTEBOOK (widget);
 
@@ -503,6 +502,8 @@ gtk_notebook_map (GtkWidget *widget)
            gtk_widget_map (page->tab_label);
        }
     }
+
+  gdk_window_show (widget->window);
 }
 
 static void
@@ -878,6 +879,7 @@ gtk_notebook_draw (GtkWidget    *widget,
 {
   GtkNotebook *notebook;
   GdkRectangle child_area;
+  GdkRectangle draw_area;
 
   g_return_if_fail (widget != NULL);
   g_return_if_fail (GTK_IS_NOTEBOOK (widget));
@@ -885,6 +887,8 @@ gtk_notebook_draw (GtkWidget    *widget,
 
   notebook = GTK_NOTEBOOK (widget);
 
+  draw_area = *area;
+
   if (GTK_WIDGET_DRAWABLE (widget))
     {
       gboolean have_visible_child;
@@ -893,22 +897,19 @@ gtk_notebook_draw (GtkWidget    *widget,
 
       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
index a55a6e5e609324b39831d73baa2aa6a9d65cc915..6f86114fe58325868ef01e3cdc85cfa8da37dc95 100644 (file)
@@ -186,8 +186,6 @@ gtk_paned_map (GtkWidget *widget)
   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))
@@ -196,6 +194,8 @@ gtk_paned_map (GtkWidget *widget)
       GTK_WIDGET_VISIBLE (paned->child2) &&
       !GTK_WIDGET_MAPPED (paned->child2))
     gtk_widget_map (paned->child2);
+
+  gdk_window_show (widget->window);
 }
 
 static void
index ca3dffff77175bce87b243ad5c8091964f648abe..d44a4681c295602d8a909088d17b49ee9252c90b 100644 (file)
@@ -104,9 +104,6 @@ gtk_scale_map (GtkWidget *widget)
   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);
 }
 
index 058006ecd78d9ae7b68b978ee626935d56980875..6b1eb162e96bfd77ce489ed07e31eab4a1b6ef92 100644 (file)
@@ -562,8 +562,6 @@ gtk_tree_map (GtkWidget *widget)
   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 */
@@ -597,6 +595,8 @@ gtk_tree_map (GtkWidget *widget)
            gtk_widget_map (child);
        }
     }
+
+  gdk_window_show (widget->window);
 }
 
 static gint
index 8e99d59a5946e9fb38ff05ce24b4f5a109d8b36b..1d6d44c2b087e1ba3f2a3a52f349d1ef1d6ffd8d 100644 (file)
@@ -1006,8 +1006,6 @@ gtk_tree_item_map (GtkWidget *widget)
 
   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))
@@ -1017,6 +1015,8 @@ gtk_tree_item_map (GtkWidget *widget)
       GTK_WIDGET_VISIBLE (bin->child) &&
       !GTK_WIDGET_MAPPED (bin->child))
     gtk_widget_map (bin->child);
+
+  gdk_window_show (widget->window);
 }
 
 static void
index 86769f1c9f6f8c793f218954495952a49d054ca4..168ff0317d95a450679df2995b6b7e51452ad3d8 100644 (file)
@@ -382,12 +382,12 @@ gtk_viewport_map (GtkWidget *widget)
   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
index e3ca39afb014cd3b1792f9e51dd6d344c5aa71d7..d909fdf59f0a8a4d16ca761c9eb535bf6ca0b637 100644 (file)
@@ -573,7 +573,7 @@ gtk_widget_class_init (GtkWidgetClass *klass)
                    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);
@@ -1797,7 +1797,8 @@ gtk_widget_queue_draw_area (GtkWidget *widget,
   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      
@@ -1806,7 +1807,8 @@ gtk_widget_queue_draw (GtkWidget *widget)
   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      
@@ -1821,6 +1823,9 @@ gtk_widget_queue_clear_area (GtkWidget *widget,
   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))
@@ -1966,18 +1971,18 @@ gtk_widget_clip_rect (GtkWidget *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)
@@ -2001,7 +2006,7 @@ gtk_widget_clip_rect (GtkWidget *widget,
 }
 
 static gint
-gtk_widget_idle_draw (gpointer data)
+gtk_widget_idle_draw (gpointer cb_data)
 {
   GSList *widget_list;
   GSList *old_queue;
@@ -2035,7 +2040,13 @@ gtk_widget_idle_draw (gpointer data)
       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)
@@ -2149,8 +2160,8 @@ gtk_widget_idle_draw (gpointer data)
 
              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
@@ -2191,7 +2202,8 @@ gtk_widget_idle_draw (gpointer data)
       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;
@@ -2379,8 +2391,8 @@ gtk_widget_size_allocate (GtkWidget       *widget,
          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;
     }
index 5d43b97b46df5a1ddea75121f09817dabc6a37e4..04f7e1f57dd36c194a6732e9a7bef73850cf8149 100644 (file)
@@ -26,7 +26,7 @@ class "GtkWidget" style "defaultfont"
 
 style "window"
 {
- # bg_pixmap[NORMAL] = "marble.xpm"
+# bg_pixmap[NORMAL] = "marble.xpm"
 }
 
 style "scale"
index 5d43b97b46df5a1ddea75121f09817dabc6a37e4..04f7e1f57dd36c194a6732e9a7bef73850cf8149 100644 (file)
@@ -26,7 +26,7 @@ class "GtkWidget" style "defaultfont"
 
 style "window"
 {
- # bg_pixmap[NORMAL] = "marble.xpm"
+# bg_pixmap[NORMAL] = "marble.xpm"
 }
 
 style "scale"