1. 25 Sep, 1998 1 commit
    • Tim Janik's avatar
      new function to get the *real* geometry position of a window, taken · c961dd18
      Tim Janik authored
      Sat Sep 25 23:33:55 1998  Tim Janik  <timj@gtk.org>
      
              * gdk/gdkwindow.c (gdk_window_get_root_origin): new function to get
              the *real* geometry position of a window, taken possible window
              manager offsets into account.
              this has been succesfully tested with fvwm, fvwm-2, bowman, olwm,
              olvwm, twm, ctwm, mlvwm, windowmaker and enlightenment.
              it does fail though for amiwm which adds windows to a pseudo root
              window, and for icewm by a small offset because it defines the
              geometry position whithin its border.
      
              * gtk/testgtk.c: added "saved position" test to figure how
              gdk_window_get_root_origin() interacts with window managers (repopup
              this window to figure ;).
      c961dd18
  2. 25 Aug, 1998 1 commit
    • Owen Taylor's avatar
      Reference count the fonts used in the text widget. · caf8ebc6
      Owen Taylor authored
      Mon Aug 24 18:37:15 1998  Owen Taylor  <otaylor@redhat.com>
      
      	* gtk/gtktext.c: Reference count the fonts used in
      	the text widget.
      
      	* gdk/gdk.h gdk/gdkcolor.c: Rename the color allocation
      	freeing functions to be more consistent, and more
      	convenient; leave the old names in for backwards compatibility.
      
      	* gdk/gdkcolor.c gdk/gdkprivate.h: Reference count the
      	allocations in pseudo-color colormaps to greatly reduce
      	calls to XAllocColor. Keep a per-colormap hashtable to
      	speed up finding if there is an already-allocated matching
      	color.
      
      	* gdk/gdkcolor.c: Don't just match read the system colormap
      	when the colormap is created, but synchronize our copy
      	with the system colormap periodically.
      
      	* gdk/gdk.c gdk/gdktypes.h gtk/gtkentry.c gtk/gtktext.c:
      	Change XIM constants names to match GDK conventions
      
      	* gtk/testinput.c: Allow the drawing area to get the focus.
      
      	* gtk/testgtk.c: Change around the Text test to demonstrates
      	multiple fonts, use more colors.
      
      	* gtk/gtkwidget.c: Improve gtk_widget_get_colormap()/visual()
      	so they work after a widget is unrealized.
      
      	* gtk/gtktext.[ch]: Remove the requirement that the text
      	widget be realized before adding text (!) Allocate colors
      	ourself, instead of requiring the caller allocate them.
      	Allow changing styles to work properly by keeping track
      	of the values for a certain property are default or
      	set explicitely.
      
      	* gtk/gtkmenu.h: Added some comments.
      
      	* gtk/gtkentry.c: Changes to match XIM constants.
      
      	* gtk/gdk.h gdk/gdkwindow.c: Add gdk_drawable_set_data(),
      	for adding keyed data to drawables. (Uses g_dataset
      	internally)
      
      	* gdk/gdkpixmap.c: Keep track of the colors we allocate,
      	when creating an XPM - store them as user data for the GdkPixmap,
      	so we don't leak colors when we create pixmaps from XPM's.
      
      	Allocate memory for color information in large blocks instead of
      	as many little pieces.
      caf8ebc6
  3. 18 Aug, 1998 2 commits
    • Tim Janik's avatar
      use g_get_current_dir() instead of getcwd(). · 49dfa78e
      Tim Janik authored
      Tue Aug 18 17:54:40 1998  Tim Janik  <timj@gtk.org>
      
              * gtk/gtkrc.c (gtk_rc_parse_file): use g_get_current_dir() instead of
              getcwd().
      
              * gdk/gdkprivate.h:
              * gdk/gdkglobals.c:
              * gdk/gdkwindow.c:
              * gdk/gdk.c:
              * gtk/gtkwindow.c:
              * gtk/gtkitemfactory.c:
              dropped gdk_progname, use g_get_prgname()/g_set_prgname() instead.
      
              * gtk/gtkselection.c:
              * gtk/gtkpreview.c:
              * gtk/gtkobject.c:
              * gtk/gtkmain.c:
              * gtk/gtktypeutils.c: indentation fixes due to g_message() use.
      
              * gdk/gdkrgb.c: exchanged occourances of g_print with g_message.
      49dfa78e
    • Tim Janik's avatar
      restricted the --g*fatal-* arguments to --g-fatal-warnings again. this · 7f2909bb
      Tim Janik authored
      Tue Aug 18 03:54:43 1998  Tim Janik  <timj@gtk.org>
      
              * gtk/gtkmain.c (gtk_init): restricted the --g*fatal-* arguments
              to --g-fatal-warnings again. this option now causes log levels of
              WARNING and CRITICAL to abort().
      
              * gdk/gdk.c:
              * gdk/gdkdnd.c:
              * gdk/gdkcc.c:
              * gdk/gdkfont.c:
              * gdk/gdkwindow.c:
              * gdk/gdkvisual.c:
              * gtk/gtkwidget.c:
              * gtk/gtktypeutils.c:
              * gtk/gtktree.c:
              * gtk/gtkfontsel.c:
              * gtk/gtkmain.c:
              * gtk/gtkobject.c:
              * gtk/gtkpreview.c:
              * gtk/gtkselection.c:
              * gtk/gtktext.c:
              * gtk/gtktree.c:
              * gtk/gtktreeitem.c:
              did a global search&replace to substitute g_print() calls with
              g_message(). libraries shouldn't use printf(), g_print() or
              g_printerr() at all.
              a bunch of the replacements should probably be wrapped into the
              G{D|T}K_NOTE() macros, so they are special cased for debugging
              purposes in a sane way, avoiding all the nasty #ifdef DEBUG_MY_TEDDY
              things.
      
              * gdk/gdkrgb.c: left this out currently.
      
              * gdk/gdkdnd.c: added copyright notice.
      7f2909bb
  4. 02 Aug, 1998 1 commit
  5. 16 Jul, 1998 1 commit
  6. 13 Jul, 1998 1 commit
  7. 04 Jul, 1998 1 commit
  8. 24 Jun, 1998 1 commit
    • Tim Janik's avatar
      do not avoid to queue for a resize if the container is not visible, we · faa14347
      Tim Janik authored
      Wed Jun 24 16:38:02 1998  Tim Janik  <timj@gtk.org>
      
              * gtk/gtkbin.c (gtk_bin_remove): do not avoid to queue for a resize
              if the container is not visible, we might be a toplevel! this holds
              for all other base container implementations as well, that are
              candidates to derive toplevels from. in general the resizing code will
              care about visibility itself.
              * gtk/gtkmenushell.c (gtk_menu_shell_remove): likewise.
              * gtk/gtkbox.c (gtk_box_remove): likewise.
      
              * gtk/gtkwindow.c (gtk_window_move_resize): save ->use_uposition around
              gtk_window_set_hints(), since we haven't calculated the new position
              yet.
      
              * gdk/gdkwindow.c (gdk_window_get_pointer): take care that *x, *y and
              *mask are alway initialized in a sane way, regardless of the return
              value.
      faa14347
  9. 17 Jun, 1998 1 commit
    • Tim Janik's avatar
      new function gdk_window_at_pointer() to retrive the current GdkWindow the · 7d0331a6
      Tim Janik authored
      Wed Jun 17 03:47:40 1998  Tim Janik  <timj@gtk.org>
      
              * gdk/gdk.h:
              * gdk/gdkwindow.c: new function gdk_window_at_pointer() to retrive
              the current GdkWindow the pointer is on if there is any.
      
              * gtk/gtktable.c (gtk_table_init): preallocate a table with one row
              and one column, so we don't construction logic at all. changed a few
              (x < y - 1) to (x + 1 < y), to avoid failing evaluations due to
              unsigned int wraps.
      
              * gtk/gtkwidget.c (gtk_widget_set_parent): removed left over code
              portion, added an additional check for parent != widget.
      
              * more GtkType and macro fixups.
      7d0331a6
  10. 13 Jun, 1998 1 commit
    • Owen Taylor's avatar
      Removed code for drawing the child in two places at once. Unfortunately, · 92270f86
      Owen Taylor authored
      Fri Jun 12 21:20:42 1998  Owen Taylor  <otaylor@gtk.org>
      
      	* gtk/gtkoptionmenu.c (gtk_option_menu_expose): Removed
      	code for drawing the child in two places at once. Unfortunately,
      	not only does it not work anymore (because reparenting has
      	been fixed), but it also triggers reparent/expose loops
      	in some cases.
      
      	* gtk/gtkoptionmenu.c (gtk_option_menu_remove_contents): Removed
      	an unecessary unrealize.
      92270f86
  11. 19 May, 1998 1 commit
  12. 04 May, 1998 1 commit
    • Owen Taylor's avatar
      Merges from the gtk-1-0 branch · d142827b
      Owen Taylor authored
      Sun May  3 14:55:34 1998  Owen Taylor  <otaylor@gtk.org>
      
      	* docs/gtkfaq.sgml (CPPFLAGS): Added a FAQ entry about
      	"glibconfig.h" and another about writing another IRC
      	client.
      
      Sat May  2 00:14:05 1998  Owen Taylor  <otaylor@gtk.org>
      
      	* gtk/gtkpreview.c (gtk_trim_cmap): Make sure the
      	parameters to log are doubles. Digital Unix apparently
      	is missing the argument in its prototype.
      
      Sun May  3 19:04:46 1998  Owen Taylor  <otaylor@gtk.org>
      
      	* gtk/gtklabel.c (gtk_label_state_changed): Don't
      	force a clear until the widget is actually on
      	screen.
      
      Hopefully nothing else though CVS think there are a whole
      bunch more changed files.
      d142827b
  13. 03 May, 1998 1 commit
    • Owen Taylor's avatar
      configure.in acheader.h gdk/gdkwindow.c Check for Shape extension both on · 4851efe2
      Owen Taylor authored
      Sun May  3 13:38:22 1998  Owen Taylor  <otaylor@gtk.org>
      
      	* configure.in acheader.h gdk/gdkwindow.c
      	Check for Shape extension both on the client and server
      	side. (And, more importantly, check for the shape extension
      	so we may include -lXext even when compiling with --disable-xshm)
      
      	Don't set override_redirect on all shaped windows. It isn't
      	necessary.
      
      	* gdk/gdkwindow.c: Set ->colormap to NULL for root
      	and foreign windows. Use this to check if we
      	need to get the colormap from X.
      
      Fri May  1 22:32:47 1998  Owen Taylor  <otaylor@gtk.org>
      
      	* gtk/gtkbutton.c (gtk_button_paint): Draw the areas
      	between the default and the button always in GTK_STATE_NORMAL.
      
      	* gtk/gtkrange.c (gtk_range_style_set): Added a style_set
      	callback.
      
      Fri May  1 16:40:57 1998  Owen Taylor  <otaylor@gtk.org>
      
      	* gdk/gdkpixmap.c (gdk_pixmap_colormap_create_from_xpmp[_d]):
      	  Fix a buffer overflow on pixmaps that claim to have
      	  more than 31 characters per pixel.
      
      	  (gdk_pixmap_read_string): Don't wrap around strings longer
       	  than half of address space ;-)
      
      	* gtk/gtk[vh]ruler.c gtk/gtkinputdialog.c: Expand some buffers
      	that were used for printing integers.
      
      	* */* (almost):
      
      	Style: All
      	  int foo () { ... }
      	changed to
      	  int foo (void) { ... }
      
      ^^^^^^^ This is why some many files changed
      
      	Even where there were proper prototypes elsewhere.
      
      	* gdk/gxid.c (handle_claim_device): Some extra checks.
      	It isn't safe against being fed bad X id's, but at
      	least it should be safe against deleting all your
      	files.
      4851efe2
  14. 01 May, 1998 4 commits
    • rhlabs's avatar
      <raster@redhat.com> · c924b9be
      rhlabs authored
      
      
      <raster@redhat.com>
      
      AHA! more bugs in the get_visual and get_colormap stuff.. guarateed to barf
      if the gdk window you are querying is gdk's own gdk_root_window :) Added
      checks to see if this window is infact the root window.... :)
      
      now ee doesnt barf if you set the image as the bg.. :)
      c924b9be
    • Owen Taylor's avatar
      New function to reset the RC styles for a heirarchy · de210bbd
      Owen Taylor authored
      Fri May  1 12:06:43 1998  Owen Taylor  <otaylor@gtk.org>
      
      	* gtk/gtkwindow.[ch] (gtk_widget_reset_rc_styles): New
      	function to reset the RC styles for a heirarchy
      
              Clear the window background if necessary in
      	gtk_window_style_set.
      
      	* gtk/gtkrc.[ch]: New function gtk_rc_reparse_all() which
      	rereads all previously read RC files.
      
      	* gdk/gdkwindow.c gdk/gdk.h: New function gdk_window_get_toplevels().
      	(Should it just be called gdk_get_toplevels?)
      
      	* gtk/testgtk.c: New test to reload RC files.
      de210bbd
    • Owen Taylor's avatar
      Fix up getting colormap for FOREIGN windows to go along with Raster's fix · 005626bd
      Owen Taylor authored
      Fri May  1 00:42:25 1998  Owen Taylor  <otaylor@gtk.org>
      
      	* gdk/gdkwindow.c (gdk_window_get_colormap): Fix up
      	getting colormap for FOREIGN windows to go along with
      	Raster's fix for visuals.
      005626bd
    • Owen Taylor's avatar
      05bc6a5b
  15. 15 Apr, 1998 1 commit
    • Miguel de Icaza's avatar
      Fix the problem introduced by whoever thought that randomly changing ints · 21bb8361
      Miguel de Icaza authored
      1998-04-14  Miguel de Icaza  <miguel@nuclecu.unam.mx>
      
      	* gdk/gdkwindow.c (gdk_window_xid_at): Fix the problem introduced
      	by whoever thought that randomly changing ints to unsigned int
      	without reviewing the code was a good idea.  It is, btw not
      	mentioned in the ChangeLog as usual, but I know it was not Elliot
      	the culprit this time.
      21bb8361
  16. 13 Apr, 1998 1 commit
  17. 10 Apr, 1998 1 commit
    • Owen Taylor's avatar
      Picky --enable-ansi cleanups. · 3a029481
      Owen Taylor authored
      Thu Apr  9 18:36:31 1998  Owen Taylor  <owt1@cornell.edu>
      
      	* gtk/gtkmisc.c gdk/gdkwindow gtk/gtkentry.c gtk/testgtk.c:
      	Picky --enable-ansi cleanups.
      
      	* gtk/gtkstatusbar.c (gtk_statusbar_pop): Pop top message
      	off _belonging_to_this_context_. (gtk-d4bjorn-980409-0)
      
      	From "Damon Chaplin" <DAChaplin@email.msn.com>
      
      	* gtk/gtktable.c (gtk_table_size_request_pass3): Small fix to size
      	requisition code.
      
      	* gtk/gtknotebook.c: Make sure not to do things to page->tab_label
      	if it doesn't exist.
      3a029481
  18. 07 Apr, 1998 1 commit
    • Owen Taylor's avatar
      Removed, because that's what a NULL comparison function means. And it · 1c77b5f9
      Owen Taylor authored
      Tue Apr  7 19:36:48 1998  Owen Taylor  <owt1@cornell.edu>
      
      	* gutils.c (g_direct_compare): Removed, because that's what
      	a NULL comparison function means. And it wasn't 64 bit safe.
      
      Tue Apr  7 19:14:03 1998  Owen Taylor  <owt1@cornell.edu>
      
      	* gdk/gdkpixmap.c: Added maximum field widths to prevent
      	possible '%s' scanf overflows. Replaced scanf("%c")
      	with getc(), Don't interpret /*/ as a full comment. Use
      	g_realloc/g_new.
      
      	* gtk/gtkwidget.h gtk/gtkprivate.h: Changed all flag
      	tests to check for ((GTK_WIDGET_FLAGS(widget) & FLAG) != 0)
      	instead of (GTK_WIDGET_FLAGS(widget) & FLAG)
      
      	* gtk/gtkfilesel.c: Use getwd() instead of getcwd() on
      	SunOS, because getcwd() hangs up in a wait4().
      	(Found by David Monniaux <monniaux@clipper.ens.fr>)
      
      	- Check device/inode/mtime not just inode/mtime, when
      	caching scanned directories.
      	(From: scottk@ig.utexas.edu (Scott Kempf))
      
      	* gdk/gdkpixmap.c: Check for 0 width/height when
      	creating pixmaps.
      
      	* gtk/*.c: Global substitution of recently introduced
      	"MAX (0," for allocations to "MAX (1,", since
      	creating a backing pixmap with a zero width or height
      	fails.
      
      	* gdk/gdkwindow.c (gdk_window_new): Don't set all the
      	WM properties for child windows. Don't set the base
      	size, since the value we set will be taken as a minimum
      	size.
      1c77b5f9
  19. 17 Mar, 1998 3 commits
    • Tim Janik's avatar
      changed some debugging messages to be prefixed by "Gdk:". · a783d668
      Tim Janik authored
      Tue Mar 17 16:19:47 1998  Tim Janik  <timj@gimp.org>
      
              * gdk/gdk.c:
                      * gdk/gdkvisual.c: changed some debugging messages to be prefixed
                              by "Gdk:".
      
                                      * gtk/gtkwidget.c (gtk_widget_real_draw): applied
                                              gtk-shige-980317-0.patch.gz to set all event fields, but modified
                                                      the event.send_event field to be set to TRUE, since the event is not
                                                              really comming from the server.
      
                                                                      * gtk/gtkwindow.c (gtk_window_init): applied gtk-ograf-980317-1.patch.gz
                                                                              which cares about an initial setting of program name and program class.
      
                                                                                      * gdk/gdk.c (gdk_init): applied gtk-ograf-980317-0.patch.gz, which
                                                                                              strips leading pathnames from gdk_progname.
      a783d668
    • Miguel de Icaza's avatar
      Use StructureNotifyMaskMask as the mask, as this enables an application · 8a0d6739
      Miguel de Icaza authored
      Tue Mar 17 02:02:02 1998  Miguel de Icaza  <miguel@nuclecu.unam.mx>
      
      	* gdk/gdk.c (gdk_dnd_drag_leave): Use StructureNotifyMaskMask as
      	the mask, as this enables an application listening to those events
      	to catch the root events.  Thanks to Maciej for pointing us in the
      	right direction.
      	(gdk_dnd_drag_enter): Likewise.
      	(gdk_dnd_drag_leave): Likewise.
      	* gdk/gdkwindow.c (gdk_window_dnd_data_set): Likewise.
      8a0d6739
    • Federico Mena's avatar
      Use signed integers so that testing will not fail for windows that are · 63955ec2
      Federico Mena authored
      Mon Mar 16 22:31:02 1998  Federico Mena  <federico@nuclecu.unam.mx>
      
      	* gdk/gdkwindow.c (gdk_window_xid_at): Use signed integers so that
      	testing will not fail for windows that are off-screen.
      
      	(gdk_window_xid_at_coords): Only considers visible windows.
      63955ec2
  20. 14 Mar, 1998 3 commits
    • Tim Janik's avatar
      fixed a bug with invoking the quit handlers that could cause them to be · bc8e4038
      Tim Janik authored
      Sat Mar 14 10:10:46 1998  Tim Janik  <timj@gimp.org>
      
              * gtk/gtkmain.c (gtk_main): fixed a bug with invoking the quit handlers
                      that could cause them to be removed wihout being invoked.
      bc8e4038
    • Owen Taylor's avatar
      Makefile.am fixes minor fix to gdkwindow.c -owt · 566a13a6
      Owen Taylor authored
      Makefile.am fixes
      minor fix to gdkwindow.c
                                              -owt
      566a13a6
    • Owen Taylor's avatar
      Don't resize windows when request is rejected by WM. Only use the resize · bc98ea9c
      Owen Taylor authored
      Sat Mar 14 00:03:34 1998  Owen Taylor  <owt1@cornell.edu>
      
      	* gtk/gtkwindow.c:
                Don't resize windows when request is rejected by WM.
      	  Only use the resize count to guess whether a Configure
      	  event was a rejection by the WM, or a move.
      
      	* gdk/gdk.c gdk/gdktypes.h:
      	  - Don't XDestroyWindow foreign windows (If they're a child of
      	  one of our windows, reparent them to root and send them a WM
      	  delete event, otherwise, just delete the GTK structure.)
      	  Handle notification of their deletion properly.
                (Made foreign windows a seperate window type to do this)
      
      	* gtk/gtkobject.c (gtk_object_set_data_full):
      	  Call the DestroyNotify when replacing the object data.
      bc98ea9c
  21. 11 Mar, 1998 3 commits
  22. 10 Mar, 1998 2 commits
  23. 08 Mar, 1998 2 commits
    • Owen Taylor's avatar
      - Show selection correctly when starting selection with arrows · ab30a02e
      Owen Taylor authored
      Sun Mar  8 15:53:33 1998  Owen Taylor  <owt1@cornell.edu>
      
      	* gtk/gtktext.c:
      
      	- Show selection correctly when starting selection with arrows
      
      	- Display pixmap background only when not editable
      
      	- Redraw focus area more carefully to prevent flashing (and
      	  make style of drawing consistent with Entry)
      
      	* gtk/gtktreeitem.c: ref colormaps for pixmap by colormap
      	  storage.
      
      	* gtk/gtkrc.c: Store a separate style for each RcStyle for
      	  each colormap, so we can handle background pixmaps
      	  correctly, which need to be per-colormap. (Leaks
      	  colormaps...)
      
      	  Parse text color style entries correctly.
      
      	* gtk/testgtk.c: insert text without fg color
      	  gtk/testgtkrc: move "*" after rest, so the other class styles
      	                 take effect
      
              * gdk/gdkwindow.c gdk/gdk.c gdk/gdkprivate.h: Send DND events
      	  safely, in case drop window disappears. (Performance hit
      	  because XSync()'s are necessary)
      
      	* gdk/gdk.h gdk/gdkpixmap.c: Added
      	  gdk_pixmap_colormap_create_from_xpm[_d] to allow creating
      	  pixmaps from xpm's before you have a GdkWindow.
      ab30a02e
    • Tim Janik's avatar
      applied a bunch of patches and removed all the printfs that · 5fa1bfcf
      Tim Janik authored
      raster left over.
      -timj
      5fa1bfcf
  24. 07 Mar, 1998 1 commit
    • rhlabs's avatar
      <raster@redhat.com> · 640c7521
      rhlabs authored
      
      
      <raster@redhat.com>
      
      added:
      Window
      gdk_window_xid_at(Window base, gint bx, gint by, gint x, gint y)
      
      for helpful DND support...
      640c7521
  25. 06 Mar, 1998 1 commit
  26. 01 Mar, 1998 1 commit
  27. 27 Feb, 1998 1 commit
    • Owen Taylor's avatar
      new functions for setting WM hints · 473c1d4d
      Owen Taylor authored
      Thu Feb 26 22:36:46 1998  Owen Taylor  <owt1@cornell.edu>
      
      	* gdk/gdkwindow.c gdktypes.c gdk.h:
      	new functions for setting WM hints
      
      	 gdk_window_set_icon()
      	 gdk_window_set_icon_name()
      	 gdk_window_set_group()
      	 gdk_window_set_decorations()
      	 gdk_window_set_functions()
      
      	* gdk/MwmUtil.h: new uninstalled header file from lesstif
      	distribution, used for setting MWM hints.
      
      	* gdk/gdkdnd.c Makefile.am: renamed from gdk/gdk_dnd.c
      473c1d4d
  28. 17 Feb, 1998 1 commit
    • Tim Janik's avatar
      applied patch to fix draw_indicator behaviour from Lars Hamann and Stefan · a3034938
      Tim Janik authored
      Tue Feb 17 05:41:31 1998  Tim Janik  <timj@gimp.org>
      
              * gtk/gtkcheckbutton.c:
              * gtk/gtkradiobutton.c:
              * gtk/gtktogglebutton.c:
                applied patch to fix draw_indicator behaviour from Lars Hamann
                and Stefan Jeske.
      
              * gtk/gtkmain.h:
              * gtk/gtkmain.c (gtk_grab_get_current): new function
                that returns the current grab widget or NULL.
      
              * gdk/gdkwindow.c (gdk_window_shape_combine_mask): remove
                shape mask if mask==NULL (provided by Stefan Wille).
      a3034938