Commit Graph

127 Commits

Author SHA1 Message Date
rhlabs
c924b9be6f <raster@redhat.com>
<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.. :)
1998-05-01 23:18:21 +00:00
Owen Taylor
de210bbdec New function to reset the RC styles for a heirarchy
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.
1998-05-01 16:15:39 +00:00
Owen Taylor
005626bd4d Fix up getting colormap for FOREIGN windows to go along with Raster's fix
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.
1998-05-01 04:55:13 +00:00
Owen Taylor
05bc6a5b36 Merged changes from gtk-1-0. Check ChangeLog for details. 1998-05-01 04:23:59 +00:00
Miguel de Icaza
32e8dc45b0 Random debugging fixed this bug: There is no need to set the ExposureMask
1998-04-28  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* gdk/gdk.c (gdk_event_translate): Random debugging fixed this
	bug:  There is no need to set the ExposureMask in the XGrabPointer
	(this caused DnD programs to crash).
1998-04-29 00:51:55 +00:00
Elliot Lee
187dbc0ce7 Try adding "ExposureMask" to the event mask during a drag, so that things
Try adding "ExposureMask" to the event mask during a drag, so that things
get redrawn.
1998-04-28 23:21:36 +00:00
Miguel de Icaza
21bb83612d Fix the problem introduced by whoever thought that randomly changing ints
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.
1998-04-15 02:15:36 +00:00
Owen Taylor
385164d6f9 Don't read the character past the end of the text.
Mon Apr 13 21:40:14 1998  Owen Taylor  <owt1@cornell.edu>

	* gtk/gtktext.c (find_char_width): Don't read the
	character past the end of the text.

	* gtk/gtkrange.c (gtk_real_range_timer): If the mouse
	button has been released before the timer is activated,
	don't keep on scrolling.

	* gdk/gdk.c (gdk_event_translate): Filter subsequent configure
	events after we discard the first. Removed obsolete and
	sometimes very slow GdkOtherEvent. (Left in gdktypes.h
	with signal in GTK)
1998-04-14 01:39:40 +00:00
Federico Mena Quintero
af36f7765a New function; wrapper for XPolygonRegion().
1998-04-13  Federico Mena Quintero  <federico@nuclecu.unam.mx>

	* gdk/gdkregion.c (gdk_region_polygon): New function; wrapper for
	XPolygonRegion().

	* gdk/gdk.h: Added prototype for gdk_region_polygon().

	* gdk/gdktypes.h (GdkFillRule): New enum type of fill rule for polygons.
1998-04-14 00:49:06 +00:00
PDT 1998 Shawn T. Amundson
92006c8e78 Changed LGPL address for FSF in all .h and .c files
Sun Apr 12 18:54:29 PDT 1998 Shawn T. Amundson <amundson@gtk.org>

        * Changed LGPL address for FSF in all .h and .c files
1998-04-13 02:02:47 +00:00
Owen Taylor
3a02948170 Picky --enable-ansi cleanups.
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.
1998-04-10 00:44:35 +00:00
Owen Taylor
26df647a0f (Found by Mattias.Gronlund" <Mattias.Gronlund@sa.erisoft.se>)
Thu Apr  9 14:24:35 1998  Owen Taylor  <owt1@cornell.edu>

	(Found by Mattias.Gronlund" <Mattias.Gronlund@sa.erisoft.se>)

	* gtk/gtkcurve.c (gtk_curve_interpolate): Added a
	missing g_free.

	* gtk/gtkcurve.c (gtk_curve_graph_events): Limits
	were off by one, resulting in writing past array
	bounds. Removed some unused code.

	* gdk/gdk.c (gdk_dnd_drag_begin): The event structure
	used for gdk_event_put should be a GdkEvent, not a
	subtype, since it will all be copied.

	* gtk/gtkcolorsel.c: Added a unrealize handler that
	unref's the GC's that were created.

	* gtk/testgtk.c (clist_warning_test): ref and sink
	child because it may never be added to anything.
1998-04-09 19:12:12 +00:00
Elliot Lee
ad7dc0e87f When setting up the drag cursor as a shaped window, make sure to hide the previous drag shaped windows. 1998-04-09 03:33:24 +00:00
Miguel de Icaza
09d32399ab During drag and drop, set the event mask at ButtonPress time to include
1998-04-08  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* gdk/gdk.c (gdk_event_translate): During drag and drop, set the
	event mask at ButtonPress time to include ButtonPressMask and
	ButtonReleaseMask, otherwise, if the button is released, and we
	get a LeaveNotify event, it still thinks we are doing a drag.
1998-04-08 19:46:09 +00:00
Owen Taylor
1c77b5f926 Removed, because that's what a NULL comparison function means. And it
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.
1998-04-07 23:59:25 +00:00
Owen Taylor
e2ae4aec47 Make debug string parsine case-insensitive
Fri Apr  3 20:36:35 1998  Owen Taylor  <owt1@cornell.edu>

	* gutils.c (g_parse_debug_string): Make debug string
	parsine case-insensitive

Fri Apr  3 20:36:52 1998  Owen Taylor  <owt1@cornell.edu>

	* gdk/gdk.c gtk/gtkmain.c: Accept debug options
	in the form --g[td]k[-no]-debug=xxx as well
1998-04-04 01:56:54 +00:00
Owen Taylor
308adaa6db More extensive debugging output
Fri Apr  3 17:14:55 1998  Owen Taylor  <owt1@cornell.edu>

	* gdk/gdk.c: More extensive debugging output
1998-04-03 23:21:18 +00:00
Elliot Lee
acb95ed9da a little more debugging code. 1998-04-01 19:46:06 +00:00
Arturo Espinosa
4e01061296 Remove unused variable -mig 1998-03-31 03:16:34 +00:00
Miguel de Icaza
2be5abf4ed First fix: Move the window first, display it after (this removes one of
1998-03-30  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* gdk/gdkdnd.c (gdk_dnd_display_drag_cursor): First fix: Move the
	window first, display it after (this removes one of the annoying
	flashing effects).
1998-03-31 03:16:09 +00:00
Owen Taylor
93e1585614 Disconnect from combo->entry, not combo. (From: Daniel Skarda
Sat Mar 28 21:18:42 1998  Owen Taylor  <owt1@cornell.edu>

	* gtk/gtkcombo.c (gtk_combo_disable_activate):
	Disconnect from combo->entry, not combo.
	(From: Daniel Skarda <0rfelyus@atrey.karlin.mff.cuni.cz>)

	* gdk/gdkpixmap.c (gdk_pixmap_colormap_create_from_xpm): Deal
	better with xpm's with bad colors in them.

Plus, 3rd attempt to commit gtklabel changes
1998-03-29 02:44:43 +00:00
Owen Taylor
5b3cc69b43 Don't call XTranslateCoordinates on a destroyed window. (Why do we do
Fri Mar 27 21:01:17 1998  Owen Taylor  <owt1@cornell.edu>

	* gdk/gdk.c (gdk_event_translate): Don't call
	XTranslateCoordinates on a destroyed window. (Why do we
	do event processing at all on destroyed windows when we
	throw out the results?)

	* gtk/gtklabel.c: Clear the background when changing style/
	state.
1998-03-28 02:08:27 +00:00
Owen Taylor
b2c30ad95d Don't clear the window on an expose event. On draws, just clear the
Fri Mar 27 17:58:41 1998  Owen Taylor  <owt1@cornell.edu>

	* gtk/gtkhandlebox.c (gtk_handle_box_paint): Don't clear
	the window on an expose event. On draws, just clear the
	portion we are redrawing.

	* gdk/gdkfont.c (gdk_fontset_load): Corrected calculation
	of fontset ascent/descent.

	* gtk/gtkwidget.[ch]: Added new function to show a toplevel
	window and wait for it to be mapped, gtk_window_show_now ()
1998-03-28 00:10:49 +00:00
Owen Taylor
dac3ffed60 Fixes to allow GTK to work with colormaps that aren't 256 entries long.
Sun Mar 22 19:01:36 1998  Owen Taylor  <owt1@cornell.edu>

	* gdk/gdkcolor.c: Fixes to allow GTK to work with colormaps
	  that aren't 256 entries long. (colormap->colors is
	  now dynamically allocated)
1998-03-23 00:16:13 +00:00
Owen Taylor
16aa9c1964 fixes to locale checks
Sun Mar 22 16:25:46 1998  Owen Taylor  <owt1@cornell.edu>

	* gtk/gtkmain.c (gtk_init): fixes to locale checks

	* gtk/testgtk.c (create_dnd): Create the dnd icons separately
	  to avoid strange interactions with shapes demo.

	* gtk/gtkentry.[ch]:
	  - Limit the length of the text to 2048 to prevent long delays
	  - Fix problems with buffer overruns
	  - Draw only the onscreen portion of the text to prevent wrapping
	    of shorts in the X drawing code.
	  - Keep track of character positions and x-offsets to speed
	    up algorithms.
1998-03-22 21:31:10 +00:00
Owen Taylor
8cff9d3307 Don't respond to drops when grab is in effect. (workaround)
Sat Mar 21 19:07:01 1998  Owen Taylor  <owt1@cornell.edu>

	* gtk/testgtk.c (dnd_drop): Don't respond to drops when
	  grab is in effect. (workaround)

	* gdk/gdkfont.c (gdk_fontset_load): More details on
	  error messages.

	* gdk/gdk.c: Translate va_list to XVaNestedList instead
	  of just casting it.

	* gtk/gtkmain.c: Make temporary copy of string returned by
	  setlocale, since it may be changed by subsequent calls.
1998-03-22 00:07:53 +00:00
Owen Taylor
70b3b3e6e1 Try to guess if we can use the mb* functions safely. (For glibc, they do
Tue Mar 17 01:55:00 1998  Owen Taylor  <owt1@cornell.edu>

	* gtk/gtkmain.c gtk/gtkentry.c: Try to guess if we can
	  use the mb* functions safely. (For glibc, they do
	  UTF-8). Heuristic is (X_LOCALE && locale != C/POSIX)
	  || (mblen("\xc0", MB_CUR_MAX) == 1).

	(From: "Richard Lloyd" <rkl@csc.liv.ac.uk>)

	* gdk/gdk.c (gdk_ic_get_attr): Use an intermediate
	  variable to avoid taking the address of the result
	  of va_arg.

	* gtk/gtkentry.c gtk/gtkeditable.c gtkobject.c
	  gtk/testselection.c: signedness fixups

	* gtk/gtkcontainer.c: Fixed implicit cast between
	  gpointer and func pointer by changing.

	* gtk/gtkcombo.c, gtk/gtkentry.c, gtk/gtktext.c:
	  static void forward declaration vs. void actual fixed

	* gtk/testgtk.c: Limit total number of tree items to 10,000
1998-03-17 19:03:52 +00:00
Tim Janik
a783d668f1 changed some debugging messages to be prefixed by "Gdk:".
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.
1998-03-17 18:29:07 +00:00
Miguel de Icaza
8a0d67391c Use StructureNotifyMaskMask as the mask, as this enables an application
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.
1998-03-17 07:54:57 +00:00
Federico Mena
63955ec2e2 Use signed integers so that testing will not fail for windows that are
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.
1998-03-17 04:20:47 +00:00
Tim Janik
bc8e40387b fixed a bug with invoking the quit handlers that could cause them to be
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.
1998-03-14 23:47:48 +00:00
Owen Taylor
566a13a6c0 Makefile.am fixes minor fix to gdkwindow.c -owt
Makefile.am fixes
minor fix to gdkwindow.c
                                        -owt
1998-03-14 23:14:58 +00:00
Owen Taylor
b8e7ea1f11 Fixed misplaced 'else.' -owt 1998-03-14 07:29:32 +00:00
Owen Taylor
54a9eb416d Don't leave NULL's in argv.
Sat Mar 14 02:12:44 1998  Owen Taylor  <owt1@cornell.edu>

	* gtk/gtkmain.c gdk/gdk.c: Don't leave NULL's in argv.
1998-03-14 07:16:36 +00:00
Owen Taylor
bc98ea9ce1 Don't resize windows when request is rejected by WM. Only use the resize
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.
1998-03-14 05:15:16 +00:00
Tim Janik
a8afd462c0 applied gtk-shige-980311-0.patch.gz, which removes the erronerous
Thu Mar 12 07:43:33 1998  Tim Janik  <timj@gimp.org>

        * gdk/gdk.h:
        * gdk/gdkvisual.c: applied gtk-shige-980311-0.patch.gz, which removes
        the erronerous gdk_query_visuals() function in favour of
        gdk_list_visuals() which does a correct job.

        * gtk/gtkcontainer.h: applied gtk-draco-980311-0.patch.gz which fixes
        a class cast check.

        * gtk/gtkspinbutton.c: applied gtk-hamann_jeske-980312-0.patch.gz about
        '+' sign acceptance.

        * gtk/gtknotebook.c: applied gtk-hamann_jeske-980311-1.patch.gz which
        cares about delayed tab label creation.
1998-03-12 07:28:41 +00:00
Elliot Lee
093dfedf74 Bug fixes/improvements to the motion event eating for Dnd 1998-03-11 23:12:25 +00:00
Owen Taylor
48a15b7349 Various minor cleanups related to -W
Tue Mar 10 23:02:42 1998  Owen Taylor  <owt1@cornell.edu>

	* gdk/gdkdnd.c gtk/gtkclist.c gtk/gtksignal.c gtk/testgtk.c:
	  Various minor cleanups related to -W
1998-03-11 22:49:40 +00:00
rhlabs
59436967d5 <raster@redhat.com>
<raster@redhat.com>

fixed motiong drag to remove lag - ie no lagging of icons behind mouse when
doing DND. :)
1998-03-11 22:35:32 +00:00
rhlabs
c5327ecc31 <raster@redhat.com>
<raster@redhat.com>

added bolleean to gdk_window_xid_at_coords for excluding children fo
excluded windows
1998-03-11 22:24:54 +00:00
rhlabs
b7a6cd6750 <raster@redhat.com>
<raster@redhat.com>

final fixes to STUPId comparison of types of loop end - i missed the
unsigned bit! i will NEVEr use unsigned ints ever again!
1998-03-11 21:44:22 +00:00
Tim Janik
309d7377e7 applied gtk-bolliet-980310-0.patch.gz which adds more checks and
Wed Mar 11 04:35:06 1998  Tim Janik  <timj@gimp.org>

        * gtk/gtklist.c:
        * gtk/gtktree.h:
        * gtk/gtktree.c:
        * gtk/gtktreeitem.h:
        * gtk/gtktreeitem.c: applied gtk-bolliet-980310-0.patch.gz which adds
        more checks and implements gtk_tree_clear_items. made a bunch of style
        and indentation fixes.
1998-03-11 04:05:15 +00:00
Elliot Lee
120df3b8b7 DnD bugfixes (hopefully :). Rasters code is still buggy, methinks - try the dnd in testgtk 1998-03-10 21:57:05 +00:00
rhlabs
4db2561dd5 <raster@redhat.com>
<raster@redhat.com>

fixed minor buglets in window tree walker.
1998-03-10 06:14:59 +00:00
Tim Janik
8532799aaa changed gtk_range_trough_click() to take an additional jump_perc arg,
Tue Mar 10 05:30:05 1998  Tim Janik  <timj@gimp.org>

        * gtk/gtkrange.h:
                * gtk/gtkrange.c:
                        changed gtk_range_trough_click() to take an additional jump_perc arg,
                                class method and callers changed.

                                Tue Mar 10 05:25:10 1998  Tim Janik  <timj@gimp.org>

                                        * gdk/gdk.c (gdk_ic_destroy): applied gtk-gronlund-980309-1.patch.gz
                                                which fixes a memory leak.
1998-03-10 04:37:26 +00:00
Elliot Lee
990bddfe16 Miguel, try this - I think it should do what you need. Hurry hurry :) 1998-03-10 02:48:02 +00:00
Owen Taylor
ab30a02e5f - Show selection correctly when starting selection with arrows
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.
1998-03-08 21:47:14 +00:00
Tim Janik
5fa1bfcf45 applied a bunch of patches and removed all the printfs that
raster left over.
-timj
1998-03-08 03:32:05 +00:00
Tim Janik
76d01a826c define the version variables in config.h.
Sun Mar  8 03:00:17 1998  Tim Janik  <timj@gimp.org>

        * configure.in: define the version variables in config.h.

        * gtk/gtkmain.h:
        * gtk/gtkmain.c: added static version variables.

        * gdk/gdkpixmap.c: fixed memory leaks (gtk-gronlund-980307-1.patch.gz)
1998-03-08 02:04:26 +00:00
Tim Janik
124d1e5caa made the object/class cast checks much more descriptive, based on
Sat Mar  7 20:20:53 1998  Tim Janik  <timj@gimp.org>

        * gtk/gtkobject.c:
        (gtk_object_check_cast):
        (gtk_object_check_class_cast):
        made the object/class cast checks much more descriptive, based on
        gtk-draco-980305-2.patch.gz and gtk-draco-980306-1.patch.gz but
        optimized for common code path.

        * gtk/gtkpreview.c: added a few extra checks for the visual
        (gtk-draco-980305-0.patch.gz).

        * gdk/gdk.c (gdk_signal): abort() on a signal if G_ENABLE_DEBUG
          is defined, so we dump core (gtk-draco-980305-0.patch.gz).
1998-03-07 20:32:59 +00:00