Commit Graph

137 Commits

Author SHA1 Message Date
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
a74e338517 When gtk_widget_draw() is called on a REDRAW_PENDING widget, draw it and
Thu Mar 26 15:33:50 1998  Owen Taylor  <owt1@cornell.edu>

	* gtk/gtkwidget.c: When gtk_widget_draw() is called on a
	REDRAW_PENDING widget, draw it and remove it from the
	queue instead of doing nothing.

	* gtk/Makefile.am gdk/Makefile.am: Switch order of includes
	directories, to make doubly sure that wrong glibconfig.h
	isn't used. (See also glib/ChangeLog)

	* gtk/gtkentry.c (gtk_entry_draw_focus): Don't draw the
	cursor unless the entry is editable.

	(From: Stefan Jeske <jeske@braunschweig.netsurf.de>)
1998-03-26 20:57:29 +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
Federico Mena Quintero
fabfc17d93 Replace GXor by GXxor. Seems to have been a typo.
1998-03-10  Federico Mena Quintero  <federico@nuclecu.unam.mx>

	* gdk/gdkgc.c (gdk_gc_set_function): Replace GXor by GXxor.  Seems
	to have been a typo.
1998-03-10 19:13:50 +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
0db2549361 glib include -timj
glib include
-timj
1998-03-10 04:55:42 +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
rhlabs
640c75216d <raster@redhat.com>
<raster@redhat.com>

added:
Window
gdk_window_xid_at(Window base, gint bx, gint by, gint x, gint y)

for helpful DND support...
1998-03-07 18:38:18 +00:00
PST 1998 Shawn T. Amundson
16f8b9f627 return NULL if device is not ready gtk/gtkwindow.h: check for
Fri Mar  6 14:47:33 PST 1998 Shawn T. Amundson <amundson@gimp.org>

        * Applied gtk-matsu-980205-0 (oops, should be 980305)
          gdk/gdkinputcommon.h: return NULL if device is not ready
          gtk/gtkwindow.h: check for GDK_ISO_Left_Tab
1998-03-06 23:17:12 +00:00
Elliot Lee
3033d6b47a This commit moves dnd variables around a bit, and has a try at using hints for the shape dragging (this is for quartic) 1998-03-06 05:14:09 +00:00
Federico Mena Quintero
47f7073e28 [Ummm, maybe we should do the same change to the selection_owner variable?]
1998-03-05  Federico Mena Quintero  <federico@nuclecu.unam.mx>

	* gdk/gdkprivate.h: Changed the name of default_filters to
	gdk_default_filters to avoid namespace pollution.  Yes, it just
	happened to me.
	* gdk/gdk.c (gdk_event_translate):
	* gdk/gdkglobals.c:
	* gdk/gdkwindow.c (gdk_window_add_filter gdk_window_remove_filter): Likewise.
1998-03-06 00:39:11 +00:00
Owen Taylor
ba55b3f94b Unset allocation on unparent, to force reallocation if we get adding back
Thu Mar  5 01:22:06 1998  Owen Taylor  <owt1@cornell.edu>

	* gtk/gtkwidget.c (gtk_widget_unparent): Unset allocation
	  on unparent, to force reallocation if we get adding back
	  to a new parent which is already size-allocated.

	* gtk/gtktreeitem.c: Keep track of separate +/- pixmaps
	  for each colormap, removed the idle hack.

	* gdk/gdk.c: Don't warn when unable to open XIM method,
	  since X11R5 apparently has no default method.

	* gtk/gtkwidget.c (gtk_widget_set_style_internal): Don't
	  call size_request on initial emission - since the
	  widget size isn't set yet, it can't change.

	* gtk/Makefile.am: New rules 'test' and 'test-debug' to run
	  testgtk with the correct working directory.

	* gtk/gtkentry.c (gtk_move_forward_word):
	  Check for position at end of line.

	* gtk/gtkinputdialog.h (struct _GtkInputDialogClass):
	  removed 'gpointer data' arguments from default handler
	  structures.
1998-03-05 06:32:42 +00:00
Miguel de Icaza
793a130520 Drags can only be started with the left button.
Wed Mar  4 20:06:47 1998  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* gdk/gdk.c (gdk_event_translate): Drags can only be started with
	the left button.
1998-03-05 02:01:47 +00:00
Miguel de Icaza
c6a2248e98 Initialize gdk_error_code to zero before calling the X routine.
Mon Mar  2 19:57:27 1998  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* gdk/gdkproperty.c (gdk_atom_name): Initialize gdk_error_code to
	zero before calling the X routine.
1998-03-03 01:54:44 +00:00
Owen Taylor
395ccd366a Miscellaneous minor fixes to remove ANSI C incompatibilities
Mon Mar  2 17:48:38 1998  Owen Taylor  <owt1@cornell.edu>

	Miscellaneous minor fixes to remove ANSI C incompatibilities

	* gdk/gdkregion.c gtk/gtkclist.c: fix // comments

	* gdk/gdkdnd.c gdk/gdkinputcommon.h: change types of
	some arguments to ANSI functions

	* gtk/gtkcombo.c gtk/gtktree.c: fix casts of function pointers
	  to void *

	* gtk/gtkmain.c: An actual bug! (in deprecated gtk_input_add_interp)

	* gtk/gtknotebook.h: Bitfields must be gint or guint. (and should
	  be guint)

	* gtk/gtkstatusbar.c: trailing ';'

	* gtk/testgtk.c: GList where there should have been GSList

	* glib.h gutils.c : changed g_strcasecmp
	  to take gchar* not guchar*

	* testglib.c: Remove trailing ; after functions
1998-03-02 23:16:39 +00:00
PST 1998 Shawn T. Amundson
f6f1ce01c6 Required changes for version change to 0.99.4
Sun Mar  1 15:18:38 PST 1998 Shawn T. Amundson <amundson@gimp.org>

        * Required changes for version change to 0.99.4

        * gtk/gtktree.[ch]: patch from J. Bolliet to correct some bugs
        * gtk/testgtk.c: added test here from J. Bolliet, removed testtree

        * gtk/clist: gtk-abilleira-981602-0, allows gtk_clist_set_pixmap
          and gtk_clist_set_pixtext to not require a mask

        * gdk/gdkdraw.c,gdk.h: gtk-trow-980217-0
          adds gdk_draw_lines and fixes some things about
          gdk_draw_polygon
1998-03-02 00:32:52 +00:00
Tim Janik
172d6433a7 variable declaration have to have the same type as their
export counterparts. sopwith are you reading compiler warnings?
-timj
1998-03-01 23:51:59 +00:00
Owen Taylor
ade3020098 Make sure either the window or the depth is given when creating a pixmap.
Sun Mar  1 17:40:58 1998  Owen Taylor  <owt1@cornell.edu>

	* gdk/gdkpixmap.c: Make sure either the window or
	the depth is given when creating a pixmap.
1998-03-01 23:38:01 +00:00
Elliot Lee
3fb589b2ff Add drag_end_event for future expansion, plus allow passing in NULL to the gdk filter stuff to get events without a window in our app 1998-03-01 22:37:30 +00:00
Tim Janik
fa26673f49 oops, forgot that, be nice ;)
-timj
1998-02-28 17:12:41 +00:00