[ Merges from gtk-1-2 ]

Wed Sep  8 07:13:29 1999  Tim Janik  <timj@gtk.org>

	* configure.in: fixed "GNU Make" check to pass with new make version
	3.77.95.

Fri Sep  3 16:04:41 1999  Tim Janik  <timj@gtk.org>

	* gtk-config.in (--version): don't echo @GTK_VERSION@, but
	@GTK_MAJOR_VERSION@.@GTK_MINOR_VERSION@.@GTK_MICRO_VERSION@, so the
	AM_PATH_GTK() macros don't get confused by the -pre1.

Thu Sep  2 19:02:37 1999  Owen Taylor  <otaylor@redhat.com>

	* configure.in (REBUILD): Change check for perl5
	  to check explicitely for v >= 5.002. (5.001
	  does not work with our scripts.)

Wed Aug 25 15:45:46 1999  Tim Janik  <timj@gtk.org>

	* configure.in: evaluate $PERL for the perl version check. added
	--disable-rebuilds to give the user an option to completely disable
	any source autogeneration rules.

Mon Aug 23 23:16:14 1999  Tim Janik  <timj@gtk.org>

	* configure.in: evaluate $ac_make when checking for GNU Make.

Mon Aug 23 19:11:17 1999  Tim Janik  <timj@gtk.org>

	* docs/Makefile.am: added generation.txt.

	* Makefile.am: require automake 1.4, build README from README.in and
	INSTALL from INSTALL.in in dist-hook.

	* README.in:
	* INSTALL.in: new files to autogenerate README and INSTALL from.

	* configure.in: figure whether we have GNU Make

	* docs/generation.txt: minor additions/corrections.

Wed Aug 11 13:38:26 BST 1999 Tony Gale  <gale@gtk.org>

	* docs/gtkfaq.sgml: FAQ Update

July 30, 1999 Elliot Lee <sopwith@redhat.com>

	* configure.in: Fix autoconf warnings about cross compilation by
	trying to provide sane defaults for AC_TRY_RUN.

Fri Jul 16 22:20:21 PDT 1999 Manish Singh <yosh@gimp.org>

	* ltconfig
	* ltmain.sh: upgrade to libtool 1.3.3

Thu Jul  8 11:30:18 1999  Owen Taylor  <otaylor@redhat.com>

	* INSTALL: Indicate that the --with-glib= configure
	time flag is unsupported.

Mon Jul  5 20:36:03 1999  Owen Taylor  <otaylor@redhat.com>

	* docs/generation.txt: Added a file that gives
	documenation about the autogeneration process for
	various autogenerated files.

Tue Jun 29 15:59:25 1999  Owen Taylor  <otaylor@redhat.com>

	* configure.in (LIBS): Look for libgmodule in the
	right location.

Thu Jun 17 13:57:31 1999  Owen Taylor  <otaylor@redhat.com>

	* docs/gtk_tut.sgml: Removed references to
	code examples in my directory on gtk.org as
	they should all be in the tutorial now.

	* docs/gtk_tut.sgml: Added sources for dial-test
	and scribble-xinput programs that were previously
	missing.

Fri Jun  4 00:08:59 1999  Owen Taylor  <otaylor@redhat.com>

	* TODO: Added entry about menu keyboard navigation, removed
	some finished items.

Mon May 31 00:11:24 1999  Owen Taylor  <otaylor@redhat.com>

	* acinclude.m4: Standardize on func_dgettext
	not func_gettext, so that the checks for dgettext
	actually are paid attention to.

Wed May  5 10:47:54 1999  Owen Taylor  <otaylor@redhat.com>

	* configure.in (LIBS): Add $INTLLIBS into $LIBS
	directly, rather than repeating the checks for
	gettext.

	* INSTALL: Added information about gettext and
	NLS support.

	* acinclude.m4 (LIBM): Check for dgettext, not
	just gettext. This should hopefully fix things wrt
	systems with old versions of GNU gettext installed.

Tue Jun 29 15:59:25 1999  Owen Taylor  <otaylor@redhat.com>

	* configure.in (LIBS): Look for libgmodule in the
	right location.

Thu Apr  1 16:58:10 PST 1999 Manish Singh <yosh@gimp.org>

	* autogen.sh: add --enable-maintainer-mode

	* configure.in: set ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"

Wed Mar 24 23:03:49 CST 1999 Shawn T. Amundson <amundson@gtk.org>

	* docs/gtk-config.1.in:
	  docs/Makefile.am:
	  configure.in: gtk-config is now generated.

	* docs/gtk-config.1: Removed, now generated.

Thu Sep 23 17:59:59 1999  Tim Janik  <timj@gtk.org>

        * gdk/gdkevents.c (gdk_event_translate): grr, even if Gdk doesn't
        handle CreateNotify itself, still put out a debuging message for
        --gdk-debug=events. made the ReparentNotify debugging message more
        verbose.
        wrap xcoords translation for ConfigureEvents into an error trap,
        a destroy event may already be pending, and in that case, the
        actuall coordinate values are not at all critical.

Sat Sep 18 22:24:15 1999  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkcc.c: Stop leaking the color_hash all over
	the place. Simplify and improve the logic.

Fri Sep 17 09:57:15 1999  Tim Janik  <timj@gtk.org>

	* gdk/gdk.h, gdk/gdkcolor.c: make return types (gint or gboolean)
	for prototypes and function implementations consistent (reported
	by Tomas Ogren).

Tue Sep 14 18:23:01 1999  Tim Janik  <timj@gtk.org>

	* gdk/gdkevents.c (gdk_event_translate): tell if expose events have
	send_event set in debugging output.
	(gdk_compress_exposures): default initialize the event so we don't
	operate on bogus values (namely send_event).

Thu Sep  2 16:33:59 1999  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkwindow.c: When we receive an unexpected
	destroy notify on one of our windows, don't just
	warn about it, also mark our windows as destroyed.

Sun Sep  5 08:10:53 1999  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkfont.c (gdk_font_hash_insert): Add
	  name => font and name => fontset hashes. The
	  name => fontset hash is a _big_ win since we
	  weren't previously caching fontsets at all and loading
	  fontsets is expensive. The name => font hash
	  is less of a win, but it does save us from doing
	  repeated XQueryFont calls on the same font.

	* gdk/gdkprivate.h (struct _GdkFontPrivate): Add a names
	  list so we can remove font/fontset from hash.

Thu Sep  2 19:02:37 1999  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkproperty.c (gdk_atom_intern): Remove useless
	  and slightly confusing test. [ XInternAtom (,,TRUE)
	  will never return None ].

Sat Sep  4 08:39:26 1999  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkwindow.c (gdk_window_set_geometry_hints)
	  gdk/gdkwindow.c (gdk_window_set_hints):

	Don't omit setting the properties if flags == 0 -
	there may be an existing set of properties there
	already. (Very old bug. Would it be better to
	delete the property instead?)

	* gdk/gdkselection.c (gdk_selection_property_get): Fix
	  spelling error in comment.

Wed Sep  1 14:05:30 1999  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkimage.c (gdk_image_new): Use gdk_error_trap_push()
	  to avoid stomping over gdk_error_warnings.

	* gdk/gdkimage.c (gdk_image_new): compute image->bpp
	  as (bits_per_pixel + 7) / 8. This gives the same
	  result as before for multiples of 8, but actually
	  a "reasonable" value for 1bit or 4bit displays.

Mon Aug 23 19:11:17 1999  Tim Janik  <timj@gtk.org>

	* gdk/Makefile.am: minor cleanups, strip spaces on build rules for
	GNU Make.

Tue Aug 17 07:43:04 1999  Tim Janik  <timj@gtk.org>

	* gdk/gdkevents.c (gdk_event_translate): give a debugging note when
	discarding configure events.

1999-08-18  Federico Mena Quintero  <federico@redhat.com>

	* gdk/gdkpixmap.c (gdk_pixmap_unref): g_return_if_fail() the
	refcount is greater than zero.

	* gdk/gdkwindow.c (gdk_window_unref): Likewise.

	* gdk/gdkfont.c (gdk_font_unref): Likewise.

	* gdk/gdkgc.c (gdk_gc_unref): Likewise.

	* gdk/gdkdnd.c (gdk_drag_context_unref): Likewise.

Wed Aug 11 01:04:57 1999  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkproperty.c (gdk_property_get): Fix assumption
	that format 32 => sizeof(item) == 4. It really is
	sizeof(long).

Tue Jun 29 23:02:42 1999  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdk.c (gdk_x_error / gdk_x_io_error): Don't
	core dump at all on X IO errors, only core dump
	if --enable-debug for X errors.

Thu Jun 24 17:06:23 1999  Tim Janik  <timj@gtk.org>

	* gdk/gdkevents.c (gdk_event_translate): removed old ""Got event for
	unknown window:" message. disabled ConfigureNotify discarding code,
	because it led to events being processed out of order.

Thu Jun 24 12:22:02 1999  Tim Janik  <timj@gtk.org>

	* gdk/gdkglobals.c: preinitialize gdk_error_code to 0.

	* gdk/gdkevents.c (gdk_event_send_client_message_to_all_recurse): since
	we export this function, supress error warnings and don't reset the
	error code in the first half of this function.

	* gdk/gdk.c (gdk_x_error): set gdk_error_code to the actuall X error
	code (instead of just -1) so gdk_error_trap_pop() reveals something
	actually informative about the error that happened.

	* gdk/*.c:
	don't rely on gdk_error_code being -1 if an error occoured, but just
	gdk_error_code != 0.

Thu Jun 24 11:50:07 1999  Tim Janik  <timj@gtk.org>

	* gdk/gdkevents.c (gdk_event_apply_filters): advance the filter list
	pointer *before* invoking the filter function, so we at least don't
	crash if a filter is removed that is currently executed. window filters
	*really* need to be made truely reentrant at some point.

Mon Jun 14 11:10:15 1999  Tim Janik  <timj@gtk.org>

	* gdk/gdkevents.c (gdk_event_translate): print the atom name in the
	PropertyNotify debug messages.

Wed May  5 22:51:06 1999  Owen Taylor  <otaylor@redhat.com>

        Patch from Sung-Hyun Nam <namsh@lgic.co.kr>

	* gdk/gdkim.c: Fix cut-and-paste errors for
	x/y and PreeditAttributes/StatusAttributes.

Wed May  5 22:24:21 1999  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkwindow.c (gdk_window_set_geometry_hints): Change
	G_MAXINT to 2^16 to alleviate overflow problems in
	various window managers.

Wed Apr 21 00:42:08 1999  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkfont.c (gdk_text_measure): Fix the return value
        for fontsets.

Wed May  5 12:42:01 1999  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkwindow.c (gdk_window_set_geometry_hints):
	Initialize size_hints.x and size_hints.y because kwm
	brokenly pays attention to them.
	(Bug #1181 -  Lars Heete <hel@admin.de>)

Wed May  5 11:38:56 1999  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkrgb.c (gdk_rgb_choose_visual): Free the
	return value of gdk_list_visuals().
	(Bug #1193 - Morten Welinder <terra@diku.dk>)

Tue May  4 11:12:56 PDT 1999 Manish Singh <yosh@gimp.org>

	* gdk/gdkim.c (gdk_im_real_open): cast the return value of
	XSetIMValues to (void *) when comparing to NULL, to workaround
	the problem of some compilers barfing since older X headers don't
	have the prototype for it.

Mon Apr 19 10:11:12 1999  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkcolor.c (gdk_colormap_new): Fix memory leak
	for pseudocolor where colormap->colors was double
	allocated.

	* gdk/gdkcolor.c (gdk_colormap_alloc1): Store the
	color value in the hash table with the pixel filled
	in so when we do later hash table lookups, the color
	value is correct.

Sun May  2 15:29:45 PDT 1999 Manish Singh <yosh@gimp.org>

	* gdk/gdkdraw.c (gdk_draw_lines): check private->destroyed before
	making the call

Tue Apr 27 11:17:35 1999  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkdnd.c (xdnd_set_{targets,actions}): Fix leak
	pointed out by Morten Welinder <terra@diku.dk>.

Wed Apr 21 14:20:22 1999  George Lebl  <jirka@5z.com>

	* gdk/gdkwindow.c: (gdk_window_remove_filter) correctly remove the
	  default filter from the list

Wed Apr 21 14:20:22 1999  George Lebl  <jirka@5z.com>

	* gdk/gdkwindow.c: (gdk_window_remove_filter) correctly remove the
	  default filter from the list

Fri Apr 16 20:41:43 PDT 1999 Manish Singh <yosh@gimp.org>

	* gdk/gdk.c: #include "gdkkeysyms.h" for gdk_XConvertCase #defines

	* gtk/gtkfontsel.c (gtk_font_selection_create_xlfd): use
	g_strdup_printf instead of calcing the length separately

Tue Apr 13 02:49:33 1999  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkwindow.c: removed some silly #ifdef HAVE_CONFIG
	that we don't do in many other places. (Fixing duplicate
	#include of config.h)

	* gdk/gdkevents.c: include gdkinput.h _after_ config.h.
	Otherwise, #ifndef XINPUT_NONE check in the latter
	doesn't work. (Bug #546)

Sun Apr 11 14:38:03 1999  Tim Janik  <timj@gtk.org>

	* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): check for color
	"None" case insensitive.

Tue Apr  6 16:38:51 1999  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkselection.c:
	Add error traps so if the other end of the connection
	dies, we survive.

Tue Apr  6 12:24:21 1999  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkdnd.c (gdk_drag_motion): Separate out the
	dest_xid field into two fields - one for the window
	to send in messages, one to indicate the last looked
	up window for caching purposes. This is needed, so
	that Leave messages get the correct window.

Mon Apr  5 13:21:30 1999  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkevents.c (gdk_event_check, gdk_event_prepare):
	Fix warning created by people mucking around
	with the gsource API.

	* gdk/gdkevents.c (gdk_io_invoke, gdk_input_add_full):
	Change mapping between GIOCondition and GdkInputCondition
	to match the way the Linux kernel does it. This should
	fix problems where closed pipes were no longer signalling
	GDK_INPUT_READ on systems with a native poll().

Mon Apr  5 17:11:57 1999  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): Check
	explicitly for the string "None" - it is in the XPM
	spec and some servers treat unknown colors in odd ways
	(like asking the user!)

Thu Apr  1 16:58:10 PST 1999 Manish Singh <yosh@gimp.org>

	* gdk/gdkevents.c: made "->" into a "." of previous change so
	it compiles

Thu Apr  1 18:41:25 1999  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkevents.c (gdk_compress_exposures): Set the
	window field of the event structure before calling
	user filters.

1999-03-31  Federico Mena Quintero  <federico@nuclecu.unam.mx>

	* gdk/gdk.c (gdk_init_check): Use False as the last argument to
	XInternAtom() here.  This is a particularly Old And Nasty(tm) bug.

Mon Mar 29 17:31:52 1999  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkim.c (gdk_mbstowcs): Free the value of the
	intermediate text property - prevents major memory
        leak when gdk_use_mb.
	gtk-d3august-990311-0: Bj|rn Augustsson <d3august@dtek.chalmers.se>

Mon Mar 29 17:02:58 1999  Owen Taylor  <otaylor@redhat.com>

        Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
	gtk-a-higuti-990322-[0-3]

	* gdk/gdkfont.c (gdk_text_extents_wc): Make  work when
	sizeof(wchar_t) != sizeof (GdkWChar)

	* configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS
	that was causing -DX_LOCALE not	to work.

	* gtk/gtkrc.c (gtk_rc_init):
	X_LOCALE will never have LC_MESSAGES defined

	* gdk/gdk.c (gdk_init_check):
	Remove --xim-preedit and --xim-status from argv properly.

	* gdk/gdkim.c (gdk_ic_real_new): Add a gdk_flush() so
	that the client window is present on the X server
	before we pass it to the input method.

Tue Mar  9 10:46:49 1999  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkdnd.c (motif_find_drag_window): Fix bug where
	if --display is specified on the command line, than
	the drag window will not be created on that display.

Tue Mar  9 10:38:24 1999  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkproperty.c (gdk_atom_intern): Fixed bug where
	lookups with only_if_exists == TRUE were inserting
	bogus values into the atom cache.

Wed Mar 17 09:00:00 1999  Tim Janik  <timj@gtk.org>

	* gdk/gdkselection.c (gdk_selection_property_get): first XFree(t),
	then reset it to NULL.

	* gdk/gdkcolor.c:
	(gdk_colors_free):
	(gdk_colormap_free_colors): use colormap->colors[in_pixels[i]] as the
	key for g_hash_table_remove() in both functions, this prevents us
	from accessing possibly uninitialized portions of a GdkColor structure
	where we are only interested in its pixel value.

Tue Mar  9 01:01:28 1999  Tim Janik  <timj@gtk.org>

	* gdk/gdkfont.c (gdk_font_load): first lookup the xfont ID in our
	font hash table, if we have a GdkFontPrivate entry for this font
	already, simply increment its reference count, provided by Olaf Dietsche
	<olaf.dietsche+list.gtk@netcologne.de>.

1999-09-21  Tor Lillqvist  <tml@iki.fi>
This commit is contained in:
Federico Mena Quintero 1999-09-28 20:19:13 +00:00 • committed by Owen Taylor
commit 95b3f3e460
54 changed files with 5501 additions and 1064 deletions

470
ChangeLog
View file

@ -1,3 +1,473 @@
[ Merges from gtk-1-2 ]
Wed Sep 8 07:13:29 1999 Tim Janik <timj@gtk.org>
* configure.in: fixed "GNU Make" check to pass with new make version
3.77.95.
Fri Sep 3 16:04:41 1999 Tim Janik <timj@gtk.org>
* gtk-config.in (--version): don't echo @GTK_VERSION@, but
@GTK_MAJOR_VERSION@.@GTK_MINOR_VERSION@.@GTK_MICRO_VERSION@, so the
AM_PATH_GTK() macros don't get confused by the -pre1.
Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (REBUILD): Change check for perl5
to check explicitely for v >= 5.002. (5.001
does not work with our scripts.)
Wed Aug 25 15:45:46 1999 Tim Janik <timj@gtk.org>
* configure.in: evaluate $PERL for the perl version check. added
--disable-rebuilds to give the user an option to completely disable
any source autogeneration rules.
Mon Aug 23 23:16:14 1999 Tim Janik <timj@gtk.org>
* configure.in: evaluate $ac_make when checking for GNU Make.
Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
* docs/Makefile.am: added generation.txt.
* Makefile.am: require automake 1.4, build README from README.in and
INSTALL from INSTALL.in in dist-hook.
* README.in:
* INSTALL.in: new files to autogenerate README and INSTALL from.
* configure.in: figure whether we have GNU Make
* docs/generation.txt: minor additions/corrections.
Wed Aug 11 13:38:26 BST 1999 Tony Gale <gale@gtk.org>
* docs/gtkfaq.sgml: FAQ Update
July 30, 1999 Elliot Lee <sopwith@redhat.com>
* configure.in: Fix autoconf warnings about cross compilation by
trying to provide sane defaults for AC_TRY_RUN.
Fri Jul 16 22:20:21 PDT 1999 Manish Singh <yosh@gimp.org>
* ltconfig
* ltmain.sh: upgrade to libtool 1.3.3
Thu Jul 8 11:30:18 1999 Owen Taylor <otaylor@redhat.com>
* INSTALL: Indicate that the --with-glib= configure
time flag is unsupported.
Mon Jul 5 20:36:03 1999 Owen Taylor <otaylor@redhat.com>
* docs/generation.txt: Added a file that gives
documenation about the autogeneration process for
various autogenerated files.
Tue Jun 29 15:59:25 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (LIBS): Look for libgmodule in the
right location.
Thu Jun 17 13:57:31 1999 Owen Taylor <otaylor@redhat.com>
* docs/gtk_tut.sgml: Removed references to
code examples in my directory on gtk.org as
they should all be in the tutorial now.
* docs/gtk_tut.sgml: Added sources for dial-test
and scribble-xinput programs that were previously
missing.
Fri Jun 4 00:08:59 1999 Owen Taylor <otaylor@redhat.com>
* TODO: Added entry about menu keyboard navigation, removed
some finished items.
Mon May 31 00:11:24 1999 Owen Taylor <otaylor@redhat.com>
* acinclude.m4: Standardize on func_dgettext
not func_gettext, so that the checks for dgettext
actually are paid attention to.
Wed May 5 10:47:54 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (LIBS): Add $INTLLIBS into $LIBS
directly, rather than repeating the checks for
gettext.
* INSTALL: Added information about gettext and
NLS support.
* acinclude.m4 (LIBM): Check for dgettext, not
just gettext. This should hopefully fix things wrt
systems with old versions of GNU gettext installed.
Tue Jun 29 15:59:25 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (LIBS): Look for libgmodule in the
right location.
Thu Apr 1 16:58:10 PST 1999 Manish Singh <yosh@gimp.org>
* autogen.sh: add --enable-maintainer-mode
* configure.in: set ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
Wed Mar 24 23:03:49 CST 1999 Shawn T. Amundson <amundson@gtk.org>
* docs/gtk-config.1.in:
docs/Makefile.am:
configure.in: gtk-config is now generated.
* docs/gtk-config.1: Removed, now generated.
Thu Sep 23 17:59:59 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): grr, even if Gdk doesn't
handle CreateNotify itself, still put out a debuging message for
--gdk-debug=events. made the ReparentNotify debugging message more
verbose.
wrap xcoords translation for ConfigureEvents into an error trap,
a destroy event may already be pending, and in that case, the
actuall coordinate values are not at all critical.
Sat Sep 18 22:24:15 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkcc.c: Stop leaking the color_hash all over
the place. Simplify and improve the logic.
Fri Sep 17 09:57:15 1999 Tim Janik <timj@gtk.org>
* gdk/gdk.h, gdk/gdkcolor.c: make return types (gint or gboolean)
for prototypes and function implementations consistent (reported
by Tomas Ogren).
Tue Sep 14 18:23:01 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): tell if expose events have
send_event set in debugging output.
(gdk_compress_exposures): default initialize the event so we don't
operate on bogus values (namely send_event).
Thu Sep 2 16:33:59 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c: When we receive an unexpected
destroy notify on one of our windows, don't just
warn about it, also mark our windows as destroyed.
Sun Sep 5 08:10:53 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkfont.c (gdk_font_hash_insert): Add
name => font and name => fontset hashes. The
name => fontset hash is a _big_ win since we
weren't previously caching fontsets at all and loading
fontsets is expensive. The name => font hash
is less of a win, but it does save us from doing
repeated XQueryFont calls on the same font.
* gdk/gdkprivate.h (struct _GdkFontPrivate): Add a names
list so we can remove font/fontset from hash.
Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_atom_intern): Remove useless
and slightly confusing test. [ XInternAtom (,,TRUE)
will never return None ].
Sat Sep 4 08:39:26 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_set_geometry_hints)
gdk/gdkwindow.c (gdk_window_set_hints):
Don't omit setting the properties if flags == 0 -
there may be an existing set of properties there
already. (Very old bug. Would it be better to
delete the property instead?)
* gdk/gdkselection.c (gdk_selection_property_get): Fix
spelling error in comment.
Wed Sep 1 14:05:30 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkimage.c (gdk_image_new): Use gdk_error_trap_push()
to avoid stomping over gdk_error_warnings.
* gdk/gdkimage.c (gdk_image_new): compute image->bpp
as (bits_per_pixel + 7) / 8. This gives the same
result as before for multiples of 8, but actually
a "reasonable" value for 1bit or 4bit displays.
Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
* gdk/Makefile.am: minor cleanups, strip spaces on build rules for
GNU Make.
Tue Aug 17 07:43:04 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): give a debugging note when
discarding configure events.
1999-08-18 Federico Mena Quintero <federico@redhat.com>
* gdk/gdkpixmap.c (gdk_pixmap_unref): g_return_if_fail() the
refcount is greater than zero.
* gdk/gdkwindow.c (gdk_window_unref): Likewise.
* gdk/gdkfont.c (gdk_font_unref): Likewise.
* gdk/gdkgc.c (gdk_gc_unref): Likewise.
* gdk/gdkdnd.c (gdk_drag_context_unref): Likewise.
Wed Aug 11 01:04:57 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_property_get): Fix assumption
that format 32 => sizeof(item) == 4. It really is
sizeof(long).
Tue Jun 29 23:02:42 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c (gdk_x_error / gdk_x_io_error): Don't
core dump at all on X IO errors, only core dump
if --enable-debug for X errors.
Thu Jun 24 17:06:23 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): removed old ""Got event for
unknown window:" message. disabled ConfigureNotify discarding code,
because it led to events being processed out of order.
Thu Jun 24 12:22:02 1999 Tim Janik <timj@gtk.org>
* gdk/gdkglobals.c: preinitialize gdk_error_code to 0.
* gdk/gdkevents.c (gdk_event_send_client_message_to_all_recurse): since
we export this function, supress error warnings and don't reset the
error code in the first half of this function.
* gdk/gdk.c (gdk_x_error): set gdk_error_code to the actuall X error
code (instead of just -1) so gdk_error_trap_pop() reveals something
actually informative about the error that happened.
* gdk/*.c:
don't rely on gdk_error_code being -1 if an error occoured, but just
gdk_error_code != 0.
Thu Jun 24 11:50:07 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_apply_filters): advance the filter list
pointer *before* invoking the filter function, so we at least don't
crash if a filter is removed that is currently executed. window filters
*really* need to be made truely reentrant at some point.
Mon Jun 14 11:10:15 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): print the atom name in the
PropertyNotify debug messages.
Wed May 5 22:51:06 1999 Owen Taylor <otaylor@redhat.com>
Patch from Sung-Hyun Nam <namsh@lgic.co.kr>
* gdk/gdkim.c: Fix cut-and-paste errors for
x/y and PreeditAttributes/StatusAttributes.
Wed May 5 22:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_set_geometry_hints): Change
G_MAXINT to 2^16 to alleviate overflow problems in
various window managers.
Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkfont.c (gdk_text_measure): Fix the return value
for fontsets.
Wed May 5 12:42:01 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_set_geometry_hints):
Initialize size_hints.x and size_hints.y because kwm
brokenly pays attention to them.
(Bug #1181 - Lars Heete <hel@admin.de>)
Wed May 5 11:38:56 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkrgb.c (gdk_rgb_choose_visual): Free the
return value of gdk_list_visuals().
(Bug #1193 - Morten Welinder <terra@diku.dk>)
Tue May 4 11:12:56 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkim.c (gdk_im_real_open): cast the return value of
XSetIMValues to (void *) when comparing to NULL, to workaround
the problem of some compilers barfing since older X headers don't
have the prototype for it.
Mon Apr 19 10:11:12 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkcolor.c (gdk_colormap_new): Fix memory leak
for pseudocolor where colormap->colors was double
allocated.
* gdk/gdkcolor.c (gdk_colormap_alloc1): Store the
color value in the hash table with the pixel filled
in so when we do later hash table lookups, the color
value is correct.
Sun May 2 15:29:45 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkdraw.c (gdk_draw_lines): check private->destroyed before
making the call
Tue Apr 27 11:17:35 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.c (xdnd_set_{targets,actions}): Fix leak
pointed out by Morten Welinder <terra@diku.dk>.
Wed Apr 21 14:20:22 1999 George Lebl <jirka@5z.com>
* gdk/gdkwindow.c: (gdk_window_remove_filter) correctly remove the
default filter from the list
Wed Apr 21 14:20:22 1999 George Lebl <jirka@5z.com>
* gdk/gdkwindow.c: (gdk_window_remove_filter) correctly remove the
default filter from the list
Fri Apr 16 20:41:43 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdk.c: #include "gdkkeysyms.h" for gdk_XConvertCase #defines
* gtk/gtkfontsel.c (gtk_font_selection_create_xlfd): use
g_strdup_printf instead of calcing the length separately
Tue Apr 13 02:49:33 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c: removed some silly #ifdef HAVE_CONFIG
that we don't do in many other places. (Fixing duplicate
#include of config.h)
* gdk/gdkevents.c: include gdkinput.h _after_ config.h.
Otherwise, #ifndef XINPUT_NONE check in the latter
doesn't work. (Bug #546)
Sun Apr 11 14:38:03 1999 Tim Janik <timj@gtk.org>
* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): check for color
"None" case insensitive.
Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkselection.c:
Add error traps so if the other end of the connection
dies, we survive.
Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.c (gdk_drag_motion): Separate out the
dest_xid field into two fields - one for the window
to send in messages, one to indicate the last looked
up window for caching purposes. This is needed, so
that Leave messages get the correct window.
Mon Apr 5 13:21:30 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkevents.c (gdk_event_check, gdk_event_prepare):
Fix warning created by people mucking around
with the gsource API.
* gdk/gdkevents.c (gdk_io_invoke, gdk_input_add_full):
Change mapping between GIOCondition and GdkInputCondition
to match the way the Linux kernel does it. This should
fix problems where closed pipes were no longer signalling
GDK_INPUT_READ on systems with a native poll().
Mon Apr 5 17:11:57 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): Check
explicitly for the string "None" - it is in the XPM
spec and some servers treat unknown colors in odd ways
(like asking the user!)
Thu Apr 1 16:58:10 PST 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkevents.c: made "->" into a "." of previous change so
it compiles
Thu Apr 1 18:41:25 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkevents.c (gdk_compress_exposures): Set the
window field of the event structure before calling
user filters.
1999-03-31 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gdk/gdk.c (gdk_init_check): Use False as the last argument to
XInternAtom() here. This is a particularly Old And Nasty(tm) bug.
Mon Mar 29 17:31:52 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkim.c (gdk_mbstowcs): Free the value of the
intermediate text property - prevents major memory
leak when gdk_use_mb.
gtk-d3august-990311-0: Bj|rn Augustsson <d3august@dtek.chalmers.se>
Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com>
Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
gtk-a-higuti-990322-[0-3]
* gdk/gdkfont.c (gdk_text_extents_wc): Make work when
sizeof(wchar_t) != sizeof (GdkWChar)
* configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS
that was causing -DX_LOCALE not to work.
* gtk/gtkrc.c (gtk_rc_init):
X_LOCALE will never have LC_MESSAGES defined
* gdk/gdk.c (gdk_init_check):
Remove --xim-preedit and --xim-status from argv properly.
* gdk/gdkim.c (gdk_ic_real_new): Add a gdk_flush() so
that the client window is present on the X server
before we pass it to the input method.
Tue Mar 9 10:46:49 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.c (motif_find_drag_window): Fix bug where
if --display is specified on the command line, than
the drag window will not be created on that display.
Tue Mar 9 10:38:24 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_atom_intern): Fixed bug where
lookups with only_if_exists == TRUE were inserting
bogus values into the atom cache.
Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org>
* gdk/gdkselection.c (gdk_selection_property_get): first XFree(t),
then reset it to NULL.
* gdk/gdkcolor.c:
(gdk_colors_free):
(gdk_colormap_free_colors): use colormap->colors[in_pixels[i]] as the
key for g_hash_table_remove() in both functions, this prevents us
from accessing possibly uninitialized portions of a GdkColor structure
where we are only interested in its pixel value.
Tue Mar 9 01:01:28 1999 Tim Janik <timj@gtk.org>
* gdk/gdkfont.c (gdk_font_load): first lookup the xfont ID in our
font hash table, if we have a GdkFontPrivate entry for this font
already, simply increment its reference count, provided by Olaf Dietsche
<olaf.dietsche+list.gtk@netcologne.de>.
1999-09-21 Tor Lillqvist <tml@iki.fi> 1999-09-21 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdk.c (gdk_exit_func): Delete the gdk_DC when exiting, * gdk/win32/gdk.c (gdk_exit_func): Delete the gdk_DC when exiting,

View file

@ -1,3 +1,473 @@
[ Merges from gtk-1-2 ]
Wed Sep 8 07:13:29 1999 Tim Janik <timj@gtk.org>
* configure.in: fixed "GNU Make" check to pass with new make version
3.77.95.
Fri Sep 3 16:04:41 1999 Tim Janik <timj@gtk.org>
* gtk-config.in (--version): don't echo @GTK_VERSION@, but
@GTK_MAJOR_VERSION@.@GTK_MINOR_VERSION@.@GTK_MICRO_VERSION@, so the
AM_PATH_GTK() macros don't get confused by the -pre1.
Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (REBUILD): Change check for perl5
to check explicitely for v >= 5.002. (5.001
does not work with our scripts.)
Wed Aug 25 15:45:46 1999 Tim Janik <timj@gtk.org>
* configure.in: evaluate $PERL for the perl version check. added
--disable-rebuilds to give the user an option to completely disable
any source autogeneration rules.
Mon Aug 23 23:16:14 1999 Tim Janik <timj@gtk.org>
* configure.in: evaluate $ac_make when checking for GNU Make.
Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
* docs/Makefile.am: added generation.txt.
* Makefile.am: require automake 1.4, build README from README.in and
INSTALL from INSTALL.in in dist-hook.
* README.in:
* INSTALL.in: new files to autogenerate README and INSTALL from.
* configure.in: figure whether we have GNU Make
* docs/generation.txt: minor additions/corrections.
Wed Aug 11 13:38:26 BST 1999 Tony Gale <gale@gtk.org>
* docs/gtkfaq.sgml: FAQ Update
July 30, 1999 Elliot Lee <sopwith@redhat.com>
* configure.in: Fix autoconf warnings about cross compilation by
trying to provide sane defaults for AC_TRY_RUN.
Fri Jul 16 22:20:21 PDT 1999 Manish Singh <yosh@gimp.org>
* ltconfig
* ltmain.sh: upgrade to libtool 1.3.3
Thu Jul 8 11:30:18 1999 Owen Taylor <otaylor@redhat.com>
* INSTALL: Indicate that the --with-glib= configure
time flag is unsupported.
Mon Jul 5 20:36:03 1999 Owen Taylor <otaylor@redhat.com>
* docs/generation.txt: Added a file that gives
documenation about the autogeneration process for
various autogenerated files.
Tue Jun 29 15:59:25 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (LIBS): Look for libgmodule in the
right location.
Thu Jun 17 13:57:31 1999 Owen Taylor <otaylor@redhat.com>
* docs/gtk_tut.sgml: Removed references to
code examples in my directory on gtk.org as
they should all be in the tutorial now.
* docs/gtk_tut.sgml: Added sources for dial-test
and scribble-xinput programs that were previously
missing.
Fri Jun 4 00:08:59 1999 Owen Taylor <otaylor@redhat.com>
* TODO: Added entry about menu keyboard navigation, removed
some finished items.
Mon May 31 00:11:24 1999 Owen Taylor <otaylor@redhat.com>
* acinclude.m4: Standardize on func_dgettext
not func_gettext, so that the checks for dgettext
actually are paid attention to.
Wed May 5 10:47:54 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (LIBS): Add $INTLLIBS into $LIBS
directly, rather than repeating the checks for
gettext.
* INSTALL: Added information about gettext and
NLS support.
* acinclude.m4 (LIBM): Check for dgettext, not
just gettext. This should hopefully fix things wrt
systems with old versions of GNU gettext installed.
Tue Jun 29 15:59:25 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (LIBS): Look for libgmodule in the
right location.
Thu Apr 1 16:58:10 PST 1999 Manish Singh <yosh@gimp.org>
* autogen.sh: add --enable-maintainer-mode
* configure.in: set ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
Wed Mar 24 23:03:49 CST 1999 Shawn T. Amundson <amundson@gtk.org>
* docs/gtk-config.1.in:
docs/Makefile.am:
configure.in: gtk-config is now generated.
* docs/gtk-config.1: Removed, now generated.
Thu Sep 23 17:59:59 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): grr, even if Gdk doesn't
handle CreateNotify itself, still put out a debuging message for
--gdk-debug=events. made the ReparentNotify debugging message more
verbose.
wrap xcoords translation for ConfigureEvents into an error trap,
a destroy event may already be pending, and in that case, the
actuall coordinate values are not at all critical.
Sat Sep 18 22:24:15 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkcc.c: Stop leaking the color_hash all over
the place. Simplify and improve the logic.
Fri Sep 17 09:57:15 1999 Tim Janik <timj@gtk.org>
* gdk/gdk.h, gdk/gdkcolor.c: make return types (gint or gboolean)
for prototypes and function implementations consistent (reported
by Tomas Ogren).
Tue Sep 14 18:23:01 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): tell if expose events have
send_event set in debugging output.
(gdk_compress_exposures): default initialize the event so we don't
operate on bogus values (namely send_event).
Thu Sep 2 16:33:59 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c: When we receive an unexpected
destroy notify on one of our windows, don't just
warn about it, also mark our windows as destroyed.
Sun Sep 5 08:10:53 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkfont.c (gdk_font_hash_insert): Add
name => font and name => fontset hashes. The
name => fontset hash is a _big_ win since we
weren't previously caching fontsets at all and loading
fontsets is expensive. The name => font hash
is less of a win, but it does save us from doing
repeated XQueryFont calls on the same font.
* gdk/gdkprivate.h (struct _GdkFontPrivate): Add a names
list so we can remove font/fontset from hash.
Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_atom_intern): Remove useless
and slightly confusing test. [ XInternAtom (,,TRUE)
will never return None ].
Sat Sep 4 08:39:26 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_set_geometry_hints)
gdk/gdkwindow.c (gdk_window_set_hints):
Don't omit setting the properties if flags == 0 -
there may be an existing set of properties there
already. (Very old bug. Would it be better to
delete the property instead?)
* gdk/gdkselection.c (gdk_selection_property_get): Fix
spelling error in comment.
Wed Sep 1 14:05:30 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkimage.c (gdk_image_new): Use gdk_error_trap_push()
to avoid stomping over gdk_error_warnings.
* gdk/gdkimage.c (gdk_image_new): compute image->bpp
as (bits_per_pixel + 7) / 8. This gives the same
result as before for multiples of 8, but actually
a "reasonable" value for 1bit or 4bit displays.
Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
* gdk/Makefile.am: minor cleanups, strip spaces on build rules for
GNU Make.
Tue Aug 17 07:43:04 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): give a debugging note when
discarding configure events.
1999-08-18 Federico Mena Quintero <federico@redhat.com>
* gdk/gdkpixmap.c (gdk_pixmap_unref): g_return_if_fail() the
refcount is greater than zero.
* gdk/gdkwindow.c (gdk_window_unref): Likewise.
* gdk/gdkfont.c (gdk_font_unref): Likewise.
* gdk/gdkgc.c (gdk_gc_unref): Likewise.
* gdk/gdkdnd.c (gdk_drag_context_unref): Likewise.
Wed Aug 11 01:04:57 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_property_get): Fix assumption
that format 32 => sizeof(item) == 4. It really is
sizeof(long).
Tue Jun 29 23:02:42 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c (gdk_x_error / gdk_x_io_error): Don't
core dump at all on X IO errors, only core dump
if --enable-debug for X errors.
Thu Jun 24 17:06:23 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): removed old ""Got event for
unknown window:" message. disabled ConfigureNotify discarding code,
because it led to events being processed out of order.
Thu Jun 24 12:22:02 1999 Tim Janik <timj@gtk.org>
* gdk/gdkglobals.c: preinitialize gdk_error_code to 0.
* gdk/gdkevents.c (gdk_event_send_client_message_to_all_recurse): since
we export this function, supress error warnings and don't reset the
error code in the first half of this function.
* gdk/gdk.c (gdk_x_error): set gdk_error_code to the actuall X error
code (instead of just -1) so gdk_error_trap_pop() reveals something
actually informative about the error that happened.
* gdk/*.c:
don't rely on gdk_error_code being -1 if an error occoured, but just
gdk_error_code != 0.
Thu Jun 24 11:50:07 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_apply_filters): advance the filter list
pointer *before* invoking the filter function, so we at least don't
crash if a filter is removed that is currently executed. window filters
*really* need to be made truely reentrant at some point.
Mon Jun 14 11:10:15 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): print the atom name in the
PropertyNotify debug messages.
Wed May 5 22:51:06 1999 Owen Taylor <otaylor@redhat.com>
Patch from Sung-Hyun Nam <namsh@lgic.co.kr>
* gdk/gdkim.c: Fix cut-and-paste errors for
x/y and PreeditAttributes/StatusAttributes.
Wed May 5 22:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_set_geometry_hints): Change
G_MAXINT to 2^16 to alleviate overflow problems in
various window managers.
Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkfont.c (gdk_text_measure): Fix the return value
for fontsets.
Wed May 5 12:42:01 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_set_geometry_hints):
Initialize size_hints.x and size_hints.y because kwm
brokenly pays attention to them.
(Bug #1181 - Lars Heete <hel@admin.de>)
Wed May 5 11:38:56 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkrgb.c (gdk_rgb_choose_visual): Free the
return value of gdk_list_visuals().
(Bug #1193 - Morten Welinder <terra@diku.dk>)
Tue May 4 11:12:56 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkim.c (gdk_im_real_open): cast the return value of
XSetIMValues to (void *) when comparing to NULL, to workaround
the problem of some compilers barfing since older X headers don't
have the prototype for it.
Mon Apr 19 10:11:12 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkcolor.c (gdk_colormap_new): Fix memory leak
for pseudocolor where colormap->colors was double
allocated.
* gdk/gdkcolor.c (gdk_colormap_alloc1): Store the
color value in the hash table with the pixel filled
in so when we do later hash table lookups, the color
value is correct.
Sun May 2 15:29:45 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkdraw.c (gdk_draw_lines): check private->destroyed before
making the call
Tue Apr 27 11:17:35 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.c (xdnd_set_{targets,actions}): Fix leak
pointed out by Morten Welinder <terra@diku.dk>.
Wed Apr 21 14:20:22 1999 George Lebl <jirka@5z.com>
* gdk/gdkwindow.c: (gdk_window_remove_filter) correctly remove the
default filter from the list
Wed Apr 21 14:20:22 1999 George Lebl <jirka@5z.com>
* gdk/gdkwindow.c: (gdk_window_remove_filter) correctly remove the
default filter from the list
Fri Apr 16 20:41:43 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdk.c: #include "gdkkeysyms.h" for gdk_XConvertCase #defines
* gtk/gtkfontsel.c (gtk_font_selection_create_xlfd): use
g_strdup_printf instead of calcing the length separately
Tue Apr 13 02:49:33 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c: removed some silly #ifdef HAVE_CONFIG
that we don't do in many other places. (Fixing duplicate
#include of config.h)
* gdk/gdkevents.c: include gdkinput.h _after_ config.h.
Otherwise, #ifndef XINPUT_NONE check in the latter
doesn't work. (Bug #546)
Sun Apr 11 14:38:03 1999 Tim Janik <timj@gtk.org>
* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): check for color
"None" case insensitive.
Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkselection.c:
Add error traps so if the other end of the connection
dies, we survive.
Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.c (gdk_drag_motion): Separate out the
dest_xid field into two fields - one for the window
to send in messages, one to indicate the last looked
up window for caching purposes. This is needed, so
that Leave messages get the correct window.
Mon Apr 5 13:21:30 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkevents.c (gdk_event_check, gdk_event_prepare):
Fix warning created by people mucking around
with the gsource API.
* gdk/gdkevents.c (gdk_io_invoke, gdk_input_add_full):
Change mapping between GIOCondition and GdkInputCondition
to match the way the Linux kernel does it. This should
fix problems where closed pipes were no longer signalling
GDK_INPUT_READ on systems with a native poll().
Mon Apr 5 17:11:57 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): Check
explicitly for the string "None" - it is in the XPM
spec and some servers treat unknown colors in odd ways
(like asking the user!)
Thu Apr 1 16:58:10 PST 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkevents.c: made "->" into a "." of previous change so
it compiles
Thu Apr 1 18:41:25 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkevents.c (gdk_compress_exposures): Set the
window field of the event structure before calling
user filters.
1999-03-31 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gdk/gdk.c (gdk_init_check): Use False as the last argument to
XInternAtom() here. This is a particularly Old And Nasty(tm) bug.
Mon Mar 29 17:31:52 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkim.c (gdk_mbstowcs): Free the value of the
intermediate text property - prevents major memory
leak when gdk_use_mb.
gtk-d3august-990311-0: Bj|rn Augustsson <d3august@dtek.chalmers.se>
Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com>
Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
gtk-a-higuti-990322-[0-3]
* gdk/gdkfont.c (gdk_text_extents_wc): Make work when
sizeof(wchar_t) != sizeof (GdkWChar)
* configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS
that was causing -DX_LOCALE not to work.
* gtk/gtkrc.c (gtk_rc_init):
X_LOCALE will never have LC_MESSAGES defined
* gdk/gdk.c (gdk_init_check):
Remove --xim-preedit and --xim-status from argv properly.
* gdk/gdkim.c (gdk_ic_real_new): Add a gdk_flush() so
that the client window is present on the X server
before we pass it to the input method.
Tue Mar 9 10:46:49 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.c (motif_find_drag_window): Fix bug where
if --display is specified on the command line, than
the drag window will not be created on that display.
Tue Mar 9 10:38:24 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_atom_intern): Fixed bug where
lookups with only_if_exists == TRUE were inserting
bogus values into the atom cache.
Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org>
* gdk/gdkselection.c (gdk_selection_property_get): first XFree(t),
then reset it to NULL.
* gdk/gdkcolor.c:
(gdk_colors_free):
(gdk_colormap_free_colors): use colormap->colors[in_pixels[i]] as the
key for g_hash_table_remove() in both functions, this prevents us
from accessing possibly uninitialized portions of a GdkColor structure
where we are only interested in its pixel value.
Tue Mar 9 01:01:28 1999 Tim Janik <timj@gtk.org>
* gdk/gdkfont.c (gdk_font_load): first lookup the xfont ID in our
font hash table, if we have a GdkFontPrivate entry for this font
already, simply increment its reference count, provided by Olaf Dietsche
<olaf.dietsche+list.gtk@netcologne.de>.
1999-09-21 Tor Lillqvist <tml@iki.fi> 1999-09-21 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdk.c (gdk_exit_func): Delete the gdk_DC when exiting, * gdk/win32/gdk.c (gdk_exit_func): Delete the gdk_DC when exiting,

View file

@ -1,3 +1,473 @@
[ Merges from gtk-1-2 ]
Wed Sep 8 07:13:29 1999 Tim Janik <timj@gtk.org>
* configure.in: fixed "GNU Make" check to pass with new make version
3.77.95.
Fri Sep 3 16:04:41 1999 Tim Janik <timj@gtk.org>
* gtk-config.in (--version): don't echo @GTK_VERSION@, but
@GTK_MAJOR_VERSION@.@GTK_MINOR_VERSION@.@GTK_MICRO_VERSION@, so the
AM_PATH_GTK() macros don't get confused by the -pre1.
Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (REBUILD): Change check for perl5
to check explicitely for v >= 5.002. (5.001
does not work with our scripts.)
Wed Aug 25 15:45:46 1999 Tim Janik <timj@gtk.org>
* configure.in: evaluate $PERL for the perl version check. added
--disable-rebuilds to give the user an option to completely disable
any source autogeneration rules.
Mon Aug 23 23:16:14 1999 Tim Janik <timj@gtk.org>
* configure.in: evaluate $ac_make when checking for GNU Make.
Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
* docs/Makefile.am: added generation.txt.
* Makefile.am: require automake 1.4, build README from README.in and
INSTALL from INSTALL.in in dist-hook.
* README.in:
* INSTALL.in: new files to autogenerate README and INSTALL from.
* configure.in: figure whether we have GNU Make
* docs/generation.txt: minor additions/corrections.
Wed Aug 11 13:38:26 BST 1999 Tony Gale <gale@gtk.org>
* docs/gtkfaq.sgml: FAQ Update
July 30, 1999 Elliot Lee <sopwith@redhat.com>
* configure.in: Fix autoconf warnings about cross compilation by
trying to provide sane defaults for AC_TRY_RUN.
Fri Jul 16 22:20:21 PDT 1999 Manish Singh <yosh@gimp.org>
* ltconfig
* ltmain.sh: upgrade to libtool 1.3.3
Thu Jul 8 11:30:18 1999 Owen Taylor <otaylor@redhat.com>
* INSTALL: Indicate that the --with-glib= configure
time flag is unsupported.
Mon Jul 5 20:36:03 1999 Owen Taylor <otaylor@redhat.com>
* docs/generation.txt: Added a file that gives
documenation about the autogeneration process for
various autogenerated files.
Tue Jun 29 15:59:25 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (LIBS): Look for libgmodule in the
right location.
Thu Jun 17 13:57:31 1999 Owen Taylor <otaylor@redhat.com>
* docs/gtk_tut.sgml: Removed references to
code examples in my directory on gtk.org as
they should all be in the tutorial now.
* docs/gtk_tut.sgml: Added sources for dial-test
and scribble-xinput programs that were previously
missing.
Fri Jun 4 00:08:59 1999 Owen Taylor <otaylor@redhat.com>
* TODO: Added entry about menu keyboard navigation, removed
some finished items.
Mon May 31 00:11:24 1999 Owen Taylor <otaylor@redhat.com>
* acinclude.m4: Standardize on func_dgettext
not func_gettext, so that the checks for dgettext
actually are paid attention to.
Wed May 5 10:47:54 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (LIBS): Add $INTLLIBS into $LIBS
directly, rather than repeating the checks for
gettext.
* INSTALL: Added information about gettext and
NLS support.
* acinclude.m4 (LIBM): Check for dgettext, not
just gettext. This should hopefully fix things wrt
systems with old versions of GNU gettext installed.
Tue Jun 29 15:59:25 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (LIBS): Look for libgmodule in the
right location.
Thu Apr 1 16:58:10 PST 1999 Manish Singh <yosh@gimp.org>
* autogen.sh: add --enable-maintainer-mode
* configure.in: set ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
Wed Mar 24 23:03:49 CST 1999 Shawn T. Amundson <amundson@gtk.org>
* docs/gtk-config.1.in:
docs/Makefile.am:
configure.in: gtk-config is now generated.
* docs/gtk-config.1: Removed, now generated.
Thu Sep 23 17:59:59 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): grr, even if Gdk doesn't
handle CreateNotify itself, still put out a debuging message for
--gdk-debug=events. made the ReparentNotify debugging message more
verbose.
wrap xcoords translation for ConfigureEvents into an error trap,
a destroy event may already be pending, and in that case, the
actuall coordinate values are not at all critical.
Sat Sep 18 22:24:15 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkcc.c: Stop leaking the color_hash all over
the place. Simplify and improve the logic.
Fri Sep 17 09:57:15 1999 Tim Janik <timj@gtk.org>
* gdk/gdk.h, gdk/gdkcolor.c: make return types (gint or gboolean)
for prototypes and function implementations consistent (reported
by Tomas Ogren).
Tue Sep 14 18:23:01 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): tell if expose events have
send_event set in debugging output.
(gdk_compress_exposures): default initialize the event so we don't
operate on bogus values (namely send_event).
Thu Sep 2 16:33:59 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c: When we receive an unexpected
destroy notify on one of our windows, don't just
warn about it, also mark our windows as destroyed.
Sun Sep 5 08:10:53 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkfont.c (gdk_font_hash_insert): Add
name => font and name => fontset hashes. The
name => fontset hash is a _big_ win since we
weren't previously caching fontsets at all and loading
fontsets is expensive. The name => font hash
is less of a win, but it does save us from doing
repeated XQueryFont calls on the same font.
* gdk/gdkprivate.h (struct _GdkFontPrivate): Add a names
list so we can remove font/fontset from hash.
Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_atom_intern): Remove useless
and slightly confusing test. [ XInternAtom (,,TRUE)
will never return None ].
Sat Sep 4 08:39:26 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_set_geometry_hints)
gdk/gdkwindow.c (gdk_window_set_hints):
Don't omit setting the properties if flags == 0 -
there may be an existing set of properties there
already. (Very old bug. Would it be better to
delete the property instead?)
* gdk/gdkselection.c (gdk_selection_property_get): Fix
spelling error in comment.
Wed Sep 1 14:05:30 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkimage.c (gdk_image_new): Use gdk_error_trap_push()
to avoid stomping over gdk_error_warnings.
* gdk/gdkimage.c (gdk_image_new): compute image->bpp
as (bits_per_pixel + 7) / 8. This gives the same
result as before for multiples of 8, but actually
a "reasonable" value for 1bit or 4bit displays.
Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
* gdk/Makefile.am: minor cleanups, strip spaces on build rules for
GNU Make.
Tue Aug 17 07:43:04 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): give a debugging note when
discarding configure events.
1999-08-18 Federico Mena Quintero <federico@redhat.com>
* gdk/gdkpixmap.c (gdk_pixmap_unref): g_return_if_fail() the
refcount is greater than zero.
* gdk/gdkwindow.c (gdk_window_unref): Likewise.
* gdk/gdkfont.c (gdk_font_unref): Likewise.
* gdk/gdkgc.c (gdk_gc_unref): Likewise.
* gdk/gdkdnd.c (gdk_drag_context_unref): Likewise.
Wed Aug 11 01:04:57 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_property_get): Fix assumption
that format 32 => sizeof(item) == 4. It really is
sizeof(long).
Tue Jun 29 23:02:42 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c (gdk_x_error / gdk_x_io_error): Don't
core dump at all on X IO errors, only core dump
if --enable-debug for X errors.
Thu Jun 24 17:06:23 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): removed old ""Got event for
unknown window:" message. disabled ConfigureNotify discarding code,
because it led to events being processed out of order.
Thu Jun 24 12:22:02 1999 Tim Janik <timj@gtk.org>
* gdk/gdkglobals.c: preinitialize gdk_error_code to 0.
* gdk/gdkevents.c (gdk_event_send_client_message_to_all_recurse): since
we export this function, supress error warnings and don't reset the
error code in the first half of this function.
* gdk/gdk.c (gdk_x_error): set gdk_error_code to the actuall X error
code (instead of just -1) so gdk_error_trap_pop() reveals something
actually informative about the error that happened.
* gdk/*.c:
don't rely on gdk_error_code being -1 if an error occoured, but just
gdk_error_code != 0.
Thu Jun 24 11:50:07 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_apply_filters): advance the filter list
pointer *before* invoking the filter function, so we at least don't
crash if a filter is removed that is currently executed. window filters
*really* need to be made truely reentrant at some point.
Mon Jun 14 11:10:15 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): print the atom name in the
PropertyNotify debug messages.
Wed May 5 22:51:06 1999 Owen Taylor <otaylor@redhat.com>
Patch from Sung-Hyun Nam <namsh@lgic.co.kr>
* gdk/gdkim.c: Fix cut-and-paste errors for
x/y and PreeditAttributes/StatusAttributes.
Wed May 5 22:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_set_geometry_hints): Change
G_MAXINT to 2^16 to alleviate overflow problems in
various window managers.
Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkfont.c (gdk_text_measure): Fix the return value
for fontsets.
Wed May 5 12:42:01 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_set_geometry_hints):
Initialize size_hints.x and size_hints.y because kwm
brokenly pays attention to them.
(Bug #1181 - Lars Heete <hel@admin.de>)
Wed May 5 11:38:56 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkrgb.c (gdk_rgb_choose_visual): Free the
return value of gdk_list_visuals().
(Bug #1193 - Morten Welinder <terra@diku.dk>)
Tue May 4 11:12:56 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkim.c (gdk_im_real_open): cast the return value of
XSetIMValues to (void *) when comparing to NULL, to workaround
the problem of some compilers barfing since older X headers don't
have the prototype for it.
Mon Apr 19 10:11:12 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkcolor.c (gdk_colormap_new): Fix memory leak
for pseudocolor where colormap->colors was double
allocated.
* gdk/gdkcolor.c (gdk_colormap_alloc1): Store the
color value in the hash table with the pixel filled
in so when we do later hash table lookups, the color
value is correct.
Sun May 2 15:29:45 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkdraw.c (gdk_draw_lines): check private->destroyed before
making the call
Tue Apr 27 11:17:35 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.c (xdnd_set_{targets,actions}): Fix leak
pointed out by Morten Welinder <terra@diku.dk>.
Wed Apr 21 14:20:22 1999 George Lebl <jirka@5z.com>
* gdk/gdkwindow.c: (gdk_window_remove_filter) correctly remove the
default filter from the list
Wed Apr 21 14:20:22 1999 George Lebl <jirka@5z.com>
* gdk/gdkwindow.c: (gdk_window_remove_filter) correctly remove the
default filter from the list
Fri Apr 16 20:41:43 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdk.c: #include "gdkkeysyms.h" for gdk_XConvertCase #defines
* gtk/gtkfontsel.c (gtk_font_selection_create_xlfd): use
g_strdup_printf instead of calcing the length separately
Tue Apr 13 02:49:33 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c: removed some silly #ifdef HAVE_CONFIG
that we don't do in many other places. (Fixing duplicate
#include of config.h)
* gdk/gdkevents.c: include gdkinput.h _after_ config.h.
Otherwise, #ifndef XINPUT_NONE check in the latter
doesn't work. (Bug #546)
Sun Apr 11 14:38:03 1999 Tim Janik <timj@gtk.org>
* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): check for color
"None" case insensitive.
Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkselection.c:
Add error traps so if the other end of the connection
dies, we survive.
Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.c (gdk_drag_motion): Separate out the
dest_xid field into two fields - one for the window
to send in messages, one to indicate the last looked
up window for caching purposes. This is needed, so
that Leave messages get the correct window.
Mon Apr 5 13:21:30 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkevents.c (gdk_event_check, gdk_event_prepare):
Fix warning created by people mucking around
with the gsource API.
* gdk/gdkevents.c (gdk_io_invoke, gdk_input_add_full):
Change mapping between GIOCondition and GdkInputCondition
to match the way the Linux kernel does it. This should
fix problems where closed pipes were no longer signalling
GDK_INPUT_READ on systems with a native poll().
Mon Apr 5 17:11:57 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): Check
explicitly for the string "None" - it is in the XPM
spec and some servers treat unknown colors in odd ways
(like asking the user!)
Thu Apr 1 16:58:10 PST 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkevents.c: made "->" into a "." of previous change so
it compiles
Thu Apr 1 18:41:25 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkevents.c (gdk_compress_exposures): Set the
window field of the event structure before calling
user filters.
1999-03-31 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gdk/gdk.c (gdk_init_check): Use False as the last argument to
XInternAtom() here. This is a particularly Old And Nasty(tm) bug.
Mon Mar 29 17:31:52 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkim.c (gdk_mbstowcs): Free the value of the
intermediate text property - prevents major memory
leak when gdk_use_mb.
gtk-d3august-990311-0: Bj|rn Augustsson <d3august@dtek.chalmers.se>
Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com>
Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
gtk-a-higuti-990322-[0-3]
* gdk/gdkfont.c (gdk_text_extents_wc): Make work when
sizeof(wchar_t) != sizeof (GdkWChar)
* configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS
that was causing -DX_LOCALE not to work.
* gtk/gtkrc.c (gtk_rc_init):
X_LOCALE will never have LC_MESSAGES defined
* gdk/gdk.c (gdk_init_check):
Remove --xim-preedit and --xim-status from argv properly.
* gdk/gdkim.c (gdk_ic_real_new): Add a gdk_flush() so
that the client window is present on the X server
before we pass it to the input method.
Tue Mar 9 10:46:49 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.c (motif_find_drag_window): Fix bug where
if --display is specified on the command line, than
the drag window will not be created on that display.
Tue Mar 9 10:38:24 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_atom_intern): Fixed bug where
lookups with only_if_exists == TRUE were inserting
bogus values into the atom cache.
Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org>
* gdk/gdkselection.c (gdk_selection_property_get): first XFree(t),
then reset it to NULL.
* gdk/gdkcolor.c:
(gdk_colors_free):
(gdk_colormap_free_colors): use colormap->colors[in_pixels[i]] as the
key for g_hash_table_remove() in both functions, this prevents us
from accessing possibly uninitialized portions of a GdkColor structure
where we are only interested in its pixel value.
Tue Mar 9 01:01:28 1999 Tim Janik <timj@gtk.org>
* gdk/gdkfont.c (gdk_font_load): first lookup the xfont ID in our
font hash table, if we have a GdkFontPrivate entry for this font
already, simply increment its reference count, provided by Olaf Dietsche
<olaf.dietsche+list.gtk@netcologne.de>.
1999-09-21 Tor Lillqvist <tml@iki.fi> 1999-09-21 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdk.c (gdk_exit_func): Delete the gdk_DC when exiting, * gdk/win32/gdk.c (gdk_exit_func): Delete the gdk_DC when exiting,

View file

@ -1,3 +1,473 @@
[ Merges from gtk-1-2 ]
Wed Sep 8 07:13:29 1999 Tim Janik <timj@gtk.org>
* configure.in: fixed "GNU Make" check to pass with new make version
3.77.95.
Fri Sep 3 16:04:41 1999 Tim Janik <timj@gtk.org>
* gtk-config.in (--version): don't echo @GTK_VERSION@, but
@GTK_MAJOR_VERSION@.@GTK_MINOR_VERSION@.@GTK_MICRO_VERSION@, so the
AM_PATH_GTK() macros don't get confused by the -pre1.
Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (REBUILD): Change check for perl5
to check explicitely for v >= 5.002. (5.001
does not work with our scripts.)
Wed Aug 25 15:45:46 1999 Tim Janik <timj@gtk.org>
* configure.in: evaluate $PERL for the perl version check. added
--disable-rebuilds to give the user an option to completely disable
any source autogeneration rules.
Mon Aug 23 23:16:14 1999 Tim Janik <timj@gtk.org>
* configure.in: evaluate $ac_make when checking for GNU Make.
Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
* docs/Makefile.am: added generation.txt.
* Makefile.am: require automake 1.4, build README from README.in and
INSTALL from INSTALL.in in dist-hook.
* README.in:
* INSTALL.in: new files to autogenerate README and INSTALL from.
* configure.in: figure whether we have GNU Make
* docs/generation.txt: minor additions/corrections.
Wed Aug 11 13:38:26 BST 1999 Tony Gale <gale@gtk.org>
* docs/gtkfaq.sgml: FAQ Update
July 30, 1999 Elliot Lee <sopwith@redhat.com>
* configure.in: Fix autoconf warnings about cross compilation by
trying to provide sane defaults for AC_TRY_RUN.
Fri Jul 16 22:20:21 PDT 1999 Manish Singh <yosh@gimp.org>
* ltconfig
* ltmain.sh: upgrade to libtool 1.3.3
Thu Jul 8 11:30:18 1999 Owen Taylor <otaylor@redhat.com>
* INSTALL: Indicate that the --with-glib= configure
time flag is unsupported.
Mon Jul 5 20:36:03 1999 Owen Taylor <otaylor@redhat.com>
* docs/generation.txt: Added a file that gives
documenation about the autogeneration process for
various autogenerated files.
Tue Jun 29 15:59:25 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (LIBS): Look for libgmodule in the
right location.
Thu Jun 17 13:57:31 1999 Owen Taylor <otaylor@redhat.com>
* docs/gtk_tut.sgml: Removed references to
code examples in my directory on gtk.org as
they should all be in the tutorial now.
* docs/gtk_tut.sgml: Added sources for dial-test
and scribble-xinput programs that were previously
missing.
Fri Jun 4 00:08:59 1999 Owen Taylor <otaylor@redhat.com>
* TODO: Added entry about menu keyboard navigation, removed
some finished items.
Mon May 31 00:11:24 1999 Owen Taylor <otaylor@redhat.com>
* acinclude.m4: Standardize on func_dgettext
not func_gettext, so that the checks for dgettext
actually are paid attention to.
Wed May 5 10:47:54 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (LIBS): Add $INTLLIBS into $LIBS
directly, rather than repeating the checks for
gettext.
* INSTALL: Added information about gettext and
NLS support.
* acinclude.m4 (LIBM): Check for dgettext, not
just gettext. This should hopefully fix things wrt
systems with old versions of GNU gettext installed.
Tue Jun 29 15:59:25 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (LIBS): Look for libgmodule in the
right location.
Thu Apr 1 16:58:10 PST 1999 Manish Singh <yosh@gimp.org>
* autogen.sh: add --enable-maintainer-mode
* configure.in: set ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
Wed Mar 24 23:03:49 CST 1999 Shawn T. Amundson <amundson@gtk.org>
* docs/gtk-config.1.in:
docs/Makefile.am:
configure.in: gtk-config is now generated.
* docs/gtk-config.1: Removed, now generated.
Thu Sep 23 17:59:59 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): grr, even if Gdk doesn't
handle CreateNotify itself, still put out a debuging message for
--gdk-debug=events. made the ReparentNotify debugging message more
verbose.
wrap xcoords translation for ConfigureEvents into an error trap,
a destroy event may already be pending, and in that case, the
actuall coordinate values are not at all critical.
Sat Sep 18 22:24:15 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkcc.c: Stop leaking the color_hash all over
the place. Simplify and improve the logic.
Fri Sep 17 09:57:15 1999 Tim Janik <timj@gtk.org>
* gdk/gdk.h, gdk/gdkcolor.c: make return types (gint or gboolean)
for prototypes and function implementations consistent (reported
by Tomas Ogren).
Tue Sep 14 18:23:01 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): tell if expose events have
send_event set in debugging output.
(gdk_compress_exposures): default initialize the event so we don't
operate on bogus values (namely send_event).
Thu Sep 2 16:33:59 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c: When we receive an unexpected
destroy notify on one of our windows, don't just
warn about it, also mark our windows as destroyed.
Sun Sep 5 08:10:53 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkfont.c (gdk_font_hash_insert): Add
name => font and name => fontset hashes. The
name => fontset hash is a _big_ win since we
weren't previously caching fontsets at all and loading
fontsets is expensive. The name => font hash
is less of a win, but it does save us from doing
repeated XQueryFont calls on the same font.
* gdk/gdkprivate.h (struct _GdkFontPrivate): Add a names
list so we can remove font/fontset from hash.
Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_atom_intern): Remove useless
and slightly confusing test. [ XInternAtom (,,TRUE)
will never return None ].
Sat Sep 4 08:39:26 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_set_geometry_hints)
gdk/gdkwindow.c (gdk_window_set_hints):
Don't omit setting the properties if flags == 0 -
there may be an existing set of properties there
already. (Very old bug. Would it be better to
delete the property instead?)
* gdk/gdkselection.c (gdk_selection_property_get): Fix
spelling error in comment.
Wed Sep 1 14:05:30 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkimage.c (gdk_image_new): Use gdk_error_trap_push()
to avoid stomping over gdk_error_warnings.
* gdk/gdkimage.c (gdk_image_new): compute image->bpp
as (bits_per_pixel + 7) / 8. This gives the same
result as before for multiples of 8, but actually
a "reasonable" value for 1bit or 4bit displays.
Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
* gdk/Makefile.am: minor cleanups, strip spaces on build rules for
GNU Make.
Tue Aug 17 07:43:04 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): give a debugging note when
discarding configure events.
1999-08-18 Federico Mena Quintero <federico@redhat.com>
* gdk/gdkpixmap.c (gdk_pixmap_unref): g_return_if_fail() the
refcount is greater than zero.
* gdk/gdkwindow.c (gdk_window_unref): Likewise.
* gdk/gdkfont.c (gdk_font_unref): Likewise.
* gdk/gdkgc.c (gdk_gc_unref): Likewise.
* gdk/gdkdnd.c (gdk_drag_context_unref): Likewise.
Wed Aug 11 01:04:57 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_property_get): Fix assumption
that format 32 => sizeof(item) == 4. It really is
sizeof(long).
Tue Jun 29 23:02:42 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c (gdk_x_error / gdk_x_io_error): Don't
core dump at all on X IO errors, only core dump
if --enable-debug for X errors.
Thu Jun 24 17:06:23 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): removed old ""Got event for
unknown window:" message. disabled ConfigureNotify discarding code,
because it led to events being processed out of order.
Thu Jun 24 12:22:02 1999 Tim Janik <timj@gtk.org>
* gdk/gdkglobals.c: preinitialize gdk_error_code to 0.
* gdk/gdkevents.c (gdk_event_send_client_message_to_all_recurse): since
we export this function, supress error warnings and don't reset the
error code in the first half of this function.
* gdk/gdk.c (gdk_x_error): set gdk_error_code to the actuall X error
code (instead of just -1) so gdk_error_trap_pop() reveals something
actually informative about the error that happened.
* gdk/*.c:
don't rely on gdk_error_code being -1 if an error occoured, but just
gdk_error_code != 0.
Thu Jun 24 11:50:07 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_apply_filters): advance the filter list
pointer *before* invoking the filter function, so we at least don't
crash if a filter is removed that is currently executed. window filters
*really* need to be made truely reentrant at some point.
Mon Jun 14 11:10:15 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): print the atom name in the
PropertyNotify debug messages.
Wed May 5 22:51:06 1999 Owen Taylor <otaylor@redhat.com>
Patch from Sung-Hyun Nam <namsh@lgic.co.kr>
* gdk/gdkim.c: Fix cut-and-paste errors for
x/y and PreeditAttributes/StatusAttributes.
Wed May 5 22:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_set_geometry_hints): Change
G_MAXINT to 2^16 to alleviate overflow problems in
various window managers.
Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkfont.c (gdk_text_measure): Fix the return value
for fontsets.
Wed May 5 12:42:01 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_set_geometry_hints):
Initialize size_hints.x and size_hints.y because kwm
brokenly pays attention to them.
(Bug #1181 - Lars Heete <hel@admin.de>)
Wed May 5 11:38:56 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkrgb.c (gdk_rgb_choose_visual): Free the
return value of gdk_list_visuals().
(Bug #1193 - Morten Welinder <terra@diku.dk>)
Tue May 4 11:12:56 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkim.c (gdk_im_real_open): cast the return value of
XSetIMValues to (void *) when comparing to NULL, to workaround
the problem of some compilers barfing since older X headers don't
have the prototype for it.
Mon Apr 19 10:11:12 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkcolor.c (gdk_colormap_new): Fix memory leak
for pseudocolor where colormap->colors was double
allocated.
* gdk/gdkcolor.c (gdk_colormap_alloc1): Store the
color value in the hash table with the pixel filled
in so when we do later hash table lookups, the color
value is correct.
Sun May 2 15:29:45 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkdraw.c (gdk_draw_lines): check private->destroyed before
making the call
Tue Apr 27 11:17:35 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.c (xdnd_set_{targets,actions}): Fix leak
pointed out by Morten Welinder <terra@diku.dk>.
Wed Apr 21 14:20:22 1999 George Lebl <jirka@5z.com>
* gdk/gdkwindow.c: (gdk_window_remove_filter) correctly remove the
default filter from the list
Wed Apr 21 14:20:22 1999 George Lebl <jirka@5z.com>
* gdk/gdkwindow.c: (gdk_window_remove_filter) correctly remove the
default filter from the list
Fri Apr 16 20:41:43 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdk.c: #include "gdkkeysyms.h" for gdk_XConvertCase #defines
* gtk/gtkfontsel.c (gtk_font_selection_create_xlfd): use
g_strdup_printf instead of calcing the length separately
Tue Apr 13 02:49:33 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c: removed some silly #ifdef HAVE_CONFIG
that we don't do in many other places. (Fixing duplicate
#include of config.h)
* gdk/gdkevents.c: include gdkinput.h _after_ config.h.
Otherwise, #ifndef XINPUT_NONE check in the latter
doesn't work. (Bug #546)
Sun Apr 11 14:38:03 1999 Tim Janik <timj@gtk.org>
* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): check for color
"None" case insensitive.
Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkselection.c:
Add error traps so if the other end of the connection
dies, we survive.
Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.c (gdk_drag_motion): Separate out the
dest_xid field into two fields - one for the window
to send in messages, one to indicate the last looked
up window for caching purposes. This is needed, so
that Leave messages get the correct window.
Mon Apr 5 13:21:30 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkevents.c (gdk_event_check, gdk_event_prepare):
Fix warning created by people mucking around
with the gsource API.
* gdk/gdkevents.c (gdk_io_invoke, gdk_input_add_full):
Change mapping between GIOCondition and GdkInputCondition
to match the way the Linux kernel does it. This should
fix problems where closed pipes were no longer signalling
GDK_INPUT_READ on systems with a native poll().
Mon Apr 5 17:11:57 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): Check
explicitly for the string "None" - it is in the XPM
spec and some servers treat unknown colors in odd ways
(like asking the user!)
Thu Apr 1 16:58:10 PST 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkevents.c: made "->" into a "." of previous change so
it compiles
Thu Apr 1 18:41:25 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkevents.c (gdk_compress_exposures): Set the
window field of the event structure before calling
user filters.
1999-03-31 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gdk/gdk.c (gdk_init_check): Use False as the last argument to
XInternAtom() here. This is a particularly Old And Nasty(tm) bug.
Mon Mar 29 17:31:52 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkim.c (gdk_mbstowcs): Free the value of the
intermediate text property - prevents major memory
leak when gdk_use_mb.
gtk-d3august-990311-0: Bj|rn Augustsson <d3august@dtek.chalmers.se>
Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com>
Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
gtk-a-higuti-990322-[0-3]
* gdk/gdkfont.c (gdk_text_extents_wc): Make work when
sizeof(wchar_t) != sizeof (GdkWChar)
* configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS
that was causing -DX_LOCALE not to work.
* gtk/gtkrc.c (gtk_rc_init):
X_LOCALE will never have LC_MESSAGES defined
* gdk/gdk.c (gdk_init_check):
Remove --xim-preedit and --xim-status from argv properly.
* gdk/gdkim.c (gdk_ic_real_new): Add a gdk_flush() so
that the client window is present on the X server
before we pass it to the input method.
Tue Mar 9 10:46:49 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.c (motif_find_drag_window): Fix bug where
if --display is specified on the command line, than
the drag window will not be created on that display.
Tue Mar 9 10:38:24 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_atom_intern): Fixed bug where
lookups with only_if_exists == TRUE were inserting
bogus values into the atom cache.
Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org>
* gdk/gdkselection.c (gdk_selection_property_get): first XFree(t),
then reset it to NULL.
* gdk/gdkcolor.c:
(gdk_colors_free):
(gdk_colormap_free_colors): use colormap->colors[in_pixels[i]] as the
key for g_hash_table_remove() in both functions, this prevents us
from accessing possibly uninitialized portions of a GdkColor structure
where we are only interested in its pixel value.
Tue Mar 9 01:01:28 1999 Tim Janik <timj@gtk.org>
* gdk/gdkfont.c (gdk_font_load): first lookup the xfont ID in our
font hash table, if we have a GdkFontPrivate entry for this font
already, simply increment its reference count, provided by Olaf Dietsche
<olaf.dietsche+list.gtk@netcologne.de>.
1999-09-21 Tor Lillqvist <tml@iki.fi> 1999-09-21 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdk.c (gdk_exit_func): Delete the gdk_DC when exiting, * gdk/win32/gdk.c (gdk_exit_func): Delete the gdk_DC when exiting,

View file

@ -1,3 +1,473 @@
[ Merges from gtk-1-2 ]
Wed Sep 8 07:13:29 1999 Tim Janik <timj@gtk.org>
* configure.in: fixed "GNU Make" check to pass with new make version
3.77.95.
Fri Sep 3 16:04:41 1999 Tim Janik <timj@gtk.org>
* gtk-config.in (--version): don't echo @GTK_VERSION@, but
@GTK_MAJOR_VERSION@.@GTK_MINOR_VERSION@.@GTK_MICRO_VERSION@, so the
AM_PATH_GTK() macros don't get confused by the -pre1.
Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (REBUILD): Change check for perl5
to check explicitely for v >= 5.002. (5.001
does not work with our scripts.)
Wed Aug 25 15:45:46 1999 Tim Janik <timj@gtk.org>
* configure.in: evaluate $PERL for the perl version check. added
--disable-rebuilds to give the user an option to completely disable
any source autogeneration rules.
Mon Aug 23 23:16:14 1999 Tim Janik <timj@gtk.org>
* configure.in: evaluate $ac_make when checking for GNU Make.
Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
* docs/Makefile.am: added generation.txt.
* Makefile.am: require automake 1.4, build README from README.in and
INSTALL from INSTALL.in in dist-hook.
* README.in:
* INSTALL.in: new files to autogenerate README and INSTALL from.
* configure.in: figure whether we have GNU Make
* docs/generation.txt: minor additions/corrections.
Wed Aug 11 13:38:26 BST 1999 Tony Gale <gale@gtk.org>
* docs/gtkfaq.sgml: FAQ Update
July 30, 1999 Elliot Lee <sopwith@redhat.com>
* configure.in: Fix autoconf warnings about cross compilation by
trying to provide sane defaults for AC_TRY_RUN.
Fri Jul 16 22:20:21 PDT 1999 Manish Singh <yosh@gimp.org>
* ltconfig
* ltmain.sh: upgrade to libtool 1.3.3
Thu Jul 8 11:30:18 1999 Owen Taylor <otaylor@redhat.com>
* INSTALL: Indicate that the --with-glib= configure
time flag is unsupported.
Mon Jul 5 20:36:03 1999 Owen Taylor <otaylor@redhat.com>
* docs/generation.txt: Added a file that gives
documenation about the autogeneration process for
various autogenerated files.
Tue Jun 29 15:59:25 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (LIBS): Look for libgmodule in the
right location.
Thu Jun 17 13:57:31 1999 Owen Taylor <otaylor@redhat.com>
* docs/gtk_tut.sgml: Removed references to
code examples in my directory on gtk.org as
they should all be in the tutorial now.
* docs/gtk_tut.sgml: Added sources for dial-test
and scribble-xinput programs that were previously
missing.
Fri Jun 4 00:08:59 1999 Owen Taylor <otaylor@redhat.com>
* TODO: Added entry about menu keyboard navigation, removed
some finished items.
Mon May 31 00:11:24 1999 Owen Taylor <otaylor@redhat.com>
* acinclude.m4: Standardize on func_dgettext
not func_gettext, so that the checks for dgettext
actually are paid attention to.
Wed May 5 10:47:54 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (LIBS): Add $INTLLIBS into $LIBS
directly, rather than repeating the checks for
gettext.
* INSTALL: Added information about gettext and
NLS support.
* acinclude.m4 (LIBM): Check for dgettext, not
just gettext. This should hopefully fix things wrt
systems with old versions of GNU gettext installed.
Tue Jun 29 15:59:25 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (LIBS): Look for libgmodule in the
right location.
Thu Apr 1 16:58:10 PST 1999 Manish Singh <yosh@gimp.org>
* autogen.sh: add --enable-maintainer-mode
* configure.in: set ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
Wed Mar 24 23:03:49 CST 1999 Shawn T. Amundson <amundson@gtk.org>
* docs/gtk-config.1.in:
docs/Makefile.am:
configure.in: gtk-config is now generated.
* docs/gtk-config.1: Removed, now generated.
Thu Sep 23 17:59:59 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): grr, even if Gdk doesn't
handle CreateNotify itself, still put out a debuging message for
--gdk-debug=events. made the ReparentNotify debugging message more
verbose.
wrap xcoords translation for ConfigureEvents into an error trap,
a destroy event may already be pending, and in that case, the
actuall coordinate values are not at all critical.
Sat Sep 18 22:24:15 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkcc.c: Stop leaking the color_hash all over
the place. Simplify and improve the logic.
Fri Sep 17 09:57:15 1999 Tim Janik <timj@gtk.org>
* gdk/gdk.h, gdk/gdkcolor.c: make return types (gint or gboolean)
for prototypes and function implementations consistent (reported
by Tomas Ogren).
Tue Sep 14 18:23:01 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): tell if expose events have
send_event set in debugging output.
(gdk_compress_exposures): default initialize the event so we don't
operate on bogus values (namely send_event).
Thu Sep 2 16:33:59 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c: When we receive an unexpected
destroy notify on one of our windows, don't just
warn about it, also mark our windows as destroyed.
Sun Sep 5 08:10:53 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkfont.c (gdk_font_hash_insert): Add
name => font and name => fontset hashes. The
name => fontset hash is a _big_ win since we
weren't previously caching fontsets at all and loading
fontsets is expensive. The name => font hash
is less of a win, but it does save us from doing
repeated XQueryFont calls on the same font.
* gdk/gdkprivate.h (struct _GdkFontPrivate): Add a names
list so we can remove font/fontset from hash.
Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_atom_intern): Remove useless
and slightly confusing test. [ XInternAtom (,,TRUE)
will never return None ].
Sat Sep 4 08:39:26 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_set_geometry_hints)
gdk/gdkwindow.c (gdk_window_set_hints):
Don't omit setting the properties if flags == 0 -
there may be an existing set of properties there
already. (Very old bug. Would it be better to
delete the property instead?)
* gdk/gdkselection.c (gdk_selection_property_get): Fix
spelling error in comment.
Wed Sep 1 14:05:30 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkimage.c (gdk_image_new): Use gdk_error_trap_push()
to avoid stomping over gdk_error_warnings.
* gdk/gdkimage.c (gdk_image_new): compute image->bpp
as (bits_per_pixel + 7) / 8. This gives the same
result as before for multiples of 8, but actually
a "reasonable" value for 1bit or 4bit displays.
Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
* gdk/Makefile.am: minor cleanups, strip spaces on build rules for
GNU Make.
Tue Aug 17 07:43:04 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): give a debugging note when
discarding configure events.
1999-08-18 Federico Mena Quintero <federico@redhat.com>
* gdk/gdkpixmap.c (gdk_pixmap_unref): g_return_if_fail() the
refcount is greater than zero.
* gdk/gdkwindow.c (gdk_window_unref): Likewise.
* gdk/gdkfont.c (gdk_font_unref): Likewise.
* gdk/gdkgc.c (gdk_gc_unref): Likewise.
* gdk/gdkdnd.c (gdk_drag_context_unref): Likewise.
Wed Aug 11 01:04:57 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_property_get): Fix assumption
that format 32 => sizeof(item) == 4. It really is
sizeof(long).
Tue Jun 29 23:02:42 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c (gdk_x_error / gdk_x_io_error): Don't
core dump at all on X IO errors, only core dump
if --enable-debug for X errors.
Thu Jun 24 17:06:23 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): removed old ""Got event for
unknown window:" message. disabled ConfigureNotify discarding code,
because it led to events being processed out of order.
Thu Jun 24 12:22:02 1999 Tim Janik <timj@gtk.org>
* gdk/gdkglobals.c: preinitialize gdk_error_code to 0.
* gdk/gdkevents.c (gdk_event_send_client_message_to_all_recurse): since
we export this function, supress error warnings and don't reset the
error code in the first half of this function.
* gdk/gdk.c (gdk_x_error): set gdk_error_code to the actuall X error
code (instead of just -1) so gdk_error_trap_pop() reveals something
actually informative about the error that happened.
* gdk/*.c:
don't rely on gdk_error_code being -1 if an error occoured, but just
gdk_error_code != 0.
Thu Jun 24 11:50:07 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_apply_filters): advance the filter list
pointer *before* invoking the filter function, so we at least don't
crash if a filter is removed that is currently executed. window filters
*really* need to be made truely reentrant at some point.
Mon Jun 14 11:10:15 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): print the atom name in the
PropertyNotify debug messages.
Wed May 5 22:51:06 1999 Owen Taylor <otaylor@redhat.com>
Patch from Sung-Hyun Nam <namsh@lgic.co.kr>
* gdk/gdkim.c: Fix cut-and-paste errors for
x/y and PreeditAttributes/StatusAttributes.
Wed May 5 22:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_set_geometry_hints): Change
G_MAXINT to 2^16 to alleviate overflow problems in
various window managers.
Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkfont.c (gdk_text_measure): Fix the return value
for fontsets.
Wed May 5 12:42:01 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_set_geometry_hints):
Initialize size_hints.x and size_hints.y because kwm
brokenly pays attention to them.
(Bug #1181 - Lars Heete <hel@admin.de>)
Wed May 5 11:38:56 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkrgb.c (gdk_rgb_choose_visual): Free the
return value of gdk_list_visuals().
(Bug #1193 - Morten Welinder <terra@diku.dk>)
Tue May 4 11:12:56 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkim.c (gdk_im_real_open): cast the return value of
XSetIMValues to (void *) when comparing to NULL, to workaround
the problem of some compilers barfing since older X headers don't
have the prototype for it.
Mon Apr 19 10:11:12 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkcolor.c (gdk_colormap_new): Fix memory leak
for pseudocolor where colormap->colors was double
allocated.
* gdk/gdkcolor.c (gdk_colormap_alloc1): Store the
color value in the hash table with the pixel filled
in so when we do later hash table lookups, the color
value is correct.
Sun May 2 15:29:45 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkdraw.c (gdk_draw_lines): check private->destroyed before
making the call
Tue Apr 27 11:17:35 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.c (xdnd_set_{targets,actions}): Fix leak
pointed out by Morten Welinder <terra@diku.dk>.
Wed Apr 21 14:20:22 1999 George Lebl <jirka@5z.com>
* gdk/gdkwindow.c: (gdk_window_remove_filter) correctly remove the
default filter from the list
Wed Apr 21 14:20:22 1999 George Lebl <jirka@5z.com>
* gdk/gdkwindow.c: (gdk_window_remove_filter) correctly remove the
default filter from the list
Fri Apr 16 20:41:43 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdk.c: #include "gdkkeysyms.h" for gdk_XConvertCase #defines
* gtk/gtkfontsel.c (gtk_font_selection_create_xlfd): use
g_strdup_printf instead of calcing the length separately
Tue Apr 13 02:49:33 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c: removed some silly #ifdef HAVE_CONFIG
that we don't do in many other places. (Fixing duplicate
#include of config.h)
* gdk/gdkevents.c: include gdkinput.h _after_ config.h.
Otherwise, #ifndef XINPUT_NONE check in the latter
doesn't work. (Bug #546)
Sun Apr 11 14:38:03 1999 Tim Janik <timj@gtk.org>
* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): check for color
"None" case insensitive.
Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkselection.c:
Add error traps so if the other end of the connection
dies, we survive.
Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.c (gdk_drag_motion): Separate out the
dest_xid field into two fields - one for the window
to send in messages, one to indicate the last looked
up window for caching purposes. This is needed, so
that Leave messages get the correct window.
Mon Apr 5 13:21:30 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkevents.c (gdk_event_check, gdk_event_prepare):
Fix warning created by people mucking around
with the gsource API.
* gdk/gdkevents.c (gdk_io_invoke, gdk_input_add_full):
Change mapping between GIOCondition and GdkInputCondition
to match the way the Linux kernel does it. This should
fix problems where closed pipes were no longer signalling
GDK_INPUT_READ on systems with a native poll().
Mon Apr 5 17:11:57 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): Check
explicitly for the string "None" - it is in the XPM
spec and some servers treat unknown colors in odd ways
(like asking the user!)
Thu Apr 1 16:58:10 PST 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkevents.c: made "->" into a "." of previous change so
it compiles
Thu Apr 1 18:41:25 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkevents.c (gdk_compress_exposures): Set the
window field of the event structure before calling
user filters.
1999-03-31 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gdk/gdk.c (gdk_init_check): Use False as the last argument to
XInternAtom() here. This is a particularly Old And Nasty(tm) bug.
Mon Mar 29 17:31:52 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkim.c (gdk_mbstowcs): Free the value of the
intermediate text property - prevents major memory
leak when gdk_use_mb.
gtk-d3august-990311-0: Bj|rn Augustsson <d3august@dtek.chalmers.se>
Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com>
Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
gtk-a-higuti-990322-[0-3]
* gdk/gdkfont.c (gdk_text_extents_wc): Make work when
sizeof(wchar_t) != sizeof (GdkWChar)
* configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS
that was causing -DX_LOCALE not to work.
* gtk/gtkrc.c (gtk_rc_init):
X_LOCALE will never have LC_MESSAGES defined
* gdk/gdk.c (gdk_init_check):
Remove --xim-preedit and --xim-status from argv properly.
* gdk/gdkim.c (gdk_ic_real_new): Add a gdk_flush() so
that the client window is present on the X server
before we pass it to the input method.
Tue Mar 9 10:46:49 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.c (motif_find_drag_window): Fix bug where
if --display is specified on the command line, than
the drag window will not be created on that display.
Tue Mar 9 10:38:24 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_atom_intern): Fixed bug where
lookups with only_if_exists == TRUE were inserting
bogus values into the atom cache.
Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org>
* gdk/gdkselection.c (gdk_selection_property_get): first XFree(t),
then reset it to NULL.
* gdk/gdkcolor.c:
(gdk_colors_free):
(gdk_colormap_free_colors): use colormap->colors[in_pixels[i]] as the
key for g_hash_table_remove() in both functions, this prevents us
from accessing possibly uninitialized portions of a GdkColor structure
where we are only interested in its pixel value.
Tue Mar 9 01:01:28 1999 Tim Janik <timj@gtk.org>
* gdk/gdkfont.c (gdk_font_load): first lookup the xfont ID in our
font hash table, if we have a GdkFontPrivate entry for this font
already, simply increment its reference count, provided by Olaf Dietsche
<olaf.dietsche+list.gtk@netcologne.de>.
1999-09-21 Tor Lillqvist <tml@iki.fi> 1999-09-21 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdk.c (gdk_exit_func): Delete the gdk_DC when exiting, * gdk/win32/gdk.c (gdk_exit_func): Delete the gdk_DC when exiting,

View file

@ -1,3 +1,473 @@
[ Merges from gtk-1-2 ]
Wed Sep 8 07:13:29 1999 Tim Janik <timj@gtk.org>
* configure.in: fixed "GNU Make" check to pass with new make version
3.77.95.
Fri Sep 3 16:04:41 1999 Tim Janik <timj@gtk.org>
* gtk-config.in (--version): don't echo @GTK_VERSION@, but
@GTK_MAJOR_VERSION@.@GTK_MINOR_VERSION@.@GTK_MICRO_VERSION@, so the
AM_PATH_GTK() macros don't get confused by the -pre1.
Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (REBUILD): Change check for perl5
to check explicitely for v >= 5.002. (5.001
does not work with our scripts.)
Wed Aug 25 15:45:46 1999 Tim Janik <timj@gtk.org>
* configure.in: evaluate $PERL for the perl version check. added
--disable-rebuilds to give the user an option to completely disable
any source autogeneration rules.
Mon Aug 23 23:16:14 1999 Tim Janik <timj@gtk.org>
* configure.in: evaluate $ac_make when checking for GNU Make.
Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
* docs/Makefile.am: added generation.txt.
* Makefile.am: require automake 1.4, build README from README.in and
INSTALL from INSTALL.in in dist-hook.
* README.in:
* INSTALL.in: new files to autogenerate README and INSTALL from.
* configure.in: figure whether we have GNU Make
* docs/generation.txt: minor additions/corrections.
Wed Aug 11 13:38:26 BST 1999 Tony Gale <gale@gtk.org>
* docs/gtkfaq.sgml: FAQ Update
July 30, 1999 Elliot Lee <sopwith@redhat.com>
* configure.in: Fix autoconf warnings about cross compilation by
trying to provide sane defaults for AC_TRY_RUN.
Fri Jul 16 22:20:21 PDT 1999 Manish Singh <yosh@gimp.org>
* ltconfig
* ltmain.sh: upgrade to libtool 1.3.3
Thu Jul 8 11:30:18 1999 Owen Taylor <otaylor@redhat.com>
* INSTALL: Indicate that the --with-glib= configure
time flag is unsupported.
Mon Jul 5 20:36:03 1999 Owen Taylor <otaylor@redhat.com>
* docs/generation.txt: Added a file that gives
documenation about the autogeneration process for
various autogenerated files.
Tue Jun 29 15:59:25 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (LIBS): Look for libgmodule in the
right location.
Thu Jun 17 13:57:31 1999 Owen Taylor <otaylor@redhat.com>
* docs/gtk_tut.sgml: Removed references to
code examples in my directory on gtk.org as
they should all be in the tutorial now.
* docs/gtk_tut.sgml: Added sources for dial-test
and scribble-xinput programs that were previously
missing.
Fri Jun 4 00:08:59 1999 Owen Taylor <otaylor@redhat.com>
* TODO: Added entry about menu keyboard navigation, removed
some finished items.
Mon May 31 00:11:24 1999 Owen Taylor <otaylor@redhat.com>
* acinclude.m4: Standardize on func_dgettext
not func_gettext, so that the checks for dgettext
actually are paid attention to.
Wed May 5 10:47:54 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (LIBS): Add $INTLLIBS into $LIBS
directly, rather than repeating the checks for
gettext.
* INSTALL: Added information about gettext and
NLS support.
* acinclude.m4 (LIBM): Check for dgettext, not
just gettext. This should hopefully fix things wrt
systems with old versions of GNU gettext installed.
Tue Jun 29 15:59:25 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (LIBS): Look for libgmodule in the
right location.
Thu Apr 1 16:58:10 PST 1999 Manish Singh <yosh@gimp.org>
* autogen.sh: add --enable-maintainer-mode
* configure.in: set ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
Wed Mar 24 23:03:49 CST 1999 Shawn T. Amundson <amundson@gtk.org>
* docs/gtk-config.1.in:
docs/Makefile.am:
configure.in: gtk-config is now generated.
* docs/gtk-config.1: Removed, now generated.
Thu Sep 23 17:59:59 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): grr, even if Gdk doesn't
handle CreateNotify itself, still put out a debuging message for
--gdk-debug=events. made the ReparentNotify debugging message more
verbose.
wrap xcoords translation for ConfigureEvents into an error trap,
a destroy event may already be pending, and in that case, the
actuall coordinate values are not at all critical.
Sat Sep 18 22:24:15 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkcc.c: Stop leaking the color_hash all over
the place. Simplify and improve the logic.
Fri Sep 17 09:57:15 1999 Tim Janik <timj@gtk.org>
* gdk/gdk.h, gdk/gdkcolor.c: make return types (gint or gboolean)
for prototypes and function implementations consistent (reported
by Tomas Ogren).
Tue Sep 14 18:23:01 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): tell if expose events have
send_event set in debugging output.
(gdk_compress_exposures): default initialize the event so we don't
operate on bogus values (namely send_event).
Thu Sep 2 16:33:59 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c: When we receive an unexpected
destroy notify on one of our windows, don't just
warn about it, also mark our windows as destroyed.
Sun Sep 5 08:10:53 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkfont.c (gdk_font_hash_insert): Add
name => font and name => fontset hashes. The
name => fontset hash is a _big_ win since we
weren't previously caching fontsets at all and loading
fontsets is expensive. The name => font hash
is less of a win, but it does save us from doing
repeated XQueryFont calls on the same font.
* gdk/gdkprivate.h (struct _GdkFontPrivate): Add a names
list so we can remove font/fontset from hash.
Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_atom_intern): Remove useless
and slightly confusing test. [ XInternAtom (,,TRUE)
will never return None ].
Sat Sep 4 08:39:26 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_set_geometry_hints)
gdk/gdkwindow.c (gdk_window_set_hints):
Don't omit setting the properties if flags == 0 -
there may be an existing set of properties there
already. (Very old bug. Would it be better to
delete the property instead?)
* gdk/gdkselection.c (gdk_selection_property_get): Fix
spelling error in comment.
Wed Sep 1 14:05:30 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkimage.c (gdk_image_new): Use gdk_error_trap_push()
to avoid stomping over gdk_error_warnings.
* gdk/gdkimage.c (gdk_image_new): compute image->bpp
as (bits_per_pixel + 7) / 8. This gives the same
result as before for multiples of 8, but actually
a "reasonable" value for 1bit or 4bit displays.
Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
* gdk/Makefile.am: minor cleanups, strip spaces on build rules for
GNU Make.
Tue Aug 17 07:43:04 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): give a debugging note when
discarding configure events.
1999-08-18 Federico Mena Quintero <federico@redhat.com>
* gdk/gdkpixmap.c (gdk_pixmap_unref): g_return_if_fail() the
refcount is greater than zero.
* gdk/gdkwindow.c (gdk_window_unref): Likewise.
* gdk/gdkfont.c (gdk_font_unref): Likewise.
* gdk/gdkgc.c (gdk_gc_unref): Likewise.
* gdk/gdkdnd.c (gdk_drag_context_unref): Likewise.
Wed Aug 11 01:04:57 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_property_get): Fix assumption
that format 32 => sizeof(item) == 4. It really is
sizeof(long).
Tue Jun 29 23:02:42 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c (gdk_x_error / gdk_x_io_error): Don't
core dump at all on X IO errors, only core dump
if --enable-debug for X errors.
Thu Jun 24 17:06:23 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): removed old ""Got event for
unknown window:" message. disabled ConfigureNotify discarding code,
because it led to events being processed out of order.
Thu Jun 24 12:22:02 1999 Tim Janik <timj@gtk.org>
* gdk/gdkglobals.c: preinitialize gdk_error_code to 0.
* gdk/gdkevents.c (gdk_event_send_client_message_to_all_recurse): since
we export this function, supress error warnings and don't reset the
error code in the first half of this function.
* gdk/gdk.c (gdk_x_error): set gdk_error_code to the actuall X error
code (instead of just -1) so gdk_error_trap_pop() reveals something
actually informative about the error that happened.
* gdk/*.c:
don't rely on gdk_error_code being -1 if an error occoured, but just
gdk_error_code != 0.
Thu Jun 24 11:50:07 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_apply_filters): advance the filter list
pointer *before* invoking the filter function, so we at least don't
crash if a filter is removed that is currently executed. window filters
*really* need to be made truely reentrant at some point.
Mon Jun 14 11:10:15 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): print the atom name in the
PropertyNotify debug messages.
Wed May 5 22:51:06 1999 Owen Taylor <otaylor@redhat.com>
Patch from Sung-Hyun Nam <namsh@lgic.co.kr>
* gdk/gdkim.c: Fix cut-and-paste errors for
x/y and PreeditAttributes/StatusAttributes.
Wed May 5 22:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_set_geometry_hints): Change
G_MAXINT to 2^16 to alleviate overflow problems in
various window managers.
Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkfont.c (gdk_text_measure): Fix the return value
for fontsets.
Wed May 5 12:42:01 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_set_geometry_hints):
Initialize size_hints.x and size_hints.y because kwm
brokenly pays attention to them.
(Bug #1181 - Lars Heete <hel@admin.de>)
Wed May 5 11:38:56 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkrgb.c (gdk_rgb_choose_visual): Free the
return value of gdk_list_visuals().
(Bug #1193 - Morten Welinder <terra@diku.dk>)
Tue May 4 11:12:56 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkim.c (gdk_im_real_open): cast the return value of
XSetIMValues to (void *) when comparing to NULL, to workaround
the problem of some compilers barfing since older X headers don't
have the prototype for it.
Mon Apr 19 10:11:12 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkcolor.c (gdk_colormap_new): Fix memory leak
for pseudocolor where colormap->colors was double
allocated.
* gdk/gdkcolor.c (gdk_colormap_alloc1): Store the
color value in the hash table with the pixel filled
in so when we do later hash table lookups, the color
value is correct.
Sun May 2 15:29:45 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkdraw.c (gdk_draw_lines): check private->destroyed before
making the call
Tue Apr 27 11:17:35 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.c (xdnd_set_{targets,actions}): Fix leak
pointed out by Morten Welinder <terra@diku.dk>.
Wed Apr 21 14:20:22 1999 George Lebl <jirka@5z.com>
* gdk/gdkwindow.c: (gdk_window_remove_filter) correctly remove the
default filter from the list
Wed Apr 21 14:20:22 1999 George Lebl <jirka@5z.com>
* gdk/gdkwindow.c: (gdk_window_remove_filter) correctly remove the
default filter from the list
Fri Apr 16 20:41:43 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdk.c: #include "gdkkeysyms.h" for gdk_XConvertCase #defines
* gtk/gtkfontsel.c (gtk_font_selection_create_xlfd): use
g_strdup_printf instead of calcing the length separately
Tue Apr 13 02:49:33 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c: removed some silly #ifdef HAVE_CONFIG
that we don't do in many other places. (Fixing duplicate
#include of config.h)
* gdk/gdkevents.c: include gdkinput.h _after_ config.h.
Otherwise, #ifndef XINPUT_NONE check in the latter
doesn't work. (Bug #546)
Sun Apr 11 14:38:03 1999 Tim Janik <timj@gtk.org>
* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): check for color
"None" case insensitive.
Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkselection.c:
Add error traps so if the other end of the connection
dies, we survive.
Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.c (gdk_drag_motion): Separate out the
dest_xid field into two fields - one for the window
to send in messages, one to indicate the last looked
up window for caching purposes. This is needed, so
that Leave messages get the correct window.
Mon Apr 5 13:21:30 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkevents.c (gdk_event_check, gdk_event_prepare):
Fix warning created by people mucking around
with the gsource API.
* gdk/gdkevents.c (gdk_io_invoke, gdk_input_add_full):
Change mapping between GIOCondition and GdkInputCondition
to match the way the Linux kernel does it. This should
fix problems where closed pipes were no longer signalling
GDK_INPUT_READ on systems with a native poll().
Mon Apr 5 17:11:57 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): Check
explicitly for the string "None" - it is in the XPM
spec and some servers treat unknown colors in odd ways
(like asking the user!)
Thu Apr 1 16:58:10 PST 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkevents.c: made "->" into a "." of previous change so
it compiles
Thu Apr 1 18:41:25 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkevents.c (gdk_compress_exposures): Set the
window field of the event structure before calling
user filters.
1999-03-31 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gdk/gdk.c (gdk_init_check): Use False as the last argument to
XInternAtom() here. This is a particularly Old And Nasty(tm) bug.
Mon Mar 29 17:31:52 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkim.c (gdk_mbstowcs): Free the value of the
intermediate text property - prevents major memory
leak when gdk_use_mb.
gtk-d3august-990311-0: Bj|rn Augustsson <d3august@dtek.chalmers.se>
Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com>
Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
gtk-a-higuti-990322-[0-3]
* gdk/gdkfont.c (gdk_text_extents_wc): Make work when
sizeof(wchar_t) != sizeof (GdkWChar)
* configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS
that was causing -DX_LOCALE not to work.
* gtk/gtkrc.c (gtk_rc_init):
X_LOCALE will never have LC_MESSAGES defined
* gdk/gdk.c (gdk_init_check):
Remove --xim-preedit and --xim-status from argv properly.
* gdk/gdkim.c (gdk_ic_real_new): Add a gdk_flush() so
that the client window is present on the X server
before we pass it to the input method.
Tue Mar 9 10:46:49 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.c (motif_find_drag_window): Fix bug where
if --display is specified on the command line, than
the drag window will not be created on that display.
Tue Mar 9 10:38:24 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_atom_intern): Fixed bug where
lookups with only_if_exists == TRUE were inserting
bogus values into the atom cache.
Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org>
* gdk/gdkselection.c (gdk_selection_property_get): first XFree(t),
then reset it to NULL.
* gdk/gdkcolor.c:
(gdk_colors_free):
(gdk_colormap_free_colors): use colormap->colors[in_pixels[i]] as the
key for g_hash_table_remove() in both functions, this prevents us
from accessing possibly uninitialized portions of a GdkColor structure
where we are only interested in its pixel value.
Tue Mar 9 01:01:28 1999 Tim Janik <timj@gtk.org>
* gdk/gdkfont.c (gdk_font_load): first lookup the xfont ID in our
font hash table, if we have a GdkFontPrivate entry for this font
already, simply increment its reference count, provided by Olaf Dietsche
<olaf.dietsche+list.gtk@netcologne.de>.
1999-09-21 Tor Lillqvist <tml@iki.fi> 1999-09-21 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdk.c (gdk_exit_func): Delete the gdk_DC when exiting, * gdk/win32/gdk.c (gdk_exit_func): Delete the gdk_DC when exiting,

View file

@ -1,3 +1,473 @@
[ Merges from gtk-1-2 ]
Wed Sep 8 07:13:29 1999 Tim Janik <timj@gtk.org>
* configure.in: fixed "GNU Make" check to pass with new make version
3.77.95.
Fri Sep 3 16:04:41 1999 Tim Janik <timj@gtk.org>
* gtk-config.in (--version): don't echo @GTK_VERSION@, but
@GTK_MAJOR_VERSION@.@GTK_MINOR_VERSION@.@GTK_MICRO_VERSION@, so the
AM_PATH_GTK() macros don't get confused by the -pre1.
Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (REBUILD): Change check for perl5
to check explicitely for v >= 5.002. (5.001
does not work with our scripts.)
Wed Aug 25 15:45:46 1999 Tim Janik <timj@gtk.org>
* configure.in: evaluate $PERL for the perl version check. added
--disable-rebuilds to give the user an option to completely disable
any source autogeneration rules.
Mon Aug 23 23:16:14 1999 Tim Janik <timj@gtk.org>
* configure.in: evaluate $ac_make when checking for GNU Make.
Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
* docs/Makefile.am: added generation.txt.
* Makefile.am: require automake 1.4, build README from README.in and
INSTALL from INSTALL.in in dist-hook.
* README.in:
* INSTALL.in: new files to autogenerate README and INSTALL from.
* configure.in: figure whether we have GNU Make
* docs/generation.txt: minor additions/corrections.
Wed Aug 11 13:38:26 BST 1999 Tony Gale <gale@gtk.org>
* docs/gtkfaq.sgml: FAQ Update
July 30, 1999 Elliot Lee <sopwith@redhat.com>
* configure.in: Fix autoconf warnings about cross compilation by
trying to provide sane defaults for AC_TRY_RUN.
Fri Jul 16 22:20:21 PDT 1999 Manish Singh <yosh@gimp.org>
* ltconfig
* ltmain.sh: upgrade to libtool 1.3.3
Thu Jul 8 11:30:18 1999 Owen Taylor <otaylor@redhat.com>
* INSTALL: Indicate that the --with-glib= configure
time flag is unsupported.
Mon Jul 5 20:36:03 1999 Owen Taylor <otaylor@redhat.com>
* docs/generation.txt: Added a file that gives
documenation about the autogeneration process for
various autogenerated files.
Tue Jun 29 15:59:25 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (LIBS): Look for libgmodule in the
right location.
Thu Jun 17 13:57:31 1999 Owen Taylor <otaylor@redhat.com>
* docs/gtk_tut.sgml: Removed references to
code examples in my directory on gtk.org as
they should all be in the tutorial now.
* docs/gtk_tut.sgml: Added sources for dial-test
and scribble-xinput programs that were previously
missing.
Fri Jun 4 00:08:59 1999 Owen Taylor <otaylor@redhat.com>
* TODO: Added entry about menu keyboard navigation, removed
some finished items.
Mon May 31 00:11:24 1999 Owen Taylor <otaylor@redhat.com>
* acinclude.m4: Standardize on func_dgettext
not func_gettext, so that the checks for dgettext
actually are paid attention to.
Wed May 5 10:47:54 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (LIBS): Add $INTLLIBS into $LIBS
directly, rather than repeating the checks for
gettext.
* INSTALL: Added information about gettext and
NLS support.
* acinclude.m4 (LIBM): Check for dgettext, not
just gettext. This should hopefully fix things wrt
systems with old versions of GNU gettext installed.
Tue Jun 29 15:59:25 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (LIBS): Look for libgmodule in the
right location.
Thu Apr 1 16:58:10 PST 1999 Manish Singh <yosh@gimp.org>
* autogen.sh: add --enable-maintainer-mode
* configure.in: set ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
Wed Mar 24 23:03:49 CST 1999 Shawn T. Amundson <amundson@gtk.org>
* docs/gtk-config.1.in:
docs/Makefile.am:
configure.in: gtk-config is now generated.
* docs/gtk-config.1: Removed, now generated.
Thu Sep 23 17:59:59 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): grr, even if Gdk doesn't
handle CreateNotify itself, still put out a debuging message for
--gdk-debug=events. made the ReparentNotify debugging message more
verbose.
wrap xcoords translation for ConfigureEvents into an error trap,
a destroy event may already be pending, and in that case, the
actuall coordinate values are not at all critical.
Sat Sep 18 22:24:15 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkcc.c: Stop leaking the color_hash all over
the place. Simplify and improve the logic.
Fri Sep 17 09:57:15 1999 Tim Janik <timj@gtk.org>
* gdk/gdk.h, gdk/gdkcolor.c: make return types (gint or gboolean)
for prototypes and function implementations consistent (reported
by Tomas Ogren).
Tue Sep 14 18:23:01 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): tell if expose events have
send_event set in debugging output.
(gdk_compress_exposures): default initialize the event so we don't
operate on bogus values (namely send_event).
Thu Sep 2 16:33:59 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c: When we receive an unexpected
destroy notify on one of our windows, don't just
warn about it, also mark our windows as destroyed.
Sun Sep 5 08:10:53 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkfont.c (gdk_font_hash_insert): Add
name => font and name => fontset hashes. The
name => fontset hash is a _big_ win since we
weren't previously caching fontsets at all and loading
fontsets is expensive. The name => font hash
is less of a win, but it does save us from doing
repeated XQueryFont calls on the same font.
* gdk/gdkprivate.h (struct _GdkFontPrivate): Add a names
list so we can remove font/fontset from hash.
Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_atom_intern): Remove useless
and slightly confusing test. [ XInternAtom (,,TRUE)
will never return None ].
Sat Sep 4 08:39:26 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_set_geometry_hints)
gdk/gdkwindow.c (gdk_window_set_hints):
Don't omit setting the properties if flags == 0 -
there may be an existing set of properties there
already. (Very old bug. Would it be better to
delete the property instead?)
* gdk/gdkselection.c (gdk_selection_property_get): Fix
spelling error in comment.
Wed Sep 1 14:05:30 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkimage.c (gdk_image_new): Use gdk_error_trap_push()
to avoid stomping over gdk_error_warnings.
* gdk/gdkimage.c (gdk_image_new): compute image->bpp
as (bits_per_pixel + 7) / 8. This gives the same
result as before for multiples of 8, but actually
a "reasonable" value for 1bit or 4bit displays.
Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
* gdk/Makefile.am: minor cleanups, strip spaces on build rules for
GNU Make.
Tue Aug 17 07:43:04 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): give a debugging note when
discarding configure events.
1999-08-18 Federico Mena Quintero <federico@redhat.com>
* gdk/gdkpixmap.c (gdk_pixmap_unref): g_return_if_fail() the
refcount is greater than zero.
* gdk/gdkwindow.c (gdk_window_unref): Likewise.
* gdk/gdkfont.c (gdk_font_unref): Likewise.
* gdk/gdkgc.c (gdk_gc_unref): Likewise.
* gdk/gdkdnd.c (gdk_drag_context_unref): Likewise.
Wed Aug 11 01:04:57 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_property_get): Fix assumption
that format 32 => sizeof(item) == 4. It really is
sizeof(long).
Tue Jun 29 23:02:42 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c (gdk_x_error / gdk_x_io_error): Don't
core dump at all on X IO errors, only core dump
if --enable-debug for X errors.
Thu Jun 24 17:06:23 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): removed old ""Got event for
unknown window:" message. disabled ConfigureNotify discarding code,
because it led to events being processed out of order.
Thu Jun 24 12:22:02 1999 Tim Janik <timj@gtk.org>
* gdk/gdkglobals.c: preinitialize gdk_error_code to 0.
* gdk/gdkevents.c (gdk_event_send_client_message_to_all_recurse): since
we export this function, supress error warnings and don't reset the
error code in the first half of this function.
* gdk/gdk.c (gdk_x_error): set gdk_error_code to the actuall X error
code (instead of just -1) so gdk_error_trap_pop() reveals something
actually informative about the error that happened.
* gdk/*.c:
don't rely on gdk_error_code being -1 if an error occoured, but just
gdk_error_code != 0.
Thu Jun 24 11:50:07 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_apply_filters): advance the filter list
pointer *before* invoking the filter function, so we at least don't
crash if a filter is removed that is currently executed. window filters
*really* need to be made truely reentrant at some point.
Mon Jun 14 11:10:15 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): print the atom name in the
PropertyNotify debug messages.
Wed May 5 22:51:06 1999 Owen Taylor <otaylor@redhat.com>
Patch from Sung-Hyun Nam <namsh@lgic.co.kr>
* gdk/gdkim.c: Fix cut-and-paste errors for
x/y and PreeditAttributes/StatusAttributes.
Wed May 5 22:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_set_geometry_hints): Change
G_MAXINT to 2^16 to alleviate overflow problems in
various window managers.
Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkfont.c (gdk_text_measure): Fix the return value
for fontsets.
Wed May 5 12:42:01 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_set_geometry_hints):
Initialize size_hints.x and size_hints.y because kwm
brokenly pays attention to them.
(Bug #1181 - Lars Heete <hel@admin.de>)
Wed May 5 11:38:56 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkrgb.c (gdk_rgb_choose_visual): Free the
return value of gdk_list_visuals().
(Bug #1193 - Morten Welinder <terra@diku.dk>)
Tue May 4 11:12:56 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkim.c (gdk_im_real_open): cast the return value of
XSetIMValues to (void *) when comparing to NULL, to workaround
the problem of some compilers barfing since older X headers don't
have the prototype for it.
Mon Apr 19 10:11:12 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkcolor.c (gdk_colormap_new): Fix memory leak
for pseudocolor where colormap->colors was double
allocated.
* gdk/gdkcolor.c (gdk_colormap_alloc1): Store the
color value in the hash table with the pixel filled
in so when we do later hash table lookups, the color
value is correct.
Sun May 2 15:29:45 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkdraw.c (gdk_draw_lines): check private->destroyed before
making the call
Tue Apr 27 11:17:35 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.c (xdnd_set_{targets,actions}): Fix leak
pointed out by Morten Welinder <terra@diku.dk>.
Wed Apr 21 14:20:22 1999 George Lebl <jirka@5z.com>
* gdk/gdkwindow.c: (gdk_window_remove_filter) correctly remove the
default filter from the list
Wed Apr 21 14:20:22 1999 George Lebl <jirka@5z.com>
* gdk/gdkwindow.c: (gdk_window_remove_filter) correctly remove the
default filter from the list
Fri Apr 16 20:41:43 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdk.c: #include "gdkkeysyms.h" for gdk_XConvertCase #defines
* gtk/gtkfontsel.c (gtk_font_selection_create_xlfd): use
g_strdup_printf instead of calcing the length separately
Tue Apr 13 02:49:33 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c: removed some silly #ifdef HAVE_CONFIG
that we don't do in many other places. (Fixing duplicate
#include of config.h)
* gdk/gdkevents.c: include gdkinput.h _after_ config.h.
Otherwise, #ifndef XINPUT_NONE check in the latter
doesn't work. (Bug #546)
Sun Apr 11 14:38:03 1999 Tim Janik <timj@gtk.org>
* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): check for color
"None" case insensitive.
Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkselection.c:
Add error traps so if the other end of the connection
dies, we survive.
Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.c (gdk_drag_motion): Separate out the
dest_xid field into two fields - one for the window
to send in messages, one to indicate the last looked
up window for caching purposes. This is needed, so
that Leave messages get the correct window.
Mon Apr 5 13:21:30 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkevents.c (gdk_event_check, gdk_event_prepare):
Fix warning created by people mucking around
with the gsource API.
* gdk/gdkevents.c (gdk_io_invoke, gdk_input_add_full):
Change mapping between GIOCondition and GdkInputCondition
to match the way the Linux kernel does it. This should
fix problems where closed pipes were no longer signalling
GDK_INPUT_READ on systems with a native poll().
Mon Apr 5 17:11:57 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): Check
explicitly for the string "None" - it is in the XPM
spec and some servers treat unknown colors in odd ways
(like asking the user!)
Thu Apr 1 16:58:10 PST 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkevents.c: made "->" into a "." of previous change so
it compiles
Thu Apr 1 18:41:25 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkevents.c (gdk_compress_exposures): Set the
window field of the event structure before calling
user filters.
1999-03-31 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gdk/gdk.c (gdk_init_check): Use False as the last argument to
XInternAtom() here. This is a particularly Old And Nasty(tm) bug.
Mon Mar 29 17:31:52 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkim.c (gdk_mbstowcs): Free the value of the
intermediate text property - prevents major memory
leak when gdk_use_mb.
gtk-d3august-990311-0: Bj|rn Augustsson <d3august@dtek.chalmers.se>
Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com>
Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
gtk-a-higuti-990322-[0-3]
* gdk/gdkfont.c (gdk_text_extents_wc): Make work when
sizeof(wchar_t) != sizeof (GdkWChar)
* configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS
that was causing -DX_LOCALE not to work.
* gtk/gtkrc.c (gtk_rc_init):
X_LOCALE will never have LC_MESSAGES defined
* gdk/gdk.c (gdk_init_check):
Remove --xim-preedit and --xim-status from argv properly.
* gdk/gdkim.c (gdk_ic_real_new): Add a gdk_flush() so
that the client window is present on the X server
before we pass it to the input method.
Tue Mar 9 10:46:49 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.c (motif_find_drag_window): Fix bug where
if --display is specified on the command line, than
the drag window will not be created on that display.
Tue Mar 9 10:38:24 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_atom_intern): Fixed bug where
lookups with only_if_exists == TRUE were inserting
bogus values into the atom cache.
Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org>
* gdk/gdkselection.c (gdk_selection_property_get): first XFree(t),
then reset it to NULL.
* gdk/gdkcolor.c:
(gdk_colors_free):
(gdk_colormap_free_colors): use colormap->colors[in_pixels[i]] as the
key for g_hash_table_remove() in both functions, this prevents us
from accessing possibly uninitialized portions of a GdkColor structure
where we are only interested in its pixel value.
Tue Mar 9 01:01:28 1999 Tim Janik <timj@gtk.org>
* gdk/gdkfont.c (gdk_font_load): first lookup the xfont ID in our
font hash table, if we have a GdkFontPrivate entry for this font
already, simply increment its reference count, provided by Olaf Dietsche
<olaf.dietsche+list.gtk@netcologne.de>.
1999-09-21 Tor Lillqvist <tml@iki.fi> 1999-09-21 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdk.c (gdk_exit_func): Delete the gdk_DC when exiting, * gdk/win32/gdk.c (gdk_exit_func): Delete the gdk_DC when exiting,

51
INSTALL
View file

@ -7,12 +7,12 @@ you got this package.
Simple install procedure Simple install procedure
======================== ========================
% gzip -cd gtk+-1.2.0.tar.gz | tar xvf - # unpack the sources % gzip -cd gtk+-1.2.5.tar.gz | tar xvf - # unpack the sources
% cd gtk+-1.2.0 # change to the toplevel directory % cd gtk+-1.2.5 # change to the toplevel directory
% ./configure # run the `configure' script % ./configure # run the `configure' script
% make # build GTK % make # build GTK
[ Become root if necessary ] [ Become root if necessary ]
% make install # install GTK % make install # install GTK
The Nitty-Gritty The Nitty-Gritty
================ ================
@ -43,6 +43,13 @@ which form of support to use:
For more information, follow the link from http://www.gtk.org For more information, follow the link from http://www.gtk.org
* --disable-nls do not use Native Language Support
If this flag is not specified, GTK+ will try to find
and use the gettext() set of functions to provide translations
of the strings in the standard dialogs into the
user's native language.
* --enable-xim support XIM [default=yes] * --enable-xim support XIM [default=yes]
Specifying --disable-xim will disable support for entering Specifying --disable-xim will disable support for entering
@ -50,7 +57,7 @@ internationalized text using X Input Methods. This will give some
slight savings in speed and memory use and might be necessary slight savings in speed and memory use and might be necessary
with older versions of X. with older versions of X.
* --with-locale=LOCALE locale name you want to use * --with-locale=LOCALE locale name you want to use
The --with-locale options is used to determine if your operating The --with-locale options is used to determine if your operating
system has support for the locale you will be using. If not, X's system has support for the locale you will be using. If not, X's
@ -84,19 +91,43 @@ or,
setenv CFLAGS -O2 ; ./configure # csh and variants setenv CFLAGS -O2 ; ./configure # csh and variants
Native-Language Support and gettext()
=====================================
Using an uninstalled copy of GLIB To provide native-language support (NLS) GTK+ uses the
================================= gettext() set of functions. These functions are found
in the C library on many systems, such as the Solaris
C library and the GNU C Library, version 2.
If your C library does not provide the necessary functionality,
you may wish to install the GNU gettext package. You'll
need version 0.10.35 or better. Version 0.10.35 is
available from ftp://alpha.gnu.org/pub/gnu
Generally, GTK+ will properly detect what is installed
on your system and enable or disable NLS as appropriate.
However, in rare cases, it may be necessary to disable
NLS manually to get GTK+ to compile. You can do this
by specifying the --disable-nls flag when configuring
GTK+.
Using an uninstalled copy of GLIB [ Unsupported ]
=================================================
You can compile GTK+ against a copy of GLIB that you have not You can compile GTK+ against a copy of GLIB that you have not
yet installed. To do this, give the --with-glib=DIR options yet installed. To do this, give the --with-glib=DIR options
to ./configure. For instance: to ./configure. For instance:
./configure --with-glib=../glib-1.2.0 ./configure --with-glib=../glib-1.2.5
This, however, will not work if you built GLIB with different This, however, will not work if you built GLIB with different
source and build directories. source and build directories.
It is recommended that you install GLIB before compiling
GTK+. The --with-glib option is not regularly tested
and may not function correctly. In addition,
inter-library dependencies won't be generated when
using --with-glib=.
Installation directories Installation directories
======================== ========================
@ -126,7 +157,7 @@ For complete details, see the file docs/gtk-config.txt
Notes for using XIM support for Japanese input Notes for using XIM support for Japanese input
============================================== ==============================================
* There is a bug in older versions of kinput2 that will cause GTK * There is a bug in older versions of kinput2 that will cause GTK+
to hang when destroying a text entry. The latest versions of to hang when destroying a text entry. The latest versions of
kinput is available from: kinput is available from:

View file

@ -1,10 +1,13 @@
## Process this file with automake to produce Makefile.in ## Makefile.am for GTK+
SRC_SUBDIRS = gdk gtk SRC_SUBDIRS = gdk gtk
SUBDIRS = po $(SRC_SUBDIRS) docs SUBDIRS = po $(SRC_SUBDIRS) docs
bin_SCRIPTS = gtk-config bin_SCRIPTS = gtk-config
# require automake 1.4
AUTOMAKE_OPTIONS = 1.4
EXTRA_DIST = \ EXTRA_DIST = \
HACKING \ HACKING \
gtk+.spec.in \ gtk+.spec.in \
@ -97,8 +100,14 @@ EXTRA_DIST = \
examples/spinbutton/Makefile \ examples/spinbutton/Makefile \
examples/find-examples.sh examples/find-examples.sh
dist-hook: dist-hook: gtk+.spec
cp gtk+.spec $(distdir) if test -e $(srcdir)/INSTALL.in && test -e $(srcdir)/README.in ; then \
CONFIG_FILES="INSTALL:$(srcdir)/INSTALL.in README:$(srcdir)/README.in" \
CONFIG_HEADERS= \
$(SHELL) config.status \
&& cp INSTALL README $(distdir) ; \
fi \
&& cp gtk+.spec $(distdir)
m4datadir = $(datadir)/aclocal m4datadir = $(datadir)/aclocal
m4data_DATA = gtk.m4 m4data_DATA = gtk.m4

16
TODO
View file

@ -12,21 +12,14 @@ Outstanding items:
* Make all widget attributes configurable after the widget is created (timj). * Make all widget attributes configurable after the widget is created (timj).
* Radio buttons need to display CAN/HAS_DEFAULT correctly, if draw_inidicator * Radio buttons need to display CAN/HAS_DEFAULT correctly, if draw_inidicator
is TRUE. is TRUE. (Radio buttons do not need to CAN_DEFAULT! OWT)
* gdk_expose_compress: ala-Xt, this would really help for opaque moves and * More dialogs: Print, maybe others...
such
* More dialogs: Print, GtkFontSelector, maybe others...
* make the gtk_main callbacks consistent in their add/remove behaviour. * make the gtk_main callbacks consistent in their add/remove behaviour.
* Check return values on all calls to XIC[Get/Set]Values * Check return values on all calls to XIC[Get/Set]Values
* Rewrite the interface to the i18n stuff so GTK widgets don't need to
retrieve X values, and so they don't have to know the value of the
XNxxx character constants.
* The "--geometry" option should be supported * The "--geometry" option should be supported
- Having gdk_init() parse the geometry option. (putting it into - Having gdk_init() parse the geometry option. (putting it into
@ -70,6 +63,11 @@ Outstanding items:
cause confusing presses to be sent to containers that actually cause confusing presses to be sent to containers that actually
want to get events on themselves. want to get events on themselves.
* The menu code should skip separators during keyboard navigation,
whether they are sensitive or insensitive.
* OwnerButtonPressGrab needs to go!
Text/Edit widget: Text/Edit widget:
Bugs: Bugs:

View file

@ -473,22 +473,22 @@ AC_DEFUN(AM_GTK_WITH_NLS,
CATOBJEXT=NONE CATOBJEXT=NONE
AC_CHECK_HEADER(libintl.h, AC_CHECK_HEADER(libintl.h,
[AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc, [AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
[AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")], [AC_TRY_LINK([#include <libintl.h>], [return (int) dgettext ("","")],
gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)]) gt_cv_func_dgettext_libc=yes, gt_cv_func_dgettext_libc=no)])
if test "$gt_cv_func_gettext_libc" != "yes"; then if test "$gt_cv_func_dgettext_libc" != "yes"; then
AC_CHECK_LIB(intl, bindtextdomain, AC_CHECK_LIB(intl, bindtextdomain,
[AC_CACHE_CHECK([for gettext in libintl], [AC_CACHE_CHECK([for dgettext in libintl],
gt_cv_func_gettext_libintl, gt_cv_func_dgettext_libintl,
[AC_CHECK_LIB(intl, gettext, [AC_CHECK_LIB(intl, dgettext,
gt_cv_func_gettext_libintl=yes, gt_cv_func_dgettext_libintl=yes,
gt_cv_func_gettext_libintl=no)], gt_cv_func_dgettext_libintl=no)],
gt_cv_func_gettext_libintl=no)]) gt_cv_func_dgettext_libintl=no)])
fi fi
if test "$gt_cv_func_gettext_libc" = "yes" \ if test "$gt_cv_func_dgettext_libc" = "yes" \
|| test "$gt_cv_func_gettext_libintl" = "yes"; then || test "$gt_cv_func_dgettext_libintl" = "yes"; then
AC_DEFINE(HAVE_GETTEXT) AC_DEFINE(HAVE_GETTEXT)
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
@ -508,8 +508,8 @@ AC_DEFUN(AM_GTK_WITH_NLS,
fi fi
# Added by Martin Baulig 12/15/98 for libc5 systems # Added by Martin Baulig 12/15/98 for libc5 systems
if test "$gt_cv_func_gettext_libc" != "yes" \ if test "$gt_cv_func_dgettext_libc" != "yes" \
&& test "$gt_cv_func_gettext_libintl" = "yes"; then && test "$gt_cv_func_dgettext_libintl" = "yes"; then
INTLLIBS=-lintl INTLLIBS=-lintl
LIBS=`echo $LIBS | sed -e 's/-lintl//'` LIBS=`echo $LIBS | sed -e 's/-lintl//'`
fi fi

View file

@ -80,7 +80,7 @@ automake -a $am_opt
autoconf autoconf
cd $ORIGDIR cd $ORIGDIR
$srcdir/configure "$@" $srcdir/configure --enable-maintainer-mode "$@"
echo echo
echo "Now type 'make' to compile $PROJECT." echo "Now type 'make' to compile $PROJECT."

View file

@ -95,6 +95,7 @@ AC_ARG_ENABLE(xim, [ --enable-xim support XIM [default=yes]],
, enable_xim="yes") , enable_xim="yes")
AC_ARG_ENABLE(xim_inst, [ --disable-xim-inst does not use xim instantiate callback], AC_ARG_ENABLE(xim_inst, [ --disable-xim-inst does not use xim instantiate callback],
, enable_xim_inst="maybe") , enable_xim_inst="maybe")
AC_ARG_ENABLE(rebuilds, [ --disable-rebuilds disable all source autogeneration rules],,enable_rebuilds=yes)
AC_ARG_WITH(locale, [ --with-locale=LOCALE locale name you want to use ]) AC_ARG_WITH(locale, [ --with-locale=LOCALE locale name you want to use ])
AC_ARG_WITH(xinput, [ --with-xinput=[no/gxi/xfree] support XInput ]) AC_ARG_WITH(xinput, [ --with-xinput=[no/gxi/xfree] support XInput ])
@ -143,7 +144,10 @@ if test "x$GCC" = "xyes"; then
fi fi
changequote([,])dnl changequote([,])dnl
# define a MAINT-like variable REBUILD which is set if Perl # Honor aclocal flags
ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
# define a MAINT-like variable REBUILD which is set if Perl
# and awk are found, so autogenerated sources can be rebuilt # and awk are found, so autogenerated sources can be rebuilt
AC_PROG_AWK AC_PROG_AWK
@ -153,22 +157,34 @@ AC_CHECK_PROGS(PERL, perl5 perl)
AC_CHECK_PROG(INDENT, indent, indent) AC_CHECK_PROG(INDENT, indent, indent)
REBUILD=\# REBUILD=\#
if test -n "$PERL" && perl -v | grep 'version 5.' > /dev/null ; then if test "x$enable_rebuilds" = "xyes" && \
if test -n "$AWK" ; then test -n "$PERL" && \
REBUILD= $PERL -e 'exit !($] >= 5.002)' > /dev/null 2>&1 && \
fi test -n "$AWK" ; then
REBUILD=
fi fi
AC_SUBST(REBUILD) AC_SUBST(REBUILD)
AC_CHECK_FUNCS(lstat) AC_CHECK_FUNCS(lstat)
AC_MSG_CHECKING(whether make is GNU Make)
STRIP_BEGIN=
STRIP_END=
if $ac_make --version 2>/dev/null | grep '^GNU Make ' >/dev/null ; then
STRIP_BEGIN='$(strip'
STRIP_END=')'
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
AC_SUBST(STRIP_BEGIN)
AC_SUBST(STRIP_END)
# i18n stuff # i18n stuff
ALL_LINGUAS="ca cs da de el es et eu fr ga hr hu it ja ko nl no pl pt pt_BR ru sk sl sv wa zh_TW.Big5" ALL_LINGUAS="ca cs da de el es et eu fi fr ga hr hu it ja ko nl no pl pt pt_BR ru sk sl sv wa zh_TW.Big5"
AM_GTK_GNU_GETTEXT AM_GTK_GNU_GETTEXT
AC_CHECK_FUNC(gettext, LIBS="$LIBS $INTLLIBS"
,
AC_CHECK_LIB(intl, gettext)
)
# AM_GTK_GNU_GETTEXT above substs $DATADIRNAME # AM_GTK_GNU_GETTEXT above substs $DATADIRNAME
# this is the directory where the *.{mo,gmo} files are installed # this is the directory where the *.{mo,gmo} files are installed
gtklocaledir='${prefix}/${DATADIRNAME}/locale' gtklocaledir='${prefix}/${DATADIRNAME}/locale'
@ -596,11 +612,13 @@ fi
AC_OUTPUT([ AC_OUTPUT([
gtk+.spec gtk+.spec
docs/gtk-config.1
Makefile Makefile
gtk-config gtk-config
po/Makefile.in po/Makefile.in
docs/Makefile docs/Makefile
gdk/Makefile gdk/Makefile
gtk/Makefile gtk/Makefile
gtk/gtkfeatures.h
gtk/gtkcompat.h gtk/gtkcompat.h
], [chmod +x gtk-config]) ], [chmod +x gtk-config])

View file

@ -101,36 +101,7 @@ FAQ_FILES=html/gtkfaq.html \
html/gtkfaq-7.html \ html/gtkfaq-7.html \
text/gtkfaq.txt text/gtkfaq.txt
EXTRA_DIST = \ html/gtk_tut_table.gif: gdk.html gtk.html
gtk-config.1 \
texinfo.tex \
macros.texi \
gtkdocs_fix \
gtkfaq.sgml \
gtk-config.txt \
gtk_tut.sgml \
gtk_tut_it.sgml \
gtk_tut_fr.sgml \
debugging.txt \
developers.txt \
refcounting.txt \
styles.txt \
text_widget.txt \
widget_system.txt \
gtk_tut_packbox1.gif \
gtk_tut_packbox2.gif \
html/gtk_tut_table.gif \
html/gtk_tut_packbox1.gif \
html/gtk_tut_packbox2.gif \
gtk_tut_table.gif \
html/gdk.html \
html/gdk_toc.html \
html/gtk.html \
html/gtk_toc.html \
$(TUTORIAL_FILES) \
$(TUTORIAL_FR_FILES) \
$(TUTORIAL_IT_FILES) \
$(FAQ_FILES)
.PHONY: html htmldir faq tutorial tutorial_it tutorial_fr files .PHONY: html htmldir faq tutorial tutorial_it tutorial_fr files
@ -195,3 +166,36 @@ files:
@files=`ls $(DISTFILES) 2> /dev/null `; for p in $$files; do \ @files=`ls $(DISTFILES) 2> /dev/null `; for p in $$files; do \
echo $$p; \ echo $$p; \
done done
EXTRA_DIST += \
Changes-1.2.txt \
debugging.txt \
developers.txt \
refcounting.txt \
styles.txt \
text_widget.txt \
widget_system.txt \
generation.txt \
gtk-config.txt \
gtk-config.1.in \
texinfo.tex \
macros.texi \
gtkdocs_fix \
gtkfaq.sgml \
gtk_tut.sgml \
gtk_tut_it.sgml \
gtk_tut_fr.sgml \
gtk_tut_packbox1.gif \
gtk_tut_packbox2.gif \
html/gtk_tut_table.gif \
html/gtk_tut_packbox1.gif \
html/gtk_tut_packbox2.gif \
gtk_tut_table.gif \
html/gdk.html \
html/gdk_toc.html \
html/gtk.html \
html/gtk_toc.html \
$(TUTORIAL_FILES) \
$(TUTORIAL_FR_FILES) \
$(TUTORIAL_IT_FILES) \
$(FAQ_FILES)

View file

@ -1,4 +1,4 @@
.TH GTK+ 1 "25 October 1998" Version 1.2.0 .TH GTK+ 1 "25 October 1998" Version 1.3.0
.SH NAME .SH NAME
gtk-config - script to get information about the installed version of GTK+ gtk-config - script to get information about the installed version of GTK+
.SH SYNOPSIS .SH SYNOPSIS

49
docs/gtk-config.1.in Normal file
View file

@ -0,0 +1,49 @@
.TH GTK+ 1 "25 October 1998" Version @VERSION@
.SH NAME
gtk-config - script to get information about the installed version of GTK+
.SH SYNOPSIS
.B gtk-config
[\-\-prefix\fI[=DIR]\fP] [\-\-exec\-prefix\fI[=DIR]\fP] [\-\-version] [\-\-libs] [\-\-cflags]
.SH DESCRIPTION
.PP
\fIgtk-config\fP is a tool that is used to configure to determine
the compiler and linker flags that should be used to compile
and link programs that use \fIGTK+\fP. It is also used internally
to the .m4 macros for GNU autoconf that are included with \fIGTK+\fP.
.
.SH OPTIONS
.l
\fIgtk-config\fP accepts the following options:
.TP 8
.B \-\-version
Print the currently installed version of \fIGTK+\fP on the standard output.
.TP 8
.B \-\-libs
Print the linker flags that are necessary to link a \fIGTK+\fP program.
.TP 8
.B \-\-cflags
Print the compiler flags that are necessary to compile a \fIGTK+\fP program.
.TP 8
.B \-\-prefix=PREFIX
If specified, use PREFIX instead of the installation prefix that \fIGTK+\fP
was built with when computing the output for the \-\-cflags and
\-\-libs options. This option is also used for the exec prefix
if \-\-exec\-prefix was not specified. This option must be specified
before any \-\-libs or \-\-cflags options.
.TP 8
.B \-\-exec\-prefix=PREFIX
If specified, use PREFIX instead of the installation exec prefix that
\fIGTK+\fP was built with when computing the output for the \-\-cflags
and \-\-libs options. This option must be specified before any
\-\-libs or \-\-cflags options.
.SH SEE ALSO
.BR gimp (1),
.BR gimptool (1)
.SH COPYRIGHT
Copyright \(co 1998 Owen Taylor
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation.

504
gdk/COPYING Normal file
View file

@ -0,0 +1,504 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.
When we speak of free software, we are referring to freedom of use,
not price. Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard. To achieve this, non-free programs must be
allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!

View file

@ -1,21 +1,47 @@
## Process this file with automake to produce Makefile.in ## Makefile.am for gtk+/gdk
gdkincludedir = $(includedir)/gdk INCLUDES = @STRIP_BEGIN@ \
lib_LTLIBRARIES = libgdk.la
INCLUDES = \
-DG_LOG_DOMAIN=\"Gdk\" \ -DG_LOG_DOMAIN=\"Gdk\" \
-I$(top_srcdir) \ -I$(top_srcdir) \
@GTK_DEBUG_FLAGS@ \ @GTK_DEBUG_FLAGS@ \
@GTK_XIM_FLAGS@ \ @GTK_XIM_FLAGS@ \
@GTK_LOCALE_FLAGS@ \ @GTK_LOCALE_FLAGS@ \
@GLIB_CFLAGS@ \ @GLIB_CFLAGS@ \
@x_cflags@ @x_cflags@ \
@STRIP_END@
libgdk_la_SOURCES = \ #
# libraries to compile and install
#
lib_LTLIBRARIES = libgdk.la
# libtool stuff: set version and export symbols for resolving
libgdkincludedir = $(includedir)/gdk
libgdk_la_LDFLAGS = @STRIP_BEGIN@ \
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
-release $(LT_RELEASE) \
-export-dynamic \
@GLIB_DEPLIBS@ \
@x_ldflags@ \
@x_libs@ \
-lm \
@STRIP_END@
#
# setup source file variables
#
# GDK header files for public installation (non-generated)
gdk_public_h_sources = @STRIP_BEGIN@ \
gdk.h \
gdkcursors.h \
gdkrgb.h \
gdki18n.h \
gdkkeysyms.h \
gdkprivate.h \
gdktypes.h \
gdkx.h \
@STRIP_END@
gdk_c_sources = @STRIP_BEGIN@ \
gdk.c \ gdk.c \
gdkcc.c \ gdkcc.c \
gdkcolor.c \ gdkcolor.c \
@ -46,34 +72,35 @@ libgdk_la_SOURCES = \
MwmUtil.h \ MwmUtil.h \
gxid_lib.h \ gxid_lib.h \
gxid_proto.h \ gxid_proto.h \
gxid_lib.c gxid_lib.c \
## this last one is ifdef'd out unless XINPUT_GXI is defined @STRIP_END@
## It's easier than trying to get automake to handle compiling
## it conditionally
gdkinclude_HEADERS = \ #
gdk.h \ # setup GDK sources and their dependancies
gdkcursors.h \ #
gdkrgb.h \ libgdkinclude_HEADERS = $(gdk_public_h_sources)
gdki18n.h \ libgdk_la_SOURCES = $(gdk_c_sources)
gdkkeysyms.h \ MAINTAINERCLEANFILES +=
gdkprivate.h \ EXTRA_HEADERS +=
gdktypes.h \ EXTRA_DIST +=
gdkx.h EXTRA_DIST +=
LDADDS = \ #
@x_ldflags@ \ # rules to generate built sources
@x_libs@ \ #
@GLIB_LIBS@ \ # we only need to remake these headers once a new X version is released
-lm X-derived-headers:
sed -e 's/^#define[ ]*XC\([^ ]*\)[ ]*\([^ ]*\)[ ]*.*$$/GDK\1 = \2,/' \
libgdk_la_LDFLAGS = \ -e 'tb' -e 'd' -e ':b' \
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) -release $(LT_RELEASE) \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \
@GLIB_DEPLIBS@ \ < @x_includes@/X11/cursorfont.h > gdkcursors.h ; \
@x_ldflags@ \ sed -e 's/^#define[ ]*XK\([^ ]*\)[ ]*\([^ ]*\)[ ]*.*$$/#define GDK\1 \2/' \
@x_libs@ \ -e 'tb' -e 'd' -e ':b' -e 's/ 0X/ 0x/' \
-lm < @x_includes@/X11/keysymdef.h > gdkkeysyms.h
#
# Rule to install gdkconfig.h header file
#
configexecincludedir = $(pkglibdir)/include configexecincludedir = $(pkglibdir)/include
#configexecinclude_DATA = gdkconfig.h #configexecinclude_DATA = gdkconfig.h
install-exec-local: gdkconfig.h install-exec-local: gdkconfig.h
@ -90,22 +117,20 @@ stamp-gc-h: ../config.status
cd .. && CONFIG_FILES= CONFIG_HEADERS= CONFIG_OTHER=gdk/gdkconfig.h ./config.status cd .. && CONFIG_FILES= CONFIG_HEADERS= CONFIG_OTHER=gdk/gdkconfig.h ./config.status
echo timestamp > stamp-gc-h echo timestamp > stamp-gc-h
#
# extra programs
#
EXTRA_PROGRAMS = gxid EXTRA_PROGRAMS = gxid
bin_PROGRAMS = @xinput_progs@ bin_PROGRAMS = @xinput_progs@
LDADDS = @STRIP_BEGIN@ \
@x_ldflags@ \
@x_libs@ \
@GLIB_LIBS@ \
-lm \
@STRIP_END@
gxid_SOURCES = gxid.c gxid_SOURCES = gxid.c
gxid_LDADD = $(LDADDS) gxid_LDADD = $(LDADDS)
X-derived-headers:
sed -e 's/^#define[ ]*XC\([^ ]*\)[ ]*\([^ ]*\)[ ]*.*$$/GDK\1 = \2,/' \
-e 'tb' -e 'd' -e ':b' \
-e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \
< @x_includes@/X11/cursorfont.h > gdkcursors.h ; \
sed -e 's/^#define[ ]*XK\([^ ]*\)[ ]*\([^ ]*\)[ ]*.*$$/#define GDK\1 \2/' \
-e 'tb' -e 'd' -e ':b' -e 's/ 0X/ 0x/' \
< @x_includes@/X11/keysymdef.h > gdkkeysyms.h
.PHONY: files .PHONY: files

View file

@ -31,6 +31,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <limits.h> #include <limits.h>
#include <errno.h>
#ifdef HAVE_SYS_SELECT_H #ifdef HAVE_SYS_SELECT_H
#include <sys/select.h> #include <sys/select.h>
@ -48,6 +49,7 @@
#include "gdkinput.h" #include "gdkinput.h"
#include "gdkx.h" #include "gdkx.h"
#include "gdki18n.h" #include "gdki18n.h"
#include "gdkkeysyms.h"
#ifndef X_GETTIMEOFDAY #ifndef X_GETTIMEOFDAY
#define X_GETTIMEOFDAY(tv) gettimeofday (tv, NULL) #define X_GETTIMEOFDAY(tv) gettimeofday (tv, NULL)
@ -333,6 +335,7 @@ gdk_init_check (int *argc,
gdk_im_set_best_style (GDK_IM_PREEDIT_POSITION); gdk_im_set_best_style (GDK_IM_PREEDIT_POSITION);
else if (strcmp ("callbacks", (*argv)[i]) == 0) else if (strcmp ("callbacks", (*argv)[i]) == 0)
gdk_im_set_best_style (GDK_IM_PREEDIT_CALLBACKS); gdk_im_set_best_style (GDK_IM_PREEDIT_CALLBACKS);
(*argv)[i] = NULL;
} }
} }
else if (strcmp ("--xim-status", (*argv)[i]) == 0) else if (strcmp ("--xim-status", (*argv)[i]) == 0)
@ -348,6 +351,7 @@ gdk_init_check (int *argc,
gdk_im_set_best_style (GDK_IM_STATUS_AREA); gdk_im_set_best_style (GDK_IM_STATUS_AREA);
else if (strcmp ("callbacks", (*argv)[i]) == 0) else if (strcmp ("callbacks", (*argv)[i]) == 0)
gdk_im_set_best_style (GDK_IM_STATUS_CALLBACKS); gdk_im_set_best_style (GDK_IM_STATUS_CALLBACKS);
(*argv)[i] = NULL;
} }
} }
#endif #endif
@ -406,9 +410,9 @@ gdk_init_check (int *argc,
g_free(argv_orig[i]); g_free(argv_orig[i]);
g_free(argv_orig); g_free(argv_orig);
gdk_wm_delete_window = XInternAtom (gdk_display, "WM_DELETE_WINDOW", True); gdk_wm_delete_window = XInternAtom (gdk_display, "WM_DELETE_WINDOW", False);
gdk_wm_take_focus = XInternAtom (gdk_display, "WM_TAKE_FOCUS", True); gdk_wm_take_focus = XInternAtom (gdk_display, "WM_TAKE_FOCUS", False);
gdk_wm_protocols = XInternAtom (gdk_display, "WM_PROTOCOLS", True); gdk_wm_protocols = XInternAtom (gdk_display, "WM_PROTOCOLS", False);
gdk_wm_window_protocols[0] = gdk_wm_delete_window; gdk_wm_window_protocols[0] = gdk_wm_delete_window;
gdk_wm_window_protocols[1] = gdk_wm_take_focus; gdk_wm_window_protocols[1] = gdk_wm_take_focus;
gdk_selection_property = XInternAtom (gdk_display, "GDK_SELECTION", False); gdk_selection_property = XInternAtom (gdk_display, "GDK_SELECTION", False);
@ -1032,20 +1036,35 @@ static int
gdk_x_error (Display *display, gdk_x_error (Display *display,
XErrorEvent *error) XErrorEvent *error)
{ {
char buf[64]; if (error->error_code)
if (gdk_error_warnings)
{ {
XGetErrorText (display, error->error_code, buf, 63); if (gdk_error_warnings)
g_error ("%s\n serial %ld error_code %d request_code %d minor_code %d\n", {
buf, char buf[64];
error->serial,
error->error_code, XGetErrorText (display, error->error_code, buf, 63);
error->request_code,
error->minor_code); #ifdef G_ENABLE_DEBUG
g_error ("%s\n serial %ld error_code %d request_code %d minor_code %d\n",
buf,
error->serial,
error->error_code,
error->request_code,
error->minor_code);
#else /* !G_ENABLE_DEBUG */
fprintf (stderr, "Gdk-ERROR **: %s\n serial %ld error_code %d request_code %d minor_code %d\n",
buf,
error->serial,
error->error_code,
error->request_code,
error->minor_code);
exit(1);
#endif /* G_ENABLE_DEBUG */
}
gdk_error_code = error->error_code;
} }
gdk_error_code = -1;
return 0; return 0;
} }
@ -1071,8 +1090,27 @@ gdk_x_error (Display *display,
static int static int
gdk_x_io_error (Display *display) gdk_x_io_error (Display *display)
{ {
g_error ("an x io error occurred"); /* This is basically modelled after the code in XLib. We need
return 0; * an explicit error handler here, so we can disable our atexit()
* which would otherwise cause a nice segfault.
* We fprintf(stderr, instead of g_warning() because g_warning()
* could possibly be redirected to a dialog
*/
if (errno == EPIPE)
{
fprintf (stderr, "Gdk-ERROR **: X connection to %s broken (explicit kill or server shutdown).\n", gdk_display ? DisplayString (gdk_display) : gdk_get_display());
}
else
{
fprintf (stderr, "Gdk-ERROR **: Fatal IO error %d (%s) on X server %s.\n",
errno, g_strerror (errno),
gdk_display ? DisplayString (gdk_display) : gdk_get_display());
}
/* Disable the atexit shutdown for GDK */
gdk_initialized = 0;
exit(1);
} }
gchar * gchar *
@ -1104,7 +1142,7 @@ gdk_error_trap_push (void)
} }
else else
{ {
node = g_slist_alloc(); node = g_slist_alloc ();
node->data = g_new (GdkErrorTrap, 1); node->data = g_new (GdkErrorTrap, 1);
} }
@ -1166,7 +1204,7 @@ gdk_send_xevent (Window window, gboolean propagate, glong event_mask,
XSync (gdk_display, False); XSync (gdk_display, False);
gdk_error_warnings = old_warnings; gdk_error_warnings = old_warnings;
return result && (gdk_error_code != -1); return result && !gdk_error_code;
} }
#ifndef HAVE_XCONVERTCASE #ifndef HAVE_XCONVERTCASE

109
gdk/gdk.h
View file

@ -488,8 +488,8 @@ GdkPixmap* gdk_pixmap_create_from_xpm (GdkWindow *window,
GdkBitmap **mask, GdkBitmap **mask,
GdkColor *transparent_color, GdkColor *transparent_color,
const gchar *filename); const gchar *filename);
GdkPixmap* gdk_pixmap_colormap_create_from_xpm GdkPixmap* gdk_pixmap_colormap_create_from_xpm (
(GdkWindow *window, GdkWindow *window,
GdkColormap *colormap, GdkColormap *colormap,
GdkBitmap **mask, GdkBitmap **mask,
GdkColor *transparent_color, GdkColor *transparent_color,
@ -498,8 +498,8 @@ GdkPixmap* gdk_pixmap_create_from_xpm_d (GdkWindow *window,
GdkBitmap **mask, GdkBitmap **mask,
GdkColor *transparent_color, GdkColor *transparent_color,
gchar **data); gchar **data);
GdkPixmap* gdk_pixmap_colormap_create_from_xpm_d GdkPixmap* gdk_pixmap_colormap_create_from_xpm_d (
(GdkWindow *window, GdkWindow *window,
GdkColormap *colormap, GdkColormap *colormap,
GdkBitmap **mask, GdkBitmap **mask,
GdkColor *transparent_color, GdkColor *transparent_color,
@ -544,66 +544,65 @@ void gdk_image_destroy (GdkImage *image);
/* Color /* Color
*/ */
GdkColormap* gdk_colormap_new (GdkVisual *visual, GdkColormap* gdk_colormap_new (GdkVisual *visual,
gint allocate); gint allocate);
GdkColormap* gdk_colormap_ref (GdkColormap *cmap); GdkColormap* gdk_colormap_ref (GdkColormap *cmap);
void gdk_colormap_unref (GdkColormap *cmap); void gdk_colormap_unref (GdkColormap *cmap);
GdkColormap* gdk_colormap_get_system (void); GdkColormap* gdk_colormap_get_system (void);
gint gdk_colormap_get_system_size (void); gint gdk_colormap_get_system_size (void);
void gdk_colormap_change (GdkColormap *colormap, void gdk_colormap_change (GdkColormap *colormap,
gint ncolors); gint ncolors);
gint gdk_colormap_alloc_colors (GdkColormap *colormap,
GdkColor *colors,
gint ncolors,
gboolean writeable,
gboolean best_match,
gboolean *success);
gboolean gdk_colormap_alloc_color (GdkColormap *colormap,
GdkColor *color,
gboolean writeable,
gboolean best_match);
void gdk_colormap_free_colors (GdkColormap *colormap,
GdkColor *colors,
gint ncolors);
gint gdk_colormap_alloc_colors (GdkColormap *colormap, GdkVisual* gdk_colormap_get_visual (GdkColormap *colormap);
GdkColor *colors,
gint ncolors,
gboolean writeable,
gboolean best_match,
gboolean *success);
gboolean gdk_colormap_alloc_color (GdkColormap *colormap,
GdkColor *color,
gboolean writeable,
gboolean best_match);
void gdk_colormap_free_colors (GdkColormap *colormap,
GdkColor *colors,
gint ncolors);
GdkVisual *gdk_colormap_get_visual (GdkColormap *colormap); GdkColor* gdk_color_copy (GdkColor *color);
void gdk_color_free (GdkColor *color);
GdkColor *gdk_color_copy (GdkColor *color); gboolean gdk_color_parse (const gchar *spec,
void gdk_color_free (GdkColor *color); GdkColor *color);
guint gdk_color_hash (const GdkColor *colora);
gint gdk_color_parse (const gchar *spec, gint gdk_color_equal (const GdkColor *colora,
GdkColor *color); const GdkColor *colorb);
guint gdk_color_hash (const GdkColor *colora);
gint gdk_color_equal (const GdkColor *colora,
const GdkColor *colorb);
/* The following functions are deprecated */ /* The following functions are deprecated */
void gdk_colors_store (GdkColormap *colormap, void gdk_colors_store (GdkColormap *colormap,
GdkColor *colors, GdkColor *colors,
gint ncolors); gint ncolors);
gint gdk_colors_alloc (GdkColormap *colormap, gboolean gdk_colors_alloc (GdkColormap *colormap,
gint contiguous, gint contiguous,
gulong *planes, gulong *planes,
gint nplanes, gint nplanes,
gulong *pixels, gulong *pixels,
gint npixels); gint npixels);
void gdk_colors_free (GdkColormap *colormap, void gdk_colors_free (GdkColormap *colormap,
gulong *pixels, gulong *pixels,
gint npixels, gint npixels,
gulong planes); gulong planes);
gint gdk_color_white (GdkColormap *colormap, gboolean gdk_color_white (GdkColormap *colormap,
GdkColor *color); GdkColor *color);
gint gdk_color_black (GdkColormap *colormap, gboolean gdk_color_black (GdkColormap *colormap,
GdkColor *color); GdkColor *color);
gint gdk_color_alloc (GdkColormap *colormap, gboolean gdk_color_alloc (GdkColormap *colormap,
GdkColor *color); GdkColor *color);
gint gdk_color_change (GdkColormap *colormap, gboolean gdk_color_change (GdkColormap *colormap,
GdkColor *color); GdkColor *color);
/* Fonts /* Fonts

View file

@ -491,10 +491,11 @@ init_palette (GdkColorContext *cc)
if (cc->color_hash) if (cc->color_hash)
{ {
/* XXX: quick-and-dirty way to remove everything */ g_hash_table_foreach (cc->color_hash,
free_hash_entry,
NULL);
g_hash_table_destroy (cc->color_hash); g_hash_table_destroy (cc->color_hash);
cc->color_hash = g_hash_table_new (hash_color, compare_colors); cc->color_hash = NULL;
} }
cc->palette = NULL; cc->palette = NULL;
@ -618,11 +619,6 @@ gdk_color_context_new (GdkVisual *visual,
g_message ("gdk_color_context_new: screen depth is %i, no. of colors is %i\n", g_message ("gdk_color_context_new: screen depth is %i, no. of colors is %i\n",
cc->visual->depth, cc->num_colors)); cc->visual->depth, cc->num_colors));
/* check if we need to initialize a hash table */
if ((cc->mode == GDK_CC_MODE_STD_CMAP) || (cc->mode == GDK_CC_MODE_UNDEFINED))
cc->color_hash = g_hash_table_new (hash_color, compare_colors);
return (GdkColorContext *) cc; return (GdkColorContext *) cc;
} }
@ -680,14 +676,6 @@ gdk_color_context_free (GdkColorContext *cc)
init_palette (cc); init_palette (cc);
if (cc->color_hash)
{
g_hash_table_foreach (cc->color_hash,
free_hash_entry,
NULL);
g_hash_table_destroy (cc->color_hash);
}
g_free (cc); g_free (cc);
} }
@ -780,13 +768,14 @@ gdk_color_context_get_pixel (GdkColorContext *cc,
default: default:
{ {
GdkColor color; GdkColor color;
GdkColor *result; GdkColor *result = NULL;
color.red = red; color.red = red;
color.green = green; color.green = green;
color.blue = blue; color.blue = blue;
result = g_hash_table_lookup (cc->color_hash, &color); if (cc->color_hash)
result = g_hash_table_lookup (cc->color_hash, &color);
if (!result) if (!result)
{ {
@ -831,6 +820,9 @@ gdk_color_context_get_pixel (GdkColorContext *cc,
cnew = g_new (GdkColor, 1); cnew = g_new (GdkColor, 1);
*cnew = color; *cnew = color;
if (!cc->color_hash)
cc->color_hash = g_hash_table_new (hash_color, compare_colors);
g_hash_table_insert (cc->color_hash, cnew, cnew); g_hash_table_insert (cc->color_hash, cnew, cnew);
cc->clut[cc->num_allocated] = color.pixel; cc->clut[cc->num_allocated] = color.pixel;
@ -1489,20 +1481,7 @@ gdk_color_context_add_palette (GdkColorContext *cc,
/* restore previous mode if we aren't adding a new palette */ /* restore previous mode if we aren't adding a new palette */
if (num_palette == 0) if (num_palette == 0)
{ return 0;
/* GDK_CC_MODE_STD_CMAP uses a hash table, so we'd better initialize one */
/* XXX: here, the hash table is already initialized */
return 0;
}
/* Initialize a hash table for this palette (we need one for allocating
* the pixels in the palette using the current settings)
*/
if (cc->color_hash == NULL)
cc->color_hash = g_hash_table_new (hash_color, compare_colors);
/* copy incoming palette */ /* copy incoming palette */
@ -1549,6 +1528,9 @@ gdk_color_context_add_palette (GdkColorContext *cc,
if (cc->color_hash) if (cc->color_hash)
{ {
g_hash_table_foreach (cc->color_hash,
free_hash_entry,
NULL);
g_hash_table_destroy (cc->color_hash); g_hash_table_destroy (cc->color_hash);
cc->color_hash = NULL; cc->color_hash = NULL;
} }

View file

@ -70,13 +70,14 @@ gdk_colormap_new (GdkVisual *visual,
xvisual = ((GdkVisualPrivate*) visual)->xvisual; xvisual = ((GdkVisualPrivate*) visual)->xvisual;
colormap->size = visual->colormap_size; colormap->size = visual->colormap_size;
colormap->colors = g_new (GdkColor, colormap->size); colormap->colors = NULL;
switch (visual->type) switch (visual->type)
{ {
case GDK_VISUAL_GRAYSCALE: case GDK_VISUAL_GRAYSCALE:
case GDK_VISUAL_PSEUDO_COLOR: case GDK_VISUAL_PSEUDO_COLOR:
private->info = g_new0 (GdkColorInfo, colormap->size); private->info = g_new0 (GdkColorInfo, colormap->size);
colormap->colors = g_new (GdkColor, colormap->size);
private->hash = g_hash_table_new ((GHashFunc) gdk_color_hash, private->hash = g_hash_table_new ((GHashFunc) gdk_color_hash,
(GCompareFunc) gdk_color_equal); (GCompareFunc) gdk_color_equal);
@ -116,6 +117,7 @@ gdk_colormap_new (GdkVisual *visual,
private->private_val = TRUE; private->private_val = TRUE;
private->xcolormap = XCreateColormap (private->xdisplay, gdk_root_window, private->xcolormap = XCreateColormap (private->xdisplay, gdk_root_window,
xvisual, AllocAll); xvisual, AllocAll);
colormap->colors = g_new (GdkColor, colormap->size);
size = 1 << visual->red_prec; size = 1 << visual->red_prec;
for (i = 0; i < size; i++) for (i = 0; i < size; i++)
@ -428,56 +430,7 @@ gdk_colors_alloc (GdkColormap *colormap,
} }
} }
return return_val; return return_val != 0;
}
/* This is almost identical to gdk_colormap_free_colors.
* Keep them in sync!
*/
void
gdk_colors_free (GdkColormap *colormap,
gulong *in_pixels,
gint in_npixels,
gulong planes)
{
GdkColormapPrivate *private;
gulong *pixels;
gint npixels = 0;
gint i;
g_return_if_fail (colormap != NULL);
g_return_if_fail (in_pixels != NULL);
private = (GdkColormapPrivate*) colormap;
if ((private->visual->type != GDK_VISUAL_PSEUDO_COLOR) &&
(private->visual->type != GDK_VISUAL_GRAYSCALE))
return;
pixels = g_new (gulong, in_npixels);
for (i=0; i<in_npixels; i++)
{
gulong pixel = in_pixels[i];
if (private->info[pixel].ref_count)
{
private->info[pixel].ref_count--;
if (private->info[pixel].ref_count == 0)
{
pixels[npixels++] = pixel;
if (!(private->info[pixel].flags & GDK_COLOR_WRITEABLE))
g_hash_table_remove (private->hash, &colormap->colors[in_pixels[i]]);
private->info[pixel].flags = 0;
}
}
}
if (npixels)
XFreeColors (private->xdisplay, private->xcolormap,
pixels, npixels, planes);
g_free (pixels);
} }
/* /*
@ -536,7 +489,7 @@ gdk_color_free (GdkColor *color)
g_mem_chunk_free (color_chunk, color); g_mem_chunk_free (color_chunk, color);
} }
gint gboolean
gdk_color_white (GdkColormap *colormap, gdk_color_white (GdkColormap *colormap,
GdkColor *color) GdkColor *color)
{ {
@ -559,7 +512,7 @@ gdk_color_white (GdkColormap *colormap,
return return_val; return return_val;
} }
gint gboolean
gdk_color_black (GdkColormap *colormap, gdk_color_black (GdkColormap *colormap,
GdkColor *color) GdkColor *color)
{ {
@ -608,6 +561,104 @@ gdk_color_parse (const gchar *spec,
return return_val; return return_val;
} }
/* This is almost identical to gdk_colormap_free_colors.
* Keep them in sync!
*/
void
gdk_colors_free (GdkColormap *colormap,
gulong *in_pixels,
gint in_npixels,
gulong planes)
{
GdkColormapPrivate *private;
gulong *pixels;
gint npixels = 0;
gint i;
g_return_if_fail (colormap != NULL);
g_return_if_fail (in_pixels != NULL);
private = (GdkColormapPrivate*) colormap;
if ((private->visual->type != GDK_VISUAL_PSEUDO_COLOR) &&
(private->visual->type != GDK_VISUAL_GRAYSCALE))
return;
pixels = g_new (gulong, in_npixels);
for (i=0; i<in_npixels; i++)
{
gulong pixel = in_pixels[i];
if (private->info[pixel].ref_count)
{
private->info[pixel].ref_count--;
if (private->info[pixel].ref_count == 0)
{
pixels[npixels++] = pixel;
if (!(private->info[pixel].flags & GDK_COLOR_WRITEABLE))
g_hash_table_remove (private->hash, &colormap->colors[pixel]);
private->info[pixel].flags = 0;
}
}
}
if (npixels)
XFreeColors (private->xdisplay, private->xcolormap,
pixels, npixels, planes);
g_free (pixels);
}
/* This is almost identical to gdk_colors_free.
* Keep them in sync!
*/
void
gdk_colormap_free_colors (GdkColormap *colormap,
GdkColor *colors,
gint ncolors)
{
GdkColormapPrivate *private;
gulong *pixels;
gint npixels = 0;
gint i;
g_return_if_fail (colormap != NULL);
g_return_if_fail (colors != NULL);
private = (GdkColormapPrivate*) colormap;
if ((private->visual->type != GDK_VISUAL_PSEUDO_COLOR) &&
(private->visual->type != GDK_VISUAL_GRAYSCALE))
return;
pixels = g_new (gulong, ncolors);
for (i=0; i<ncolors; i++)
{
gulong pixel = colors[i].pixel;
if (private->info[pixel].ref_count)
{
private->info[pixel].ref_count--;
if (private->info[pixel].ref_count == 0)
{
pixels[npixels++] = pixel;
if (!(private->info[pixel].flags & GDK_COLOR_WRITEABLE))
g_hash_table_remove (private->hash, &colormap->colors[pixel]);
private->info[pixel].flags = 0;
}
}
}
if (npixels)
XFreeColors (private->xdisplay, private->xcolormap,
pixels, npixels, 0);
g_free (pixels);
}
/******************** /********************
* Color allocation * * Color allocation *
********************/ ********************/
@ -648,6 +699,7 @@ gdk_colormap_alloc1 (GdkColormap *colormap,
else else
{ {
colormap->colors[ret->pixel] = *color; colormap->colors[ret->pixel] = *color;
colormap->colors[ret->pixel].pixel = ret->pixel;
private->info[ret->pixel].ref_count = 1; private->info[ret->pixel].ref_count = 1;
g_hash_table_insert (private->hash, g_hash_table_insert (private->hash,
@ -1025,55 +1077,6 @@ gdk_colormap_alloc_color (GdkColormap *colormap,
return success; return success;
} }
/* This is almost identical to gdk_colors_free.
* Keep them in sync!
*/
void
gdk_colormap_free_colors (GdkColormap *colormap,
GdkColor *colors,
gint ncolors)
{
GdkColormapPrivate *private;
gulong *pixels;
gint npixels = 0;
gint i;
g_return_if_fail (colormap != NULL);
g_return_if_fail (colors != NULL);
private = (GdkColormapPrivate*) colormap;
if ((private->visual->type != GDK_VISUAL_PSEUDO_COLOR) &&
(private->visual->type != GDK_VISUAL_GRAYSCALE))
return;
pixels = g_new (gulong, ncolors);
for (i=0; i<ncolors; i++)
{
gulong pixel = colors[i].pixel;
if (private->info[pixel].ref_count)
{
private->info[pixel].ref_count--;
if (private->info[pixel].ref_count == 0)
{
pixels[npixels++] = pixel;
if (!(private->info[pixel].flags & GDK_COLOR_WRITEABLE))
g_hash_table_remove (private->hash, &colors[i]);
private->info[pixel].flags = 0;
}
}
}
if (npixels)
XFreeColors (private->xdisplay, private->xcolormap,
pixels, npixels, 0);
g_free (pixels);
}
gboolean gboolean
gdk_color_alloc (GdkColormap *colormap, gdk_color_alloc (GdkColormap *colormap,
GdkColor *color) GdkColor *color)

View file

@ -31,8 +31,6 @@
#include "gdk/gdkprivate.h" #include "gdk/gdkprivate.h"
#include "gdk.h" #include "gdk.h"
#define NEW_DRAGS
typedef struct _GdkDragContextPrivate GdkDragContextPrivate; typedef struct _GdkDragContextPrivate GdkDragContextPrivate;
typedef enum { typedef enum {
@ -70,7 +68,8 @@ struct _GdkDragContextPrivate {
GdkDragAction old_actions; /* The last actions we sent to the source */ GdkDragAction old_actions; /* The last actions we sent to the source */
GdkDragAction xdnd_actions; /* What is currently set in XdndActionList */ GdkDragAction xdnd_actions; /* What is currently set in XdndActionList */
Window dest_xid; Window dest_xid; /* The last window we looked up */
Window drop_xid; /* The (non-proxied) window that is receiving drops */
guint xdnd_targets_set : 1; /* Whether we've already set XdndTypeList */ guint xdnd_targets_set : 1; /* Whether we've already set XdndTypeList */
guint xdnd_actions_set : 1; /* Whether we've already set XdndActionList */ guint xdnd_actions_set : 1; /* Whether we've already set XdndActionList */
guint xdnd_have_actions : 1; /* Whether an XdndActionList was provided */ guint xdnd_have_actions : 1; /* Whether an XdndActionList was provided */
@ -151,6 +150,7 @@ gdk_drag_context_unref (GdkDragContext *context)
GdkDragContextPrivate *private = (GdkDragContextPrivate *)context; GdkDragContextPrivate *private = (GdkDragContextPrivate *)context;
g_return_if_fail (context != NULL); g_return_if_fail (context != NULL);
g_return_if_fail (private->ref_count > 0);
private->ref_count--; private->ref_count--;
@ -196,8 +196,8 @@ gdk_drag_context_find (gboolean is_source,
private = (GdkDragContextPrivate *)context; private = (GdkDragContextPrivate *)context;
context_dest_xid = context->dest_window ? context_dest_xid = context->dest_window ?
(private->dest_xid ? (private->drop_xid ?
private->dest_xid : private->drop_xid :
GDK_WINDOW_XWINDOW (context->dest_window)) : GDK_WINDOW_XWINDOW (context->dest_window)) :
None; None;
@ -387,7 +387,7 @@ gdk_window_cache_new (void)
xwa.x, xwa.y, xwa.width, xwa.height, xwa.x, xwa.y, xwa.width, xwa.height,
xwa.map_state != IsUnmapped); xwa.map_state != IsUnmapped);
if (gdk_error_code != 0) if (gdk_error_code)
gdk_error_code = 0; gdk_error_code = 0;
else else
{ {
@ -441,9 +441,10 @@ get_client_window_at_coords_recurse (Window win,
wm_state_atom, 0, 0, False, AnyPropertyType, wm_state_atom, 0, 0, False, AnyPropertyType,
&type, &format, &nitems, &after, &data); &type, &format, &nitems, &after, &data);
if (gdk_error_code != 0) if (gdk_error_code)
{ {
gdk_error_code = 0; gdk_error_code = 0;
return None; return None;
} }
@ -458,9 +459,10 @@ get_client_window_at_coords_recurse (Window win,
XTranslateCoordinates (gdk_display, gdk_root_window, win, XTranslateCoordinates (gdk_display, gdk_root_window, win,
x_root, y_root, &dest_x, &dest_y, &child); x_root, y_root, &dest_x, &dest_y, &child);
if (gdk_error_code != 0) if (gdk_error_code)
{ {
gdk_error_code = 0; gdk_error_code = 0;
return None; return None;
} }
@ -469,7 +471,7 @@ get_client_window_at_coords_recurse (Window win,
&root, &tmp_parent, &children, &nchildren) == 0) &root, &tmp_parent, &children, &nchildren) == 0)
return 0; return 0;
if (gdk_error_code == 0) if (!gdk_error_code)
{ {
for (i = nchildren - 1; (i >= 0) && (child == None); i--) for (i = nchildren - 1; (i >= 0) && (child == None); i--)
{ {
@ -477,7 +479,7 @@ get_client_window_at_coords_recurse (Window win,
XGetWindowAttributes (gdk_display, children[i], &xwa); XGetWindowAttributes (gdk_display, children[i], &xwa);
if (gdk_error_code != 0) if (gdk_error_code)
gdk_error_code = 0; gdk_error_code = 0;
else if ((xwa.map_state == IsViewable) && (xwa.class == InputOutput) && else if ((xwa.map_state == IsViewable) && (xwa.class == InputOutput) &&
(x >= xwa.x) && (x < xwa.x + (gint)xwa.width) && (x >= xwa.x) && (x < xwa.x + (gint)xwa.width) &&
@ -566,9 +568,10 @@ get_client_window_at_coords_recurse (Window win,
wm_state_atom, 0, 0, False, AnyPropertyType, wm_state_atom, 0, 0, False, AnyPropertyType,
&type, &format, &nitems, &after, &data); &type, &format, &nitems, &after, &data);
if (gdk_error_code != 0) if (gdk_error_code)
{ {
gdk_error_code = 0; gdk_error_code = 0;
return None; return None;
} }
@ -581,9 +584,10 @@ get_client_window_at_coords_recurse (Window win,
XTranslateCoordinates (gdk_display, gdk_root_window, win, XTranslateCoordinates (gdk_display, gdk_root_window, win,
x_root, y_root, &dest_x, &dest_y, &child); x_root, y_root, &dest_x, &dest_y, &child);
if (gdk_error_code != 0) if (gdk_error_code)
{ {
gdk_error_code = 0; gdk_error_code = 0;
return None; return None;
} }
@ -620,7 +624,7 @@ get_client_window_at_coords (Window ignore,
XGetWindowAttributes (gdk_display, children[i], &xwa); XGetWindowAttributes (gdk_display, children[i], &xwa);
if (gdk_error_code != 0) if (gdk_error_code)
gdk_error_code = 0; gdk_error_code = 0;
else if ((xwa.map_state == IsViewable) && else if ((xwa.map_state == IsViewable) &&
(x_root >= xwa.x) && (x_root < xwa.x + (gint)xwa.width) && (x_root >= xwa.x) && (x_root < xwa.x + (gint)xwa.width) &&
@ -869,7 +873,7 @@ motif_find_drag_window (gboolean create)
Display *display; Display *display;
XSetWindowAttributes attr; XSetWindowAttributes attr;
display = XOpenDisplay (NULL); display = XOpenDisplay (gdk_display_name);
XSetCloseDownMode (display, RetainPermanent); XSetCloseDownMode (display, RetainPermanent);
XGrabServer (display); XGrabServer (display);
@ -2027,6 +2031,8 @@ xdnd_set_targets (GdkDragContext *context)
XA_ATOM, 32, PropModeReplace, XA_ATOM, 32, PropModeReplace,
(guchar *)atomlist, n_atoms); (guchar *)atomlist, n_atoms);
g_free (atomlist);
private->xdnd_targets_set = 1; private->xdnd_targets_set = 1;
} }
@ -2073,6 +2079,8 @@ xdnd_set_actions (GdkDragContext *context)
XA_ATOM, 32, PropModeReplace, XA_ATOM, 32, PropModeReplace,
(guchar *)atomlist, n_atoms); (guchar *)atomlist, n_atoms);
g_free (atomlist);
private->xdnd_actions_set = 1; private->xdnd_actions_set = 1;
private->xdnd_actions = context->actions; private->xdnd_actions = context->actions;
} }
@ -2106,13 +2114,9 @@ xdnd_send_enter (GdkDragContext *context)
xev.xclient.type = ClientMessage; xev.xclient.type = ClientMessage;
xev.xclient.message_type = gdk_atom_intern ("XdndEnter", FALSE); xev.xclient.message_type = gdk_atom_intern ("XdndEnter", FALSE);
xev.xclient.format = 32; xev.xclient.format = 32;
#ifdef NEW_DRAGS xev.xclient.window = private->drop_xid ?
xev.xclient.window = private->dest_xid ? private->drop_xid :
private->dest_xid :
GDK_WINDOW_XWINDOW (context->dest_window); GDK_WINDOW_XWINDOW (context->dest_window);
#else
xev.xclient.window = GDK_WINDOW_XWINDOW (context->dest_window);
#endif
xev.xclient.data.l[0] = GDK_WINDOW_XWINDOW (context->source_window); xev.xclient.data.l[0] = GDK_WINDOW_XWINDOW (context->source_window);
xev.xclient.data.l[1] = (3 << 24); /* version */ xev.xclient.data.l[1] = (3 << 24); /* version */
xev.xclient.data.l[2] = 0; xev.xclient.data.l[2] = 0;
@ -2162,13 +2166,9 @@ xdnd_send_leave (GdkDragContext *context)
xev.xclient.type = ClientMessage; xev.xclient.type = ClientMessage;
xev.xclient.message_type = gdk_atom_intern ("XdndLeave", FALSE); xev.xclient.message_type = gdk_atom_intern ("XdndLeave", FALSE);
xev.xclient.format = 32; xev.xclient.format = 32;
#ifdef NEW_DRAGS xev.xclient.window = private->drop_xid ?
xev.xclient.window = private->dest_xid ? private->drop_xid :
private->dest_xid :
GDK_WINDOW_XWINDOW (context->dest_window); GDK_WINDOW_XWINDOW (context->dest_window);
#else
xev.xclient.window = GDK_WINDOW_XWINDOW (context->dest_window);
#endif
xev.xclient.data.l[0] = GDK_WINDOW_XWINDOW (context->source_window); xev.xclient.data.l[0] = GDK_WINDOW_XWINDOW (context->source_window);
xev.xclient.data.l[1] = 0; xev.xclient.data.l[1] = 0;
xev.xclient.data.l[2] = 0; xev.xclient.data.l[2] = 0;
@ -2195,13 +2195,9 @@ xdnd_send_drop (GdkDragContext *context, guint32 time)
xev.xclient.type = ClientMessage; xev.xclient.type = ClientMessage;
xev.xclient.message_type = gdk_atom_intern ("XdndDrop", FALSE); xev.xclient.message_type = gdk_atom_intern ("XdndDrop", FALSE);
xev.xclient.format = 32; xev.xclient.format = 32;
#ifdef NEW_DRAGS xev.xclient.window = private->drop_xid ?
xev.xclient.window = private->dest_xid ? private->drop_xid :
private->dest_xid :
GDK_WINDOW_XWINDOW (context->dest_window); GDK_WINDOW_XWINDOW (context->dest_window);
#else
xev.xclient.window = GDK_WINDOW_XWINDOW (context->dest_window);
#endif
xev.xclient.data.l[0] = GDK_WINDOW_XWINDOW (context->source_window); xev.xclient.data.l[0] = GDK_WINDOW_XWINDOW (context->source_window);
xev.xclient.data.l[1] = 0; xev.xclient.data.l[1] = 0;
xev.xclient.data.l[2] = time; xev.xclient.data.l[2] = time;
@ -2232,13 +2228,9 @@ xdnd_send_motion (GdkDragContext *context,
xev.xclient.type = ClientMessage; xev.xclient.type = ClientMessage;
xev.xclient.message_type = gdk_atom_intern ("XdndPosition", FALSE); xev.xclient.message_type = gdk_atom_intern ("XdndPosition", FALSE);
xev.xclient.format = 32; xev.xclient.format = 32;
#ifdef NEW_DRAGS xev.xclient.window = private->drop_xid ?
xev.xclient.window = private->dest_xid ? private->drop_xid :
private->dest_xid :
GDK_WINDOW_XWINDOW (context->dest_window); GDK_WINDOW_XWINDOW (context->dest_window);
#else
xev.xclient.window = GDK_WINDOW_XWINDOW (context->dest_window);
#endif
xev.xclient.data.l[0] = GDK_WINDOW_XWINDOW (context->source_window); xev.xclient.data.l[0] = GDK_WINDOW_XWINDOW (context->source_window);
xev.xclient.data.l[1] = 0; xev.xclient.data.l[1] = 0;
xev.xclient.data.l[2] = (x_root << 16) | y_root; xev.xclient.data.l[2] = (x_root << 16) | y_root;
@ -2859,6 +2851,12 @@ gdk_drag_find_window (GdkDragContext *context,
/* Check if new destination accepts drags, and which protocol */ /* Check if new destination accepts drags, and which protocol */
/* There is some ugliness here. We actually need to pass
* _three_ pieces of information to drag_motion - dest_window,
* protocol, and the XID of the unproxied window. The first
* two are passed explicitely, the third implicitly through
* protocol->dest_xid.
*/
if ((recipient = gdk_drag_get_protocol (dest, protocol))) if ((recipient = gdk_drag_get_protocol (dest, protocol)))
{ {
*dest_window = gdk_window_lookup (recipient); *dest_window = gdk_window_lookup (recipient);
@ -2917,6 +2915,7 @@ gdk_drag_motion (GdkDragContext *context,
if (dest_window) if (dest_window)
{ {
context->dest_window = dest_window; context->dest_window = dest_window;
private->drop_xid = private->dest_xid;
gdk_window_ref (context->dest_window); gdk_window_ref (context->dest_window);
context->protocol = protocol; context->protocol = protocol;
@ -2941,6 +2940,7 @@ gdk_drag_motion (GdkDragContext *context,
else else
{ {
context->dest_window = NULL; context->dest_window = NULL;
private->drop_xid = None;
context->action = 0; context->action = 0;
} }

View file

@ -501,12 +501,14 @@ gdk_draw_lines (GdkDrawable *drawable,
g_return_if_fail (gc != NULL); g_return_if_fail (gc != NULL);
drawable_private = (GdkWindowPrivate*) drawable; drawable_private = (GdkWindowPrivate*) drawable;
if (drawable_private->destroyed)
return;
gc_private = (GdkGCPrivate*) gc; gc_private = (GdkGCPrivate*) gc;
XDrawLines (drawable_private->xdisplay, XDrawLines (drawable_private->xdisplay,
drawable_private->xwindow, drawable_private->xwindow,
gc_private->xgc, gc_private->xgc,
(XPoint *) points, (XPoint *) points,
npoints, npoints,
CoordModeOrigin); CoordModeOrigin);
} }

View file

@ -27,7 +27,6 @@
#include "gdk.h" #include "gdk.h"
#include "gdkx.h" #include "gdkx.h"
#include "gdkprivate.h" #include "gdkprivate.h"
#include "gdkinput.h"
#include "gdkkeysyms.h" #include "gdkkeysyms.h"
#if HAVE_CONFIG_H #if HAVE_CONFIG_H
@ -37,6 +36,7 @@
# endif # endif
#endif #endif
#include "gdkinput.h"
typedef struct _GdkIOClosure GdkIOClosure; typedef struct _GdkIOClosure GdkIOClosure;
typedef struct _GdkEventPrivate GdkEventPrivate; typedef struct _GdkEventPrivate GdkEventPrivate;
@ -88,9 +88,11 @@ static GdkEvent* gdk_event_unqueue (void);
static gboolean gdk_event_prepare (gpointer source_data, static gboolean gdk_event_prepare (gpointer source_data,
GTimeVal *current_time, GTimeVal *current_time,
gint *timeout); gint *timeout,
gpointer user_data);
static gboolean gdk_event_check (gpointer source_data, static gboolean gdk_event_check (gpointer source_data,
GTimeVal *current_time); GTimeVal *current_time,
gpointer user_data);
static gboolean gdk_event_dispatch (gpointer source_data, static gboolean gdk_event_dispatch (gpointer source_data,
GTimeVal *current_time, GTimeVal *current_time,
gpointer user_data); gpointer user_data);
@ -434,6 +436,10 @@ gdk_compress_exposures (XEvent *xevent,
rect1.width = xevent->xexpose.width; rect1.width = xevent->xexpose.width;
rect1.height = xevent->xexpose.height; rect1.height = xevent->xexpose.height;
event.any.type = GDK_EXPOSE;
event.any.window = None;
event.any.send_event = FALSE;
while (1) while (1)
{ {
if (count == 0) if (count == 0)
@ -450,6 +456,8 @@ gdk_compress_exposures (XEvent *xevent,
expose_predicate, expose_predicate,
(XPointer)&info); (XPointer)&info);
event.any.window = window;
/* We apply filters here, and if it was filtered, completely /* We apply filters here, and if it was filtered, completely
* ignore the return * ignore the return
*/ */
@ -849,6 +857,12 @@ gdk_io_destroy (gpointer data)
g_free (closure); g_free (closure);
} }
/* What do we do with G_IO_NVAL?
*/
#define READ_CONDITION (G_IO_IN | G_IO_HUP | G_IO_ERR)
#define WRITE_CONDITION (G_IO_OUT | G_IO_ERR)
#define EXCEPTION_CONDITION (G_IO_PRI)
static gboolean static gboolean
gdk_io_invoke (GIOChannel *source, gdk_io_invoke (GIOChannel *source,
GIOCondition condition, GIOCondition condition,
@ -857,11 +871,11 @@ gdk_io_invoke (GIOChannel *source,
GdkIOClosure *closure = data; GdkIOClosure *closure = data;
GdkInputCondition gdk_cond = 0; GdkInputCondition gdk_cond = 0;
if (condition & (G_IO_IN | G_IO_PRI)) if (condition & READ_CONDITION)
gdk_cond |= GDK_INPUT_READ; gdk_cond |= GDK_INPUT_READ;
if (condition & G_IO_OUT) if (condition & WRITE_CONDITION)
gdk_cond |= GDK_INPUT_WRITE; gdk_cond |= GDK_INPUT_WRITE;
if (condition & (G_IO_ERR | G_IO_HUP | G_IO_NVAL)) if (condition & EXCEPTION_CONDITION)
gdk_cond |= GDK_INPUT_EXCEPTION; gdk_cond |= GDK_INPUT_EXCEPTION;
if (closure->condition & gdk_cond) if (closure->condition & gdk_cond)
@ -888,11 +902,11 @@ gdk_input_add_full (gint source,
closure->data = data; closure->data = data;
if (condition & GDK_INPUT_READ) if (condition & GDK_INPUT_READ)
cond |= (G_IO_IN | G_IO_PRI); cond |= READ_CONDITION;
if (condition & GDK_INPUT_WRITE) if (condition & GDK_INPUT_WRITE)
cond |= G_IO_OUT; cond |= WRITE_CONDITION;
if (condition & GDK_INPUT_EXCEPTION) if (condition & GDK_INPUT_EXCEPTION)
cond |= G_IO_ERR|G_IO_HUP|G_IO_NVAL; cond |= EXCEPTION_CONDITION;
channel = g_io_channel_unix_new (source); channel = g_io_channel_unix_new (source);
result = g_io_add_watch_full (channel, G_PRIORITY_DEFAULT, cond, result = g_io_add_watch_full (channel, G_PRIORITY_DEFAULT, cond,
@ -923,7 +937,6 @@ gdk_event_apply_filters (XEvent *xevent,
GdkEvent *event, GdkEvent *event,
GList *filters) GList *filters)
{ {
GdkEventFilter *filter;
GList *tmp_list; GList *tmp_list;
GdkFilterReturn result; GdkFilterReturn result;
@ -931,13 +944,12 @@ gdk_event_apply_filters (XEvent *xevent,
while (tmp_list) while (tmp_list)
{ {
filter = (GdkEventFilter*) tmp_list->data; GdkEventFilter *filter = (GdkEventFilter*) tmp_list->data;
result = (*filter->function) (xevent, event, filter->data);
if (result != GDK_FILTER_CONTINUE)
return result;
tmp_list = tmp_list->next; tmp_list = tmp_list->next;
result = filter->function (xevent, event, filter->data);
if (result != GDK_FILTER_CONTINUE)
return result;
} }
return GDK_FILTER_CONTINUE; return GDK_FILTER_CONTINUE;
@ -1002,7 +1014,7 @@ gdk_event_translate (GdkEvent *event,
gdk_window_ref (window); gdk_window_ref (window);
event->any.window = window; event->any.window = window;
event->any.send_event = xevent->xany.send_event; event->any.send_event = xevent->xany.send_event ? TRUE : FALSE;
if (window_private && window_private->destroyed) if (window_private && window_private->destroyed)
{ {
@ -1057,9 +1069,6 @@ gdk_event_translate (GdkEvent *event,
} }
#endif #endif
if (window == NULL)
g_message ("Got event for unknown window: %#lx\n", xevent->xany.window);
/* We do a "manual" conversion of the XEvent to a /* We do a "manual" conversion of the XEvent to a
* GdkEvent. The structures are mostly the same so * GdkEvent. The structures are mostly the same so
* the conversion is fairly straightforward. We also * the conversion is fairly straightforward. We also
@ -1513,10 +1522,11 @@ gdk_event_translate (GdkEvent *event,
/* Print debugging info. /* Print debugging info.
*/ */
GDK_NOTE (EVENTS, GDK_NOTE (EVENTS,
g_message ("expose:\t\twindow: %ld %d x,y: %d %d w,h: %d %d", g_message ("expose:\t\twindow: %ld %d x,y: %d %d w,h: %d %d%s",
xevent->xexpose.window, xevent->xexpose.count, xevent->xexpose.window, xevent->xexpose.count,
xevent->xexpose.x, xevent->xexpose.y, xevent->xexpose.x, xevent->xexpose.y,
xevent->xexpose.width, xevent->xexpose.height)); xevent->xexpose.width, xevent->xexpose.height,
event->any.send_event ? " (send)" : ""));
gdk_compress_exposures (xevent, window); gdk_compress_exposures (xevent, window);
event->expose.type = GDK_EXPOSE; event->expose.type = GDK_EXPOSE;
@ -1601,7 +1611,17 @@ gdk_event_translate (GdkEvent *event,
break; break;
case CreateNotify: case CreateNotify:
/* Not currently handled */ GDK_NOTE (EVENTS,
g_message ("create notify:\twindow: %ld x,y: %d %d w,h: %d %d b-w: %d parent: %ld ovr: %d",
xevent->xcreatewindow.window,
xevent->xcreatewindow.x,
xevent->xcreatewindow.y,
xevent->xcreatewindow.width,
xevent->xcreatewindow.height,
xevent->xcreatewindow.border_width,
xevent->xcreatewindow.parent,
xevent->xcreatewindow.override_redirect));
/* not really handled */
break; break;
case DestroyNotify: case DestroyNotify:
@ -1616,7 +1636,7 @@ gdk_event_translate (GdkEvent *event,
return_val = window_private && !window_private->destroyed; return_val = window_private && !window_private->destroyed;
if(window && window_private->xwindow != GDK_ROOT_WINDOW()) if (window && window_private->xwindow != GDK_ROOT_WINDOW())
gdk_window_destroy_notify (window); gdk_window_destroy_notify (window);
break; break;
@ -1651,8 +1671,12 @@ gdk_event_translate (GdkEvent *event,
/* Print debugging info. /* Print debugging info.
*/ */
GDK_NOTE (EVENTS, GDK_NOTE (EVENTS,
g_message ("reparent notify:\twindow: %ld", g_message ("reparent notify:\twindow: %ld x,y: %d %d parent: %ld ovr: %d",
xevent->xreparent.window)); xevent->xreparent.window,
xevent->xreparent.x,
xevent->xreparent.y,
xevent->xreparent.parent,
xevent->xreparent.override_redirect));
/* Not currently handled */ /* Not currently handled */
return_val = FALSE; return_val = FALSE;
@ -1661,36 +1685,8 @@ gdk_event_translate (GdkEvent *event,
case ConfigureNotify: case ConfigureNotify:
/* Print debugging info. /* Print debugging info.
*/ */
while ((XPending (gdk_display) > 0) &&
XCheckTypedWindowEvent(gdk_display, xevent->xany.window,
ConfigureNotify, xevent))
{
GdkFilterReturn result;
GDK_NOTE (EVENTS,
g_message ("configure notify discarded:\twindow: %ld",
xevent->xconfigure.window));
result = gdk_event_apply_filters (xevent, event,
window_private
?window_private->filters
:gdk_default_filters);
/* If the result is GDK_FILTER_REMOVE, there will be
* trouble, but anybody who filtering the Configure events
* better know what they are doing
*/
if (result != GDK_FILTER_CONTINUE)
{
return (result == GDK_FILTER_TRANSLATE) ? TRUE : FALSE;
}
/*XSync (gdk_display, 0);*/
}
GDK_NOTE (EVENTS, GDK_NOTE (EVENTS,
g_message ("configure notify:\twindow: %ld x,y: %d %d w,h: %d %d b-w: %d above: %ld ovr: %d", g_message ("configure notify:\twindow: %ld x,y: %d %d w,h: %d %d b-w: %d above: %ld ovr: %d%s",
xevent->xconfigure.window, xevent->xconfigure.window,
xevent->xconfigure.x, xevent->xconfigure.x,
xevent->xconfigure.y, xevent->xconfigure.y,
@ -1698,14 +1694,19 @@ gdk_event_translate (GdkEvent *event,
xevent->xconfigure.height, xevent->xconfigure.height,
xevent->xconfigure.border_width, xevent->xconfigure.border_width,
xevent->xconfigure.above, xevent->xconfigure.above,
xevent->xconfigure.override_redirect)); xevent->xconfigure.override_redirect,
!window
if (!window_private->destroyed && ? " (discarding)"
: window_private->window_type == GDK_WINDOW_CHILD
? " (discarding child)"
: ""));
if (window &&
!window_private->destroyed &&
(window_private->extension_events != 0) && (window_private->extension_events != 0) &&
gdk_input_vtable.configure_event) gdk_input_vtable.configure_event)
gdk_input_vtable.configure_event (&xevent->xconfigure, window); gdk_input_vtable.configure_event (&xevent->xconfigure, window);
if (window_private->window_type == GDK_WINDOW_CHILD) if (!window || window_private->window_type == GDK_WINDOW_CHILD)
return_val = FALSE; return_val = FALSE;
else else
{ {
@ -1722,16 +1723,22 @@ gdk_event_translate (GdkEvent *event,
gint ty = 0; gint ty = 0;
Window child_window = 0; Window child_window = 0;
if (!XTranslateCoordinates (window_private->xdisplay, gdk_error_trap_push ();
window_private->xwindow, if (XTranslateCoordinates (window_private->xdisplay,
gdk_root_window, window_private->xwindow,
0, 0, gdk_root_window,
&tx, &ty, 0, 0,
&child_window)) &tx, &ty,
g_warning ("GdkWindow %ld doesn't share root windows display?", &child_window))
window_private->xwindow); {
event->configure.x = tx; if (!gdk_error_trap_pop ())
event->configure.y = ty; {
event->configure.x = tx;
event->configure.y = ty;
}
}
else
gdk_error_trap_pop ();
} }
else else
{ {
@ -1751,8 +1758,15 @@ gdk_event_translate (GdkEvent *event,
/* Print debugging info. /* Print debugging info.
*/ */
GDK_NOTE (EVENTS, GDK_NOTE (EVENTS,
g_message ("property notify:\twindow: %ld", gchar *atom = gdk_atom_name (xevent->xproperty.atom);
xevent->xproperty.window)); g_message ("property notify:\twindow: %ld, atom(%ld): %s%s%s",
xevent->xproperty.window,
xevent->xproperty.atom,
atom ? "\"" : "",
atom ? atom : "unknown",
atom ? "\"" : "");
g_free (atom);
);
event->property.type = GDK_PROPERTY_NOTIFY; event->property.type = GDK_PROPERTY_NOTIFY;
event->property.window = window; event->property.window = window;
@ -1910,8 +1924,8 @@ gdk_event_translate (GdkEvent *event,
GdkFilterReturn GdkFilterReturn
gdk_wm_protocols_filter (GdkXEvent *xev, gdk_wm_protocols_filter (GdkXEvent *xev,
GdkEvent *event, GdkEvent *event,
gpointer data) gpointer data)
{ {
XEvent *xevent = (XEvent *)xev; XEvent *xevent = (XEvent *)xev;
@ -1993,8 +2007,7 @@ gdk_events_queue (void)
event->any.type = GDK_NOTHING; event->any.type = GDK_NOTHING;
event->any.window = NULL; event->any.window = NULL;
event->any.send_event = FALSE; event->any.send_event = xevent.xany.send_event ? TRUE : FALSE;
event->any.send_event = xevent.xany.send_event;
((GdkEventPrivate *)event)->flags |= GDK_EVENT_PENDING; ((GdkEventPrivate *)event)->flags |= GDK_EVENT_PENDING;
@ -2017,7 +2030,8 @@ gdk_events_queue (void)
static gboolean static gboolean
gdk_event_prepare (gpointer source_data, gdk_event_prepare (gpointer source_data,
GTimeVal *current_time, GTimeVal *current_time,
gint *timeout) gint *timeout,
gpointer user_data)
{ {
gboolean retval; gboolean retval;
@ -2034,7 +2048,8 @@ gdk_event_prepare (gpointer source_data,
static gboolean static gboolean
gdk_event_check (gpointer source_data, gdk_event_check (gpointer source_data,
GTimeVal *current_time) GTimeVal *current_time,
gpointer user_data)
{ {
gboolean retval; gboolean retval;
@ -2133,29 +2148,29 @@ gdk_event_send_client_message_to_all_recurse (XEvent *xev,
guint level) guint level)
{ {
static GdkAtom wm_state_atom = GDK_NONE; static GdkAtom wm_state_atom = GDK_NONE;
Atom type = None; Atom type = None;
int format; int format;
unsigned long nitems, after; unsigned long nitems, after;
unsigned char *data; unsigned char *data;
Window *ret_children, ret_root, ret_parent; Window *ret_children, ret_root, ret_parent;
unsigned int ret_nchildren; unsigned int ret_nchildren;
int i; gint old_warnings = gdk_error_warnings;
gboolean send = FALSE; gboolean send = FALSE;
gboolean found = FALSE; gboolean found = FALSE;
int i;
if (!wm_state_atom) if (!wm_state_atom)
wm_state_atom = gdk_atom_intern ("WM_STATE", FALSE); wm_state_atom = gdk_atom_intern ("WM_STATE", FALSE);
gdk_error_warnings = FALSE;
gdk_error_code = 0; gdk_error_code = 0;
XGetWindowProperty (gdk_display, xid, wm_state_atom, 0, 0, False, AnyPropertyType, XGetWindowProperty (gdk_display, xid, wm_state_atom, 0, 0, False, AnyPropertyType,
&type, &format, &nitems, &after, &data); &type, &format, &nitems, &after, &data);
if (gdk_error_code) if (gdk_error_code)
{ {
gdk_error_code = 0; gdk_error_warnings = old_warnings;
return FALSE; return FALSE;
} }
@ -2167,18 +2182,20 @@ gdk_event_send_client_message_to_all_recurse (XEvent *xev,
else else
{ {
/* OK, we're all set, now let's find some windows to send this to */ /* OK, we're all set, now let's find some windows to send this to */
if (XQueryTree(gdk_display, xid, &ret_root, &ret_parent, if (XQueryTree (gdk_display, xid, &ret_root, &ret_parent,
&ret_children, &ret_nchildren) != True) &ret_children, &ret_nchildren) != True ||
return FALSE; gdk_error_code)
{
gdk_error_warnings = old_warnings;
if (gdk_error_code) return FALSE;
return FALSE; }
for(i = 0; i < ret_nchildren; i++) for(i = 0; i < ret_nchildren; i++)
if (gdk_event_send_client_message_to_all_recurse(xev, ret_children[i], level + 1)) if (gdk_event_send_client_message_to_all_recurse (xev, ret_children[i], level + 1))
found = TRUE; found = TRUE;
XFree(ret_children); XFree (ret_children);
} }
if (send || (!found && (level == 1))) if (send || (!found && (level == 1)))
@ -2187,6 +2204,8 @@ gdk_event_send_client_message_to_all_recurse (XEvent *xev,
gdk_send_xevent (xid, False, NoEventMask, xev); gdk_send_xevent (xid, False, NoEventMask, xev);
} }
gdk_error_warnings = old_warnings;
return (send || found); return (send || found);
} }

View file

@ -29,6 +29,63 @@
#include "gdk.h" #include "gdk.h"
#include "gdkprivate.h" #include "gdkprivate.h"
static GHashTable *font_name_hash = NULL;
static GHashTable *fontset_name_hash = NULL;
static void
gdk_font_hash_insert (GdkFontType type, GdkFont *font, const gchar *font_name)
{
GdkFontPrivate *private = (GdkFontPrivate *)font;
GHashTable **hashp = (type == GDK_FONT_FONT) ?
&font_name_hash : &fontset_name_hash;
if (!*hashp)
*hashp = g_hash_table_new (g_str_hash, g_str_equal);
private->names = g_slist_prepend (private->names, g_strdup (font_name));
g_hash_table_insert (*hashp, private->names->data, font);
}
static void
gdk_font_hash_remove (GdkFontType type, GdkFont *font)
{
GdkFontPrivate *private = (GdkFontPrivate *)font;
GSList *tmp_list;
GHashTable *hash = (type == GDK_FONT_FONT) ?
font_name_hash : fontset_name_hash;
tmp_list = private->names;
while (tmp_list)
{
g_hash_table_remove (hash, tmp_list->data);
g_free (tmp_list->data);
tmp_list = tmp_list->next;
}
g_slist_free (private->names);
private->names = NULL;
}
static GdkFont *
gdk_font_hash_lookup (GdkFontType type, const gchar *font_name)
{
GdkFont *result;
GHashTable *hash = (type == GDK_FONT_FONT) ?
font_name_hash : fontset_name_hash;
if (!hash)
return NULL;
else
{
result = g_hash_table_lookup (hash, font_name);
if (result)
gdk_font_ref (result);
return result;
}
}
GdkFont* GdkFont*
gdk_font_load (const gchar *font_name) gdk_font_load (const gchar *font_name)
{ {
@ -38,6 +95,10 @@ gdk_font_load (const gchar *font_name)
g_return_val_if_fail (font_name != NULL, NULL); g_return_val_if_fail (font_name != NULL, NULL);
font = gdk_font_hash_lookup (GDK_FONT_FONT, font_name);
if (font)
return font;
xfont = XLoadQueryFont (gdk_display, font_name); xfont = XLoadQueryFont (gdk_display, font_name);
if (xfont == NULL) if (xfont == NULL)
return NULL; return NULL;
@ -57,6 +118,7 @@ gdk_font_load (const gchar *font_name)
private->xdisplay = gdk_display; private->xdisplay = gdk_display;
private->xfont = xfont; private->xfont = xfont;
private->ref_count = 1; private->ref_count = 1;
private->names = NULL;
font = (GdkFont*) private; font = (GdkFont*) private;
font->type = GDK_FONT_FONT; font->type = GDK_FONT_FONT;
@ -66,6 +128,8 @@ gdk_font_load (const gchar *font_name)
gdk_xid_table_insert (&xfont->fid, font); gdk_xid_table_insert (&xfont->fid, font);
} }
gdk_font_hash_insert (GDK_FONT_FONT, font, font_name);
return font; return font;
} }
@ -79,6 +143,10 @@ gdk_fontset_load (gchar *fontset_name)
gchar **missing_charset_list; gchar **missing_charset_list;
gchar *def_string; gchar *def_string;
font = gdk_font_hash_lookup (GDK_FONT_FONTSET, fontset_name);
if (font)
return font;
private = g_new (GdkFontPrivate, 1); private = g_new (GdkFontPrivate, 1);
font = (GdkFont*) private; font = (GdkFont*) private;
@ -121,8 +189,12 @@ gdk_fontset_load (gchar *fontset_name)
font->ascent = MAX (font->ascent, font_structs[i]->ascent); font->ascent = MAX (font->ascent, font_structs[i]->ascent);
font->descent = MAX (font->descent, font_structs[i]->descent); font->descent = MAX (font->descent, font_structs[i]->descent);
} }
private->names = NULL;
gdk_font_hash_insert (GDK_FONT_FONTSET, font, fontset_name);
return font;
} }
return font;
} }
GdkFont* GdkFont*
@ -141,14 +213,16 @@ void
gdk_font_unref (GdkFont *font) gdk_font_unref (GdkFont *font)
{ {
GdkFontPrivate *private; GdkFontPrivate *private;
private = (GdkFontPrivate*) font;
g_return_if_fail (font != NULL); g_return_if_fail (font != NULL);
g_return_if_fail (private->ref_count > 0);
private = (GdkFontPrivate*) font;
private->ref_count -= 1; private->ref_count -= 1;
if (private->ref_count == 0) if (private->ref_count == 0)
{ {
gdk_font_hash_remove (font->type, font);
switch (font->type) switch (font->type)
{ {
case GDK_FONT_FONT: case GDK_FONT_FONT:
@ -205,8 +279,12 @@ gdk_font_equal (const GdkFont *fonta,
} }
else if (fonta->type == GDK_FONT_FONTSET && fontb->type == GDK_FONT_FONTSET) else if (fonta->type == GDK_FONT_FONTSET && fontb->type == GDK_FONT_FONTSET)
{ {
/* how to compare two fontsets ?? by basename or XFontSet ?? */ gchar *namea, *nameb;
return (((XFontSet) privatea->xfont) == ((XFontSet) privateb->xfont));
namea = XBaseFontNameListOfFontSet((XFontSet) privatea->xfont);
nameb = XBaseFontNameListOfFontSet((XFontSet) privateb->xfont);
return (strcmp(namea, nameb) == 0);
} }
else else
/* fontset != font */ /* fontset != font */
@ -578,7 +656,20 @@ gdk_text_extents_wc (GdkFont *font,
} }
case GDK_FONT_FONTSET: case GDK_FONT_FONTSET:
fontset = (XFontSet) private->xfont; fontset = (XFontSet) private->xfont;
XwcTextExtents (fontset, text, text_length, &ink, &logical);
if (sizeof(GdkWChar) == sizeof(wchar_t))
XwcTextExtents (fontset, (wchar_t *)text, text_length, &ink, &logical);
else
{
wchar_t *text_wchar;
gint i;
text_wchar = g_new (wchar_t, text_length);
for (i = 0; i < text_length; i++)
text_wchar[i] = text[i];
XwcTextExtents (fontset, text_wchar, text_length, &ink, &logical);
g_free (text_wchar);
}
if (lbearing) if (lbearing)
*lbearing = ink.x; *lbearing = ink.x;
if (rbearing) if (rbearing)
@ -652,7 +743,7 @@ gdk_text_measure (GdkFont *font,
case GDK_FONT_FONTSET: case GDK_FONT_FONTSET:
fontset = (XFontSet) private->xfont; fontset = (XFontSet) private->xfont;
XmbTextExtents (fontset, text, text_length, &ink, &log); XmbTextExtents (fontset, text, text_length, &ink, &log);
width = log.width; width = ink.x + ink.width;
break; break;
default: default:
width = 0; width = 0;

View file

@ -286,6 +286,7 @@ gdk_gc_unref (GdkGC *gc)
GdkGCPrivate *private = (GdkGCPrivate*) gc; GdkGCPrivate *private = (GdkGCPrivate*) gc;
g_return_if_fail (gc != NULL); g_return_if_fail (gc != NULL);
g_return_if_fail (private->ref_count > 0);
if (private->ref_count > 1) if (private->ref_count > 1)
private->ref_count -= 1; private->ref_count -= 1;

View file

@ -57,7 +57,7 @@ GdkDndGlobals gdk_dnd = {None,None,None,
{0,0}, {0,0}, {0,0}, {0,0},
{0,0,0,0}, NULL, None, 0}; {0,0,0,0}, NULL, None, 0};
gchar *gdk_progclass = NULL; gchar *gdk_progclass = NULL;
gint gdk_error_code; gint gdk_error_code = 0;
gint gdk_error_warnings = TRUE; gint gdk_error_warnings = TRUE;
gint gdk_null_window_warnings = TRUE; gint gdk_null_window_warnings = TRUE;
GList *gdk_default_filters = NULL; GList *gdk_default_filters = NULL;

View file

@ -386,7 +386,7 @@ gdk_im_real_open (void)
destroy_cb.callback = gdk_im_destroy_cb; destroy_cb.callback = gdk_im_destroy_cb;
destroy_cb.client_data = NULL; destroy_cb.client_data = NULL;
if (NULL != XSetIMValues (xim_im, XNDestroyCallback, &destroy_cb, NULL)) if (NULL != (void *) XSetIMValues (xim_im, XNDestroyCallback, &destroy_cb, NULL))
GDK_NOTE (XIM, g_warning ("Could not set destroy callback to IM. Be careful to not destroy your input method.")); GDK_NOTE (XIM, g_warning ("Could not set destroy callback to IM. Be careful to not destroy your input method."));
#endif #endif
@ -469,7 +469,7 @@ gdk_ic_real_new (GdkIC *ic)
mask |= GDK_IC_PREEDIT_AREA_REQ; mask |= GDK_IC_PREEDIT_AREA_REQ;
preedit_area.x = attr->preedit_area.x; preedit_area.x = attr->preedit_area.x;
preedit_area.y = attr->preedit_area.x; preedit_area.y = attr->preedit_area.y;
preedit_area.width = attr->preedit_area.width; preedit_area.width = attr->preedit_area.width;
preedit_area.height = attr->preedit_area.height; preedit_area.height = attr->preedit_area.height;
@ -484,7 +484,7 @@ gdk_ic_real_new (GdkIC *ic)
mask |= GDK_IC_PREEDIT_POSITION_REQ; mask |= GDK_IC_PREEDIT_POSITION_REQ;
preedit_area.x = attr->preedit_area.x; preedit_area.x = attr->preedit_area.x;
preedit_area.y = attr->preedit_area.x; preedit_area.y = attr->preedit_area.y;
preedit_area.width = attr->preedit_area.width; preedit_area.width = attr->preedit_area.width;
preedit_area.height = attr->preedit_area.height; preedit_area.height = attr->preedit_area.height;
@ -506,7 +506,7 @@ gdk_ic_real_new (GdkIC *ic)
mask |= GDK_IC_STATUS_AREA_REQ; mask |= GDK_IC_STATUS_AREA_REQ;
status_area.x = attr->status_area.x; status_area.x = attr->status_area.x;
status_area.y = attr->status_area.x; status_area.y = attr->status_area.y;
status_area.width = attr->status_area.width; status_area.width = attr->status_area.width;
status_area.height = attr->status_area.height; status_area.height = attr->status_area.height;
@ -518,6 +518,12 @@ gdk_ic_real_new (GdkIC *ic)
break; break;
} }
/* We have to ensure that the client window is actually created on
* the X server, or XCreateIC fails because the XIM server can't get
* information about the client window.
*/
gdk_flush();
if (preedit_attr != NULL && status_attr != NULL) if (preedit_attr != NULL && status_attr != NULL)
private->xic = XCreateIC (xim_im, private->xic = XCreateIC (xim_im,
XNInputStyle, XNInputStyle,
@ -871,7 +877,7 @@ gdk_ic_real_set_attr (GdkIC *ic,
arg->name = XNFontSet; arg->name = XNFontSet;
arg->value = (gpointer) GDK_FONT_XFONT(attr->status_fontset); arg->value = (gpointer) GDK_FONT_XFONT(attr->status_fontset);
if (XSetICValues (xic, XNPreeditAttributes, arg, NULL)) if (XSetICValues (xic, XNStatusAttributes, arg, NULL))
error |= GDK_IC_STATUS_FONTSET; error |= GDK_IC_STATUS_FONTSET;
} }
@ -887,7 +893,7 @@ gdk_ic_real_set_attr (GdkIC *ic,
arg->name = XNArea; arg->name = XNArea;
arg->value = (gpointer) &rect; arg->value = (gpointer) &rect;
if (XSetICValues (xic, XNPreeditAttributes, arg, NULL)) if (XSetICValues (xic, XNStatusAttributes, arg, NULL))
error |= GDK_IC_STATUS_AREA; error |= GDK_IC_STATUS_AREA;
} }
@ -903,7 +909,7 @@ gdk_ic_real_set_attr (GdkIC *ic,
arg->name = XNArea; arg->name = XNArea;
arg->value = (gpointer) &rect; arg->value = (gpointer) &rect;
if (XSetICValues (xic, XNPreeditAttributes, arg, NULL)) if (XSetICValues (xic, XNStatusAttributes, arg, NULL))
error |= GDK_IC_STATUS_AREA_NEEDED; error |= GDK_IC_STATUS_AREA_NEEDED;
else else
private->mask &= ~GDK_IC_STATUS_AREA_NEEDED; private->mask &= ~GDK_IC_STATUS_AREA_NEEDED;
@ -914,7 +920,7 @@ gdk_ic_real_set_attr (GdkIC *ic,
arg->name = XNForeground; arg->name = XNForeground;
arg->value = (gpointer) attr->status_foreground.pixel; arg->value = (gpointer) attr->status_foreground.pixel;
if (XSetICValues (xic, XNPreeditAttributes, arg, NULL)) if (XSetICValues (xic, XNStatusAttributes, arg, NULL))
error |= GDK_IC_STATUS_FOREGROUND; error |= GDK_IC_STATUS_FOREGROUND;
} }
@ -923,7 +929,7 @@ gdk_ic_real_set_attr (GdkIC *ic,
arg->name = XNBackground; arg->name = XNBackground;
arg->value = (gpointer) attr->status_background.pixel; arg->value = (gpointer) attr->status_background.pixel;
if (XSetICValues (xic, XNPreeditAttributes, arg, NULL)) if (XSetICValues (xic, XNStatusAttributes, arg, NULL))
error |= GDK_IC_STATUS_BACKGROUND; error |= GDK_IC_STATUS_BACKGROUND;
} }
@ -932,7 +938,7 @@ gdk_ic_real_set_attr (GdkIC *ic,
arg->name = XNBackgroundPixmap; arg->name = XNBackgroundPixmap;
arg->value = (gpointer) GDK_WINDOW_XWINDOW(attr->status_pixmap); arg->value = (gpointer) GDK_WINDOW_XWINDOW(attr->status_pixmap);
if (XSetICValues (xic, XNPreeditAttributes, arg, NULL)) if (XSetICValues (xic, XNStatusAttributes, arg, NULL))
error |= GDK_IC_STATUS_PIXMAP; error |= GDK_IC_STATUS_PIXMAP;
} }
@ -941,7 +947,7 @@ gdk_ic_real_set_attr (GdkIC *ic,
arg->name = XNColormap; arg->name = XNColormap;
arg->value = (gpointer) GDK_COLORMAP_XCOLORMAP(attr->status_colormap); arg->value = (gpointer) GDK_COLORMAP_XCOLORMAP(attr->status_colormap);
if (XSetICValues (xic, XNPreeditAttributes, arg, NULL)) if (XSetICValues (xic, XNStatusAttributes, arg, NULL))
error |= GDK_IC_STATUS_COLORMAP; error |= GDK_IC_STATUS_COLORMAP;
} }
@ -1565,8 +1571,10 @@ gdk_mbstowcs (GdkWChar *dest, const gchar *src, gint dest_max)
!= Success) != Success)
{ {
/* InvalidChar */ /* InvalidChar */
XFree(tpr.value);
return -1; return -1;
} }
XFree(tpr.value);
if (num_wstrs == 0) if (num_wstrs == 0)
return 0; return 0;
wstr_src = wstrs[0]; wstr_src = wstrs[0];

View file

@ -251,14 +251,12 @@ gdk_image_new (GdkImageType type,
return NULL; return NULL;
} }
gdk_error_code = 0; gdk_error_trap_push ();
gdk_error_warnings = 0;
XShmAttach (private->xdisplay, x_shm_info); XShmAttach (private->xdisplay, x_shm_info);
XSync (private->xdisplay, False); XSync (private->xdisplay, False);
gdk_error_warnings = 1; if (gdk_error_trap_pop ())
if (gdk_error_code == -1)
{ {
/* this is the common failure case so omit warning */ /* this is the common failure case so omit warning */
XDestroyImage (private->ximage); XDestroyImage (private->ximage);
@ -269,6 +267,7 @@ gdk_image_new (GdkImageType type,
g_free (image); g_free (image);
gdk_use_xshm = False; gdk_use_xshm = False;
return NULL; return NULL;
} }
@ -315,22 +314,7 @@ gdk_image_new (GdkImageType type,
image->byte_order = private->ximage->byte_order; image->byte_order = private->ximage->byte_order;
image->mem = private->ximage->data; image->mem = private->ximage->data;
image->bpl = private->ximage->bytes_per_line; image->bpl = private->ximage->bytes_per_line;
image->bpp = (private->ximage->bits_per_pixel + 7) / 8;
switch (private->ximage->bits_per_pixel)
{
case 8:
image->bpp = 1;
break;
case 16:
image->bpp = 2;
break;
case 24:
image->bpp = 3;
break;
case 32:
image->bpp = 4;
break;
}
} }
} }

View file

@ -518,7 +518,7 @@ _gdk_pixmap_create_from_xpm (GdkWindow *window,
color_name = gdk_pixmap_extract_color (buffer); color_name = gdk_pixmap_extract_color (buffer);
if (color_name == NULL || if (color_name == NULL || g_strcasecmp (color_name, "None") == 0 ||
gdk_color_parse (color_name, &color->color) == FALSE) gdk_color_parse (color_name, &color->color) == FALSE)
{ {
color->color = *transparent_color; color->color = *transparent_color;
@ -817,7 +817,8 @@ void
gdk_pixmap_unref (GdkPixmap *pixmap) gdk_pixmap_unref (GdkPixmap *pixmap)
{ {
GdkWindowPrivate *private = (GdkWindowPrivate *)pixmap; GdkWindowPrivate *private = (GdkWindowPrivate *)pixmap;
g_return_if_fail(pixmap != NULL); g_return_if_fail (pixmap != NULL);
g_return_if_fail (private->ref_count > 0);
private->ref_count -= 1; private->ref_count -= 1;
if (private->ref_count == 0) if (private->ref_count == 0)

View file

@ -146,6 +146,8 @@ struct _GdkFontPrivate
gpointer xfont; gpointer xfont;
Display *xdisplay; Display *xdisplay;
guint ref_count; guint ref_count;
GSList *names;
}; };
struct _GdkCursorPrivate struct _GdkCursorPrivate

View file

@ -45,15 +45,16 @@ gdk_atom_intern (const gchar *atom_name,
{ {
retval = XInternAtom (gdk_display, atom_name, only_if_exists); retval = XInternAtom (gdk_display, atom_name, only_if_exists);
g_hash_table_insert (atom_hash, if (retval != None)
g_strdup (atom_name), g_hash_table_insert (atom_hash,
GUINT_TO_POINTER (retval)); g_strdup (atom_name),
GUINT_TO_POINTER (retval));
} }
return retval; return retval;
} }
gchar * gchar*
gdk_atom_name (GdkAtom atom) gdk_atom_name (GdkAtom atom)
{ {
gchar *t; gchar *t;
@ -69,7 +70,7 @@ gdk_atom_name (GdkAtom atom)
t = XGetAtomName (gdk_display, atom); t = XGetAtomName (gdk_display, atom);
gdk_error_warnings = old_error_warnings; gdk_error_warnings = old_error_warnings;
if (gdk_error_code == -1) if (gdk_error_code)
{ {
if (t) if (t)
XFree (t); XFree (t);
@ -162,10 +163,10 @@ gdk_property_get (GdkWindow *window,
ret_length = ret_nitems; ret_length = ret_nitems;
break; break;
case 16: case 16:
ret_length = 2 * ret_nitems; ret_length = sizeof(short) * ret_nitems;
break; break;
case 32: case 32:
ret_length = 4 * ret_nitems; ret_length = sizeof(long) * ret_nitems;
break; break;
default: default:
g_warning ("unknown property return format: %d", ret_format); g_warning ("unknown property return format: %d", ret_format);

View file

@ -482,27 +482,30 @@ gdk_rgb_score_visual (GdkVisual *visual)
static void static void
gdk_rgb_choose_visual (void) gdk_rgb_choose_visual (void)
{ {
GList *visuals; GList *visuals, *tmp_list;
guint32 score, best_score; guint32 score, best_score;
GdkVisual *visual, *best_visual; GdkVisual *visual, *best_visual;
visuals = gdk_list_visuals (); visuals = gdk_list_visuals ();
tmp_list = visuals;
best_visual = visuals->data; best_visual = tmp_list->data;
best_score = gdk_rgb_score_visual (best_visual); best_score = gdk_rgb_score_visual (best_visual);
visuals = visuals->next; tmp_list = tmp_list->next;
while (visuals) while (tmp_list)
{ {
visual = visuals->data; visual = tmp_list->data;
score = gdk_rgb_score_visual (visual); score = gdk_rgb_score_visual (visual);
if (score > best_score) if (score > best_score)
{ {
best_score = score; best_score = score;
best_visual = visual; best_visual = visual;
} }
visuals = visuals->next; tmp_list = tmp_list->next;
} }
g_list_free (visuals);
image_info->visual = best_visual; image_info->visual = best_visual;
} }

View file

@ -105,11 +105,11 @@ gdk_selection_property_get (GdkWindow *requestor,
gulong length; gulong length;
GdkAtom prop_type; GdkAtom prop_type;
gint prop_format; gint prop_format;
guchar *t; guchar *t = NULL;
g_return_val_if_fail (requestor != NULL, 0); g_return_val_if_fail (requestor != NULL, 0);
/* If retrieved chunks are typically small, (and the ICCM says the /* If retrieved chunks are typically small, (and the ICCCM says the
should be) it would be a win to try first with a buffer of should be) it would be a win to try first with a buffer of
moderate length, to avoid two round trips to the server */ moderate length, to avoid two round trips to the server */
@ -136,8 +136,8 @@ gdk_selection_property_get (GdkWindow *requestor,
if (t) if (t)
{ {
t = NULL;
XFree (t); XFree (t);
t = NULL;
} }
/* Add on an extra byte to handle null termination. X guarantees /* Add on an extra byte to handle null termination. X guarantees
@ -188,7 +188,7 @@ gdk_selection_send_notify (guint32 requestor,
xevent.property = property; xevent.property = property;
xevent.time = time; xevent.time = time;
XSendEvent (gdk_display, requestor, False, NoEventMask, (XEvent*) &xevent); gdk_send_xevent (requestor, False, NoEventMask, (XEvent*) &xevent);
} }
gint gint

View file

@ -34,17 +34,9 @@
#include "gdkprivate.h" #include "gdkprivate.h"
#include "MwmUtil.h" #include "MwmUtil.h"
#if HAVE_CONFIG_H #include <stdlib.h>
# include <config.h> #include <stdio.h>
# if STDC_HEADERS #include <string.h>
# include <stdlib.h>
# include <stdio.h>
# include <string.h>
# endif
#else
# include <stdlib.h>
# include <stdio.h>
#endif
#ifdef HAVE_SHAPE_EXT #ifdef HAVE_SHAPE_EXT
@ -707,10 +699,10 @@ gdk_window_destroy_notify (GdkWindow *window)
if (!private->destroyed) if (!private->destroyed)
{ {
if (private->window_type == GDK_WINDOW_FOREIGN) if (private->window_type != GDK_WINDOW_FOREIGN)
gdk_window_internal_destroy (window, FALSE, FALSE);
else
g_warning ("GdkWindow %#lx unexpectedly destroyed", private->xwindow); g_warning ("GdkWindow %#lx unexpectedly destroyed", private->xwindow);
gdk_window_internal_destroy (window, FALSE, FALSE);
} }
gdk_xid_table_remove (private->xwindow); gdk_xid_table_remove (private->xwindow);
@ -732,6 +724,7 @@ gdk_window_unref (GdkWindow *window)
{ {
GdkWindowPrivate *private = (GdkWindowPrivate *)window; GdkWindowPrivate *private = (GdkWindowPrivate *)window;
g_return_if_fail (window != NULL); g_return_if_fail (window != NULL);
g_return_if_fail (private->ref_count > 0);
private->ref_count -= 1; private->ref_count -= 1;
if (private->ref_count == 0) if (private->ref_count == 0)
@ -1089,8 +1082,10 @@ gdk_window_set_hints (GdkWindow *window,
size_hints.max_height = max_height; size_hints.max_height = max_height;
} }
if (flags) /* FIXME: Would it be better to delete this property of
XSetWMNormalHints (private->xdisplay, private->xwindow, &size_hints); * flags == 0? It would save space on the server
*/
XSetWMNormalHints (private->xdisplay, private->xwindow, &size_hints);
} }
void void
@ -1110,7 +1105,15 @@ gdk_window_set_geometry_hints (GdkWindow *window,
size_hints.flags = 0; size_hints.flags = 0;
if (geom_mask & GDK_HINT_POS) if (geom_mask & GDK_HINT_POS)
size_hints.flags |= PPosition; {
size_hints.flags |= PPosition;
/* We need to initialize the following obsolete fields because KWM
* apparently uses these fields if they are non-zero.
* #@#!#!$!.
*/
size_hints.x = 0;
size_hints.y = 0;
}
if (geom_mask & GDK_HINT_MIN_SIZE) if (geom_mask & GDK_HINT_MIN_SIZE)
{ {
@ -1145,28 +1148,30 @@ gdk_window_set_geometry_hints (GdkWindow *window,
size_hints.flags |= PAspect; size_hints.flags |= PAspect;
if (geometry->min_aspect <= 1) if (geometry->min_aspect <= 1)
{ {
size_hints.min_aspect.x = G_MAXINT * geometry->min_aspect; size_hints.min_aspect.x = 65536 * geometry->min_aspect;
size_hints.min_aspect.y = G_MAXINT; size_hints.min_aspect.y = 65536;
} }
else else
{ {
size_hints.min_aspect.x = G_MAXINT; size_hints.min_aspect.x = 65536;
size_hints.min_aspect.y = G_MAXINT / geometry->min_aspect;; size_hints.min_aspect.y = 65536 / geometry->min_aspect;;
} }
if (geometry->max_aspect <= 1) if (geometry->max_aspect <= 1)
{ {
size_hints.max_aspect.x = G_MAXINT * geometry->max_aspect; size_hints.max_aspect.x = 65536 * geometry->max_aspect;
size_hints.max_aspect.y = G_MAXINT; size_hints.max_aspect.y = 65536;
} }
else else
{ {
size_hints.max_aspect.x = G_MAXINT; size_hints.max_aspect.x = 65536;
size_hints.max_aspect.y = G_MAXINT / geometry->max_aspect;; size_hints.max_aspect.y = 65536 / geometry->max_aspect;;
} }
} }
if (geom_mask) /* FIXME: Would it be better to delete this property of
XSetWMNormalHints (private->xdisplay, private->xwindow, &size_hints); * geom_mask == 0? It would save space on the server
*/
XSetWMNormalHints (private->xdisplay, private->xwindow, &size_hints);
} }
void void

View file

@ -491,10 +491,11 @@ init_palette (GdkColorContext *cc)
if (cc->color_hash) if (cc->color_hash)
{ {
/* XXX: quick-and-dirty way to remove everything */ g_hash_table_foreach (cc->color_hash,
free_hash_entry,
NULL);
g_hash_table_destroy (cc->color_hash); g_hash_table_destroy (cc->color_hash);
cc->color_hash = g_hash_table_new (hash_color, compare_colors); cc->color_hash = NULL;
} }
cc->palette = NULL; cc->palette = NULL;
@ -618,11 +619,6 @@ gdk_color_context_new (GdkVisual *visual,
g_message ("gdk_color_context_new: screen depth is %i, no. of colors is %i\n", g_message ("gdk_color_context_new: screen depth is %i, no. of colors is %i\n",
cc->visual->depth, cc->num_colors)); cc->visual->depth, cc->num_colors));
/* check if we need to initialize a hash table */
if ((cc->mode == GDK_CC_MODE_STD_CMAP) || (cc->mode == GDK_CC_MODE_UNDEFINED))
cc->color_hash = g_hash_table_new (hash_color, compare_colors);
return (GdkColorContext *) cc; return (GdkColorContext *) cc;
} }
@ -680,14 +676,6 @@ gdk_color_context_free (GdkColorContext *cc)
init_palette (cc); init_palette (cc);
if (cc->color_hash)
{
g_hash_table_foreach (cc->color_hash,
free_hash_entry,
NULL);
g_hash_table_destroy (cc->color_hash);
}
g_free (cc); g_free (cc);
} }
@ -780,13 +768,14 @@ gdk_color_context_get_pixel (GdkColorContext *cc,
default: default:
{ {
GdkColor color; GdkColor color;
GdkColor *result; GdkColor *result = NULL;
color.red = red; color.red = red;
color.green = green; color.green = green;
color.blue = blue; color.blue = blue;
result = g_hash_table_lookup (cc->color_hash, &color); if (cc->color_hash)
result = g_hash_table_lookup (cc->color_hash, &color);
if (!result) if (!result)
{ {
@ -831,6 +820,9 @@ gdk_color_context_get_pixel (GdkColorContext *cc,
cnew = g_new (GdkColor, 1); cnew = g_new (GdkColor, 1);
*cnew = color; *cnew = color;
if (!cc->color_hash)
cc->color_hash = g_hash_table_new (hash_color, compare_colors);
g_hash_table_insert (cc->color_hash, cnew, cnew); g_hash_table_insert (cc->color_hash, cnew, cnew);
cc->clut[cc->num_allocated] = color.pixel; cc->clut[cc->num_allocated] = color.pixel;
@ -1489,20 +1481,7 @@ gdk_color_context_add_palette (GdkColorContext *cc,
/* restore previous mode if we aren't adding a new palette */ /* restore previous mode if we aren't adding a new palette */
if (num_palette == 0) if (num_palette == 0)
{ return 0;
/* GDK_CC_MODE_STD_CMAP uses a hash table, so we'd better initialize one */
/* XXX: here, the hash table is already initialized */
return 0;
}
/* Initialize a hash table for this palette (we need one for allocating
* the pixels in the palette using the current settings)
*/
if (cc->color_hash == NULL)
cc->color_hash = g_hash_table_new (hash_color, compare_colors);
/* copy incoming palette */ /* copy incoming palette */
@ -1549,6 +1528,9 @@ gdk_color_context_add_palette (GdkColorContext *cc,
if (cc->color_hash) if (cc->color_hash)
{ {
g_hash_table_foreach (cc->color_hash,
free_hash_entry,
NULL);
g_hash_table_destroy (cc->color_hash); g_hash_table_destroy (cc->color_hash);
cc->color_hash = NULL; cc->color_hash = NULL;
} }

View file

@ -70,13 +70,14 @@ gdk_colormap_new (GdkVisual *visual,
xvisual = ((GdkVisualPrivate*) visual)->xvisual; xvisual = ((GdkVisualPrivate*) visual)->xvisual;
colormap->size = visual->colormap_size; colormap->size = visual->colormap_size;
colormap->colors = g_new (GdkColor, colormap->size); colormap->colors = NULL;
switch (visual->type) switch (visual->type)
{ {
case GDK_VISUAL_GRAYSCALE: case GDK_VISUAL_GRAYSCALE:
case GDK_VISUAL_PSEUDO_COLOR: case GDK_VISUAL_PSEUDO_COLOR:
private->info = g_new0 (GdkColorInfo, colormap->size); private->info = g_new0 (GdkColorInfo, colormap->size);
colormap->colors = g_new (GdkColor, colormap->size);
private->hash = g_hash_table_new ((GHashFunc) gdk_color_hash, private->hash = g_hash_table_new ((GHashFunc) gdk_color_hash,
(GCompareFunc) gdk_color_equal); (GCompareFunc) gdk_color_equal);
@ -116,6 +117,7 @@ gdk_colormap_new (GdkVisual *visual,
private->private_val = TRUE; private->private_val = TRUE;
private->xcolormap = XCreateColormap (private->xdisplay, gdk_root_window, private->xcolormap = XCreateColormap (private->xdisplay, gdk_root_window,
xvisual, AllocAll); xvisual, AllocAll);
colormap->colors = g_new (GdkColor, colormap->size);
size = 1 << visual->red_prec; size = 1 << visual->red_prec;
for (i = 0; i < size; i++) for (i = 0; i < size; i++)
@ -428,56 +430,7 @@ gdk_colors_alloc (GdkColormap *colormap,
} }
} }
return return_val; return return_val != 0;
}
/* This is almost identical to gdk_colormap_free_colors.
* Keep them in sync!
*/
void
gdk_colors_free (GdkColormap *colormap,
gulong *in_pixels,
gint in_npixels,
gulong planes)
{
GdkColormapPrivate *private;
gulong *pixels;
gint npixels = 0;
gint i;
g_return_if_fail (colormap != NULL);
g_return_if_fail (in_pixels != NULL);
private = (GdkColormapPrivate*) colormap;
if ((private->visual->type != GDK_VISUAL_PSEUDO_COLOR) &&
(private->visual->type != GDK_VISUAL_GRAYSCALE))
return;
pixels = g_new (gulong, in_npixels);
for (i=0; i<in_npixels; i++)
{
gulong pixel = in_pixels[i];
if (private->info[pixel].ref_count)
{
private->info[pixel].ref_count--;
if (private->info[pixel].ref_count == 0)
{
pixels[npixels++] = pixel;
if (!(private->info[pixel].flags & GDK_COLOR_WRITEABLE))
g_hash_table_remove (private->hash, &colormap->colors[in_pixels[i]]);
private->info[pixel].flags = 0;
}
}
}
if (npixels)
XFreeColors (private->xdisplay, private->xcolormap,
pixels, npixels, planes);
g_free (pixels);
} }
/* /*
@ -536,7 +489,7 @@ gdk_color_free (GdkColor *color)
g_mem_chunk_free (color_chunk, color); g_mem_chunk_free (color_chunk, color);
} }
gint gboolean
gdk_color_white (GdkColormap *colormap, gdk_color_white (GdkColormap *colormap,
GdkColor *color) GdkColor *color)
{ {
@ -559,7 +512,7 @@ gdk_color_white (GdkColormap *colormap,
return return_val; return return_val;
} }
gint gboolean
gdk_color_black (GdkColormap *colormap, gdk_color_black (GdkColormap *colormap,
GdkColor *color) GdkColor *color)
{ {
@ -608,6 +561,104 @@ gdk_color_parse (const gchar *spec,
return return_val; return return_val;
} }
/* This is almost identical to gdk_colormap_free_colors.
* Keep them in sync!
*/
void
gdk_colors_free (GdkColormap *colormap,
gulong *in_pixels,
gint in_npixels,
gulong planes)
{
GdkColormapPrivate *private;
gulong *pixels;
gint npixels = 0;
gint i;
g_return_if_fail (colormap != NULL);
g_return_if_fail (in_pixels != NULL);
private = (GdkColormapPrivate*) colormap;
if ((private->visual->type != GDK_VISUAL_PSEUDO_COLOR) &&
(private->visual->type != GDK_VISUAL_GRAYSCALE))
return;
pixels = g_new (gulong, in_npixels);
for (i=0; i<in_npixels; i++)
{
gulong pixel = in_pixels[i];
if (private->info[pixel].ref_count)
{
private->info[pixel].ref_count--;
if (private->info[pixel].ref_count == 0)
{
pixels[npixels++] = pixel;
if (!(private->info[pixel].flags & GDK_COLOR_WRITEABLE))
g_hash_table_remove (private->hash, &colormap->colors[pixel]);
private->info[pixel].flags = 0;
}
}
}
if (npixels)
XFreeColors (private->xdisplay, private->xcolormap,
pixels, npixels, planes);
g_free (pixels);
}
/* This is almost identical to gdk_colors_free.
* Keep them in sync!
*/
void
gdk_colormap_free_colors (GdkColormap *colormap,
GdkColor *colors,
gint ncolors)
{
GdkColormapPrivate *private;
gulong *pixels;
gint npixels = 0;
gint i;
g_return_if_fail (colormap != NULL);
g_return_if_fail (colors != NULL);
private = (GdkColormapPrivate*) colormap;
if ((private->visual->type != GDK_VISUAL_PSEUDO_COLOR) &&
(private->visual->type != GDK_VISUAL_GRAYSCALE))
return;
pixels = g_new (gulong, ncolors);
for (i=0; i<ncolors; i++)
{
gulong pixel = colors[i].pixel;
if (private->info[pixel].ref_count)
{
private->info[pixel].ref_count--;
if (private->info[pixel].ref_count == 0)
{
pixels[npixels++] = pixel;
if (!(private->info[pixel].flags & GDK_COLOR_WRITEABLE))
g_hash_table_remove (private->hash, &colormap->colors[pixel]);
private->info[pixel].flags = 0;
}
}
}
if (npixels)
XFreeColors (private->xdisplay, private->xcolormap,
pixels, npixels, 0);
g_free (pixels);
}
/******************** /********************
* Color allocation * * Color allocation *
********************/ ********************/
@ -648,6 +699,7 @@ gdk_colormap_alloc1 (GdkColormap *colormap,
else else
{ {
colormap->colors[ret->pixel] = *color; colormap->colors[ret->pixel] = *color;
colormap->colors[ret->pixel].pixel = ret->pixel;
private->info[ret->pixel].ref_count = 1; private->info[ret->pixel].ref_count = 1;
g_hash_table_insert (private->hash, g_hash_table_insert (private->hash,
@ -1025,55 +1077,6 @@ gdk_colormap_alloc_color (GdkColormap *colormap,
return success; return success;
} }
/* This is almost identical to gdk_colors_free.
* Keep them in sync!
*/
void
gdk_colormap_free_colors (GdkColormap *colormap,
GdkColor *colors,
gint ncolors)
{
GdkColormapPrivate *private;
gulong *pixels;
gint npixels = 0;
gint i;
g_return_if_fail (colormap != NULL);
g_return_if_fail (colors != NULL);
private = (GdkColormapPrivate*) colormap;
if ((private->visual->type != GDK_VISUAL_PSEUDO_COLOR) &&
(private->visual->type != GDK_VISUAL_GRAYSCALE))
return;
pixels = g_new (gulong, ncolors);
for (i=0; i<ncolors; i++)
{
gulong pixel = colors[i].pixel;
if (private->info[pixel].ref_count)
{
private->info[pixel].ref_count--;
if (private->info[pixel].ref_count == 0)
{
pixels[npixels++] = pixel;
if (!(private->info[pixel].flags & GDK_COLOR_WRITEABLE))
g_hash_table_remove (private->hash, &colors[i]);
private->info[pixel].flags = 0;
}
}
}
if (npixels)
XFreeColors (private->xdisplay, private->xcolormap,
pixels, npixels, 0);
g_free (pixels);
}
gboolean gboolean
gdk_color_alloc (GdkColormap *colormap, gdk_color_alloc (GdkColormap *colormap,
GdkColor *color) GdkColor *color)

View file

@ -31,8 +31,6 @@
#include "gdk/gdkprivate.h" #include "gdk/gdkprivate.h"
#include "gdk.h" #include "gdk.h"
#define NEW_DRAGS
typedef struct _GdkDragContextPrivate GdkDragContextPrivate; typedef struct _GdkDragContextPrivate GdkDragContextPrivate;
typedef enum { typedef enum {
@ -70,7 +68,8 @@ struct _GdkDragContextPrivate {
GdkDragAction old_actions; /* The last actions we sent to the source */ GdkDragAction old_actions; /* The last actions we sent to the source */
GdkDragAction xdnd_actions; /* What is currently set in XdndActionList */ GdkDragAction xdnd_actions; /* What is currently set in XdndActionList */
Window dest_xid; Window dest_xid; /* The last window we looked up */
Window drop_xid; /* The (non-proxied) window that is receiving drops */
guint xdnd_targets_set : 1; /* Whether we've already set XdndTypeList */ guint xdnd_targets_set : 1; /* Whether we've already set XdndTypeList */
guint xdnd_actions_set : 1; /* Whether we've already set XdndActionList */ guint xdnd_actions_set : 1; /* Whether we've already set XdndActionList */
guint xdnd_have_actions : 1; /* Whether an XdndActionList was provided */ guint xdnd_have_actions : 1; /* Whether an XdndActionList was provided */
@ -151,6 +150,7 @@ gdk_drag_context_unref (GdkDragContext *context)
GdkDragContextPrivate *private = (GdkDragContextPrivate *)context; GdkDragContextPrivate *private = (GdkDragContextPrivate *)context;
g_return_if_fail (context != NULL); g_return_if_fail (context != NULL);
g_return_if_fail (private->ref_count > 0);
private->ref_count--; private->ref_count--;
@ -196,8 +196,8 @@ gdk_drag_context_find (gboolean is_source,
private = (GdkDragContextPrivate *)context; private = (GdkDragContextPrivate *)context;
context_dest_xid = context->dest_window ? context_dest_xid = context->dest_window ?
(private->dest_xid ? (private->drop_xid ?
private->dest_xid : private->drop_xid :
GDK_WINDOW_XWINDOW (context->dest_window)) : GDK_WINDOW_XWINDOW (context->dest_window)) :
None; None;
@ -387,7 +387,7 @@ gdk_window_cache_new (void)
xwa.x, xwa.y, xwa.width, xwa.height, xwa.x, xwa.y, xwa.width, xwa.height,
xwa.map_state != IsUnmapped); xwa.map_state != IsUnmapped);
if (gdk_error_code != 0) if (gdk_error_code)
gdk_error_code = 0; gdk_error_code = 0;
else else
{ {
@ -441,9 +441,10 @@ get_client_window_at_coords_recurse (Window win,
wm_state_atom, 0, 0, False, AnyPropertyType, wm_state_atom, 0, 0, False, AnyPropertyType,
&type, &format, &nitems, &after, &data); &type, &format, &nitems, &after, &data);
if (gdk_error_code != 0) if (gdk_error_code)
{ {
gdk_error_code = 0; gdk_error_code = 0;
return None; return None;
} }
@ -458,9 +459,10 @@ get_client_window_at_coords_recurse (Window win,
XTranslateCoordinates (gdk_display, gdk_root_window, win, XTranslateCoordinates (gdk_display, gdk_root_window, win,
x_root, y_root, &dest_x, &dest_y, &child); x_root, y_root, &dest_x, &dest_y, &child);
if (gdk_error_code != 0) if (gdk_error_code)
{ {
gdk_error_code = 0; gdk_error_code = 0;
return None; return None;
} }
@ -469,7 +471,7 @@ get_client_window_at_coords_recurse (Window win,
&root, &tmp_parent, &children, &nchildren) == 0) &root, &tmp_parent, &children, &nchildren) == 0)
return 0; return 0;
if (gdk_error_code == 0) if (!gdk_error_code)
{ {
for (i = nchildren - 1; (i >= 0) && (child == None); i--) for (i = nchildren - 1; (i >= 0) && (child == None); i--)
{ {
@ -477,7 +479,7 @@ get_client_window_at_coords_recurse (Window win,
XGetWindowAttributes (gdk_display, children[i], &xwa); XGetWindowAttributes (gdk_display, children[i], &xwa);
if (gdk_error_code != 0) if (gdk_error_code)
gdk_error_code = 0; gdk_error_code = 0;
else if ((xwa.map_state == IsViewable) && (xwa.class == InputOutput) && else if ((xwa.map_state == IsViewable) && (xwa.class == InputOutput) &&
(x >= xwa.x) && (x < xwa.x + (gint)xwa.width) && (x >= xwa.x) && (x < xwa.x + (gint)xwa.width) &&
@ -566,9 +568,10 @@ get_client_window_at_coords_recurse (Window win,
wm_state_atom, 0, 0, False, AnyPropertyType, wm_state_atom, 0, 0, False, AnyPropertyType,
&type, &format, &nitems, &after, &data); &type, &format, &nitems, &after, &data);
if (gdk_error_code != 0) if (gdk_error_code)
{ {
gdk_error_code = 0; gdk_error_code = 0;
return None; return None;
} }
@ -581,9 +584,10 @@ get_client_window_at_coords_recurse (Window win,
XTranslateCoordinates (gdk_display, gdk_root_window, win, XTranslateCoordinates (gdk_display, gdk_root_window, win,
x_root, y_root, &dest_x, &dest_y, &child); x_root, y_root, &dest_x, &dest_y, &child);
if (gdk_error_code != 0) if (gdk_error_code)
{ {
gdk_error_code = 0; gdk_error_code = 0;
return None; return None;
} }
@ -620,7 +624,7 @@ get_client_window_at_coords (Window ignore,
XGetWindowAttributes (gdk_display, children[i], &xwa); XGetWindowAttributes (gdk_display, children[i], &xwa);
if (gdk_error_code != 0) if (gdk_error_code)
gdk_error_code = 0; gdk_error_code = 0;
else if ((xwa.map_state == IsViewable) && else if ((xwa.map_state == IsViewable) &&
(x_root >= xwa.x) && (x_root < xwa.x + (gint)xwa.width) && (x_root >= xwa.x) && (x_root < xwa.x + (gint)xwa.width) &&
@ -869,7 +873,7 @@ motif_find_drag_window (gboolean create)
Display *display; Display *display;
XSetWindowAttributes attr; XSetWindowAttributes attr;
display = XOpenDisplay (NULL); display = XOpenDisplay (gdk_display_name);
XSetCloseDownMode (display, RetainPermanent); XSetCloseDownMode (display, RetainPermanent);
XGrabServer (display); XGrabServer (display);
@ -2027,6 +2031,8 @@ xdnd_set_targets (GdkDragContext *context)
XA_ATOM, 32, PropModeReplace, XA_ATOM, 32, PropModeReplace,
(guchar *)atomlist, n_atoms); (guchar *)atomlist, n_atoms);
g_free (atomlist);
private->xdnd_targets_set = 1; private->xdnd_targets_set = 1;
} }
@ -2073,6 +2079,8 @@ xdnd_set_actions (GdkDragContext *context)
XA_ATOM, 32, PropModeReplace, XA_ATOM, 32, PropModeReplace,
(guchar *)atomlist, n_atoms); (guchar *)atomlist, n_atoms);
g_free (atomlist);
private->xdnd_actions_set = 1; private->xdnd_actions_set = 1;
private->xdnd_actions = context->actions; private->xdnd_actions = context->actions;
} }
@ -2106,13 +2114,9 @@ xdnd_send_enter (GdkDragContext *context)
xev.xclient.type = ClientMessage; xev.xclient.type = ClientMessage;
xev.xclient.message_type = gdk_atom_intern ("XdndEnter", FALSE); xev.xclient.message_type = gdk_atom_intern ("XdndEnter", FALSE);
xev.xclient.format = 32; xev.xclient.format = 32;
#ifdef NEW_DRAGS xev.xclient.window = private->drop_xid ?
xev.xclient.window = private->dest_xid ? private->drop_xid :
private->dest_xid :
GDK_WINDOW_XWINDOW (context->dest_window); GDK_WINDOW_XWINDOW (context->dest_window);
#else
xev.xclient.window = GDK_WINDOW_XWINDOW (context->dest_window);
#endif
xev.xclient.data.l[0] = GDK_WINDOW_XWINDOW (context->source_window); xev.xclient.data.l[0] = GDK_WINDOW_XWINDOW (context->source_window);
xev.xclient.data.l[1] = (3 << 24); /* version */ xev.xclient.data.l[1] = (3 << 24); /* version */
xev.xclient.data.l[2] = 0; xev.xclient.data.l[2] = 0;
@ -2162,13 +2166,9 @@ xdnd_send_leave (GdkDragContext *context)
xev.xclient.type = ClientMessage; xev.xclient.type = ClientMessage;
xev.xclient.message_type = gdk_atom_intern ("XdndLeave", FALSE); xev.xclient.message_type = gdk_atom_intern ("XdndLeave", FALSE);
xev.xclient.format = 32; xev.xclient.format = 32;
#ifdef NEW_DRAGS xev.xclient.window = private->drop_xid ?
xev.xclient.window = private->dest_xid ? private->drop_xid :
private->dest_xid :
GDK_WINDOW_XWINDOW (context->dest_window); GDK_WINDOW_XWINDOW (context->dest_window);
#else
xev.xclient.window = GDK_WINDOW_XWINDOW (context->dest_window);
#endif
xev.xclient.data.l[0] = GDK_WINDOW_XWINDOW (context->source_window); xev.xclient.data.l[0] = GDK_WINDOW_XWINDOW (context->source_window);
xev.xclient.data.l[1] = 0; xev.xclient.data.l[1] = 0;
xev.xclient.data.l[2] = 0; xev.xclient.data.l[2] = 0;
@ -2195,13 +2195,9 @@ xdnd_send_drop (GdkDragContext *context, guint32 time)
xev.xclient.type = ClientMessage; xev.xclient.type = ClientMessage;
xev.xclient.message_type = gdk_atom_intern ("XdndDrop", FALSE); xev.xclient.message_type = gdk_atom_intern ("XdndDrop", FALSE);
xev.xclient.format = 32; xev.xclient.format = 32;
#ifdef NEW_DRAGS xev.xclient.window = private->drop_xid ?
xev.xclient.window = private->dest_xid ? private->drop_xid :
private->dest_xid :
GDK_WINDOW_XWINDOW (context->dest_window); GDK_WINDOW_XWINDOW (context->dest_window);
#else
xev.xclient.window = GDK_WINDOW_XWINDOW (context->dest_window);
#endif
xev.xclient.data.l[0] = GDK_WINDOW_XWINDOW (context->source_window); xev.xclient.data.l[0] = GDK_WINDOW_XWINDOW (context->source_window);
xev.xclient.data.l[1] = 0; xev.xclient.data.l[1] = 0;
xev.xclient.data.l[2] = time; xev.xclient.data.l[2] = time;
@ -2232,13 +2228,9 @@ xdnd_send_motion (GdkDragContext *context,
xev.xclient.type = ClientMessage; xev.xclient.type = ClientMessage;
xev.xclient.message_type = gdk_atom_intern ("XdndPosition", FALSE); xev.xclient.message_type = gdk_atom_intern ("XdndPosition", FALSE);
xev.xclient.format = 32; xev.xclient.format = 32;
#ifdef NEW_DRAGS xev.xclient.window = private->drop_xid ?
xev.xclient.window = private->dest_xid ? private->drop_xid :
private->dest_xid :
GDK_WINDOW_XWINDOW (context->dest_window); GDK_WINDOW_XWINDOW (context->dest_window);
#else
xev.xclient.window = GDK_WINDOW_XWINDOW (context->dest_window);
#endif
xev.xclient.data.l[0] = GDK_WINDOW_XWINDOW (context->source_window); xev.xclient.data.l[0] = GDK_WINDOW_XWINDOW (context->source_window);
xev.xclient.data.l[1] = 0; xev.xclient.data.l[1] = 0;
xev.xclient.data.l[2] = (x_root << 16) | y_root; xev.xclient.data.l[2] = (x_root << 16) | y_root;
@ -2859,6 +2851,12 @@ gdk_drag_find_window (GdkDragContext *context,
/* Check if new destination accepts drags, and which protocol */ /* Check if new destination accepts drags, and which protocol */
/* There is some ugliness here. We actually need to pass
* _three_ pieces of information to drag_motion - dest_window,
* protocol, and the XID of the unproxied window. The first
* two are passed explicitely, the third implicitly through
* protocol->dest_xid.
*/
if ((recipient = gdk_drag_get_protocol (dest, protocol))) if ((recipient = gdk_drag_get_protocol (dest, protocol)))
{ {
*dest_window = gdk_window_lookup (recipient); *dest_window = gdk_window_lookup (recipient);
@ -2917,6 +2915,7 @@ gdk_drag_motion (GdkDragContext *context,
if (dest_window) if (dest_window)
{ {
context->dest_window = dest_window; context->dest_window = dest_window;
private->drop_xid = private->dest_xid;
gdk_window_ref (context->dest_window); gdk_window_ref (context->dest_window);
context->protocol = protocol; context->protocol = protocol;
@ -2941,6 +2940,7 @@ gdk_drag_motion (GdkDragContext *context,
else else
{ {
context->dest_window = NULL; context->dest_window = NULL;
private->drop_xid = None;
context->action = 0; context->action = 0;
} }

View file

@ -27,7 +27,6 @@
#include "gdk.h" #include "gdk.h"
#include "gdkx.h" #include "gdkx.h"
#include "gdkprivate.h" #include "gdkprivate.h"
#include "gdkinput.h"
#include "gdkkeysyms.h" #include "gdkkeysyms.h"
#if HAVE_CONFIG_H #if HAVE_CONFIG_H
@ -37,6 +36,7 @@
# endif # endif
#endif #endif
#include "gdkinput.h"
typedef struct _GdkIOClosure GdkIOClosure; typedef struct _GdkIOClosure GdkIOClosure;
typedef struct _GdkEventPrivate GdkEventPrivate; typedef struct _GdkEventPrivate GdkEventPrivate;
@ -88,9 +88,11 @@ static GdkEvent* gdk_event_unqueue (void);
static gboolean gdk_event_prepare (gpointer source_data, static gboolean gdk_event_prepare (gpointer source_data,
GTimeVal *current_time, GTimeVal *current_time,
gint *timeout); gint *timeout,
gpointer user_data);
static gboolean gdk_event_check (gpointer source_data, static gboolean gdk_event_check (gpointer source_data,
GTimeVal *current_time); GTimeVal *current_time,
gpointer user_data);
static gboolean gdk_event_dispatch (gpointer source_data, static gboolean gdk_event_dispatch (gpointer source_data,
GTimeVal *current_time, GTimeVal *current_time,
gpointer user_data); gpointer user_data);
@ -434,6 +436,10 @@ gdk_compress_exposures (XEvent *xevent,
rect1.width = xevent->xexpose.width; rect1.width = xevent->xexpose.width;
rect1.height = xevent->xexpose.height; rect1.height = xevent->xexpose.height;
event.any.type = GDK_EXPOSE;
event.any.window = None;
event.any.send_event = FALSE;
while (1) while (1)
{ {
if (count == 0) if (count == 0)
@ -450,6 +456,8 @@ gdk_compress_exposures (XEvent *xevent,
expose_predicate, expose_predicate,
(XPointer)&info); (XPointer)&info);
event.any.window = window;
/* We apply filters here, and if it was filtered, completely /* We apply filters here, and if it was filtered, completely
* ignore the return * ignore the return
*/ */
@ -849,6 +857,12 @@ gdk_io_destroy (gpointer data)
g_free (closure); g_free (closure);
} }
/* What do we do with G_IO_NVAL?
*/
#define READ_CONDITION (G_IO_IN | G_IO_HUP | G_IO_ERR)
#define WRITE_CONDITION (G_IO_OUT | G_IO_ERR)
#define EXCEPTION_CONDITION (G_IO_PRI)
static gboolean static gboolean
gdk_io_invoke (GIOChannel *source, gdk_io_invoke (GIOChannel *source,
GIOCondition condition, GIOCondition condition,
@ -857,11 +871,11 @@ gdk_io_invoke (GIOChannel *source,
GdkIOClosure *closure = data; GdkIOClosure *closure = data;
GdkInputCondition gdk_cond = 0; GdkInputCondition gdk_cond = 0;
if (condition & (G_IO_IN | G_IO_PRI)) if (condition & READ_CONDITION)
gdk_cond |= GDK_INPUT_READ; gdk_cond |= GDK_INPUT_READ;
if (condition & G_IO_OUT) if (condition & WRITE_CONDITION)
gdk_cond |= GDK_INPUT_WRITE; gdk_cond |= GDK_INPUT_WRITE;
if (condition & (G_IO_ERR | G_IO_HUP | G_IO_NVAL)) if (condition & EXCEPTION_CONDITION)
gdk_cond |= GDK_INPUT_EXCEPTION; gdk_cond |= GDK_INPUT_EXCEPTION;
if (closure->condition & gdk_cond) if (closure->condition & gdk_cond)
@ -888,11 +902,11 @@ gdk_input_add_full (gint source,
closure->data = data; closure->data = data;
if (condition & GDK_INPUT_READ) if (condition & GDK_INPUT_READ)
cond |= (G_IO_IN | G_IO_PRI); cond |= READ_CONDITION;
if (condition & GDK_INPUT_WRITE) if (condition & GDK_INPUT_WRITE)
cond |= G_IO_OUT; cond |= WRITE_CONDITION;
if (condition & GDK_INPUT_EXCEPTION) if (condition & GDK_INPUT_EXCEPTION)
cond |= G_IO_ERR|G_IO_HUP|G_IO_NVAL; cond |= EXCEPTION_CONDITION;
channel = g_io_channel_unix_new (source); channel = g_io_channel_unix_new (source);
result = g_io_add_watch_full (channel, G_PRIORITY_DEFAULT, cond, result = g_io_add_watch_full (channel, G_PRIORITY_DEFAULT, cond,
@ -923,7 +937,6 @@ gdk_event_apply_filters (XEvent *xevent,
GdkEvent *event, GdkEvent *event,
GList *filters) GList *filters)
{ {
GdkEventFilter *filter;
GList *tmp_list; GList *tmp_list;
GdkFilterReturn result; GdkFilterReturn result;
@ -931,13 +944,12 @@ gdk_event_apply_filters (XEvent *xevent,
while (tmp_list) while (tmp_list)
{ {
filter = (GdkEventFilter*) tmp_list->data; GdkEventFilter *filter = (GdkEventFilter*) tmp_list->data;
result = (*filter->function) (xevent, event, filter->data);
if (result != GDK_FILTER_CONTINUE)
return result;
tmp_list = tmp_list->next; tmp_list = tmp_list->next;
result = filter->function (xevent, event, filter->data);
if (result != GDK_FILTER_CONTINUE)
return result;
} }
return GDK_FILTER_CONTINUE; return GDK_FILTER_CONTINUE;
@ -1002,7 +1014,7 @@ gdk_event_translate (GdkEvent *event,
gdk_window_ref (window); gdk_window_ref (window);
event->any.window = window; event->any.window = window;
event->any.send_event = xevent->xany.send_event; event->any.send_event = xevent->xany.send_event ? TRUE : FALSE;
if (window_private && window_private->destroyed) if (window_private && window_private->destroyed)
{ {
@ -1057,9 +1069,6 @@ gdk_event_translate (GdkEvent *event,
} }
#endif #endif
if (window == NULL)
g_message ("Got event for unknown window: %#lx\n", xevent->xany.window);
/* We do a "manual" conversion of the XEvent to a /* We do a "manual" conversion of the XEvent to a
* GdkEvent. The structures are mostly the same so * GdkEvent. The structures are mostly the same so
* the conversion is fairly straightforward. We also * the conversion is fairly straightforward. We also
@ -1513,10 +1522,11 @@ gdk_event_translate (GdkEvent *event,
/* Print debugging info. /* Print debugging info.
*/ */
GDK_NOTE (EVENTS, GDK_NOTE (EVENTS,
g_message ("expose:\t\twindow: %ld %d x,y: %d %d w,h: %d %d", g_message ("expose:\t\twindow: %ld %d x,y: %d %d w,h: %d %d%s",
xevent->xexpose.window, xevent->xexpose.count, xevent->xexpose.window, xevent->xexpose.count,
xevent->xexpose.x, xevent->xexpose.y, xevent->xexpose.x, xevent->xexpose.y,
xevent->xexpose.width, xevent->xexpose.height)); xevent->xexpose.width, xevent->xexpose.height,
event->any.send_event ? " (send)" : ""));
gdk_compress_exposures (xevent, window); gdk_compress_exposures (xevent, window);
event->expose.type = GDK_EXPOSE; event->expose.type = GDK_EXPOSE;
@ -1601,7 +1611,17 @@ gdk_event_translate (GdkEvent *event,
break; break;
case CreateNotify: case CreateNotify:
/* Not currently handled */ GDK_NOTE (EVENTS,
g_message ("create notify:\twindow: %ld x,y: %d %d w,h: %d %d b-w: %d parent: %ld ovr: %d",
xevent->xcreatewindow.window,
xevent->xcreatewindow.x,
xevent->xcreatewindow.y,
xevent->xcreatewindow.width,
xevent->xcreatewindow.height,
xevent->xcreatewindow.border_width,
xevent->xcreatewindow.parent,
xevent->xcreatewindow.override_redirect));
/* not really handled */
break; break;
case DestroyNotify: case DestroyNotify:
@ -1616,7 +1636,7 @@ gdk_event_translate (GdkEvent *event,
return_val = window_private && !window_private->destroyed; return_val = window_private && !window_private->destroyed;
if(window && window_private->xwindow != GDK_ROOT_WINDOW()) if (window && window_private->xwindow != GDK_ROOT_WINDOW())
gdk_window_destroy_notify (window); gdk_window_destroy_notify (window);
break; break;
@ -1651,8 +1671,12 @@ gdk_event_translate (GdkEvent *event,
/* Print debugging info. /* Print debugging info.
*/ */
GDK_NOTE (EVENTS, GDK_NOTE (EVENTS,
g_message ("reparent notify:\twindow: %ld", g_message ("reparent notify:\twindow: %ld x,y: %d %d parent: %ld ovr: %d",
xevent->xreparent.window)); xevent->xreparent.window,
xevent->xreparent.x,
xevent->xreparent.y,
xevent->xreparent.parent,
xevent->xreparent.override_redirect));
/* Not currently handled */ /* Not currently handled */
return_val = FALSE; return_val = FALSE;
@ -1661,36 +1685,8 @@ gdk_event_translate (GdkEvent *event,
case ConfigureNotify: case ConfigureNotify:
/* Print debugging info. /* Print debugging info.
*/ */
while ((XPending (gdk_display) > 0) &&
XCheckTypedWindowEvent(gdk_display, xevent->xany.window,
ConfigureNotify, xevent))
{
GdkFilterReturn result;
GDK_NOTE (EVENTS,
g_message ("configure notify discarded:\twindow: %ld",
xevent->xconfigure.window));
result = gdk_event_apply_filters (xevent, event,
window_private
?window_private->filters
:gdk_default_filters);
/* If the result is GDK_FILTER_REMOVE, there will be
* trouble, but anybody who filtering the Configure events
* better know what they are doing
*/
if (result != GDK_FILTER_CONTINUE)
{
return (result == GDK_FILTER_TRANSLATE) ? TRUE : FALSE;
}
/*XSync (gdk_display, 0);*/
}
GDK_NOTE (EVENTS, GDK_NOTE (EVENTS,
g_message ("configure notify:\twindow: %ld x,y: %d %d w,h: %d %d b-w: %d above: %ld ovr: %d", g_message ("configure notify:\twindow: %ld x,y: %d %d w,h: %d %d b-w: %d above: %ld ovr: %d%s",
xevent->xconfigure.window, xevent->xconfigure.window,
xevent->xconfigure.x, xevent->xconfigure.x,
xevent->xconfigure.y, xevent->xconfigure.y,
@ -1698,14 +1694,19 @@ gdk_event_translate (GdkEvent *event,
xevent->xconfigure.height, xevent->xconfigure.height,
xevent->xconfigure.border_width, xevent->xconfigure.border_width,
xevent->xconfigure.above, xevent->xconfigure.above,
xevent->xconfigure.override_redirect)); xevent->xconfigure.override_redirect,
!window
if (!window_private->destroyed && ? " (discarding)"
: window_private->window_type == GDK_WINDOW_CHILD
? " (discarding child)"
: ""));
if (window &&
!window_private->destroyed &&
(window_private->extension_events != 0) && (window_private->extension_events != 0) &&
gdk_input_vtable.configure_event) gdk_input_vtable.configure_event)
gdk_input_vtable.configure_event (&xevent->xconfigure, window); gdk_input_vtable.configure_event (&xevent->xconfigure, window);
if (window_private->window_type == GDK_WINDOW_CHILD) if (!window || window_private->window_type == GDK_WINDOW_CHILD)
return_val = FALSE; return_val = FALSE;
else else
{ {
@ -1722,16 +1723,22 @@ gdk_event_translate (GdkEvent *event,
gint ty = 0; gint ty = 0;
Window child_window = 0; Window child_window = 0;
if (!XTranslateCoordinates (window_private->xdisplay, gdk_error_trap_push ();
window_private->xwindow, if (XTranslateCoordinates (window_private->xdisplay,
gdk_root_window, window_private->xwindow,
0, 0, gdk_root_window,
&tx, &ty, 0, 0,
&child_window)) &tx, &ty,
g_warning ("GdkWindow %ld doesn't share root windows display?", &child_window))
window_private->xwindow); {
event->configure.x = tx; if (!gdk_error_trap_pop ())
event->configure.y = ty; {
event->configure.x = tx;
event->configure.y = ty;
}
}
else
gdk_error_trap_pop ();
} }
else else
{ {
@ -1751,8 +1758,15 @@ gdk_event_translate (GdkEvent *event,
/* Print debugging info. /* Print debugging info.
*/ */
GDK_NOTE (EVENTS, GDK_NOTE (EVENTS,
g_message ("property notify:\twindow: %ld", gchar *atom = gdk_atom_name (xevent->xproperty.atom);
xevent->xproperty.window)); g_message ("property notify:\twindow: %ld, atom(%ld): %s%s%s",
xevent->xproperty.window,
xevent->xproperty.atom,
atom ? "\"" : "",
atom ? atom : "unknown",
atom ? "\"" : "");
g_free (atom);
);
event->property.type = GDK_PROPERTY_NOTIFY; event->property.type = GDK_PROPERTY_NOTIFY;
event->property.window = window; event->property.window = window;
@ -1910,8 +1924,8 @@ gdk_event_translate (GdkEvent *event,
GdkFilterReturn GdkFilterReturn
gdk_wm_protocols_filter (GdkXEvent *xev, gdk_wm_protocols_filter (GdkXEvent *xev,
GdkEvent *event, GdkEvent *event,
gpointer data) gpointer data)
{ {
XEvent *xevent = (XEvent *)xev; XEvent *xevent = (XEvent *)xev;
@ -1993,8 +2007,7 @@ gdk_events_queue (void)
event->any.type = GDK_NOTHING; event->any.type = GDK_NOTHING;
event->any.window = NULL; event->any.window = NULL;
event->any.send_event = FALSE; event->any.send_event = xevent.xany.send_event ? TRUE : FALSE;
event->any.send_event = xevent.xany.send_event;
((GdkEventPrivate *)event)->flags |= GDK_EVENT_PENDING; ((GdkEventPrivate *)event)->flags |= GDK_EVENT_PENDING;
@ -2017,7 +2030,8 @@ gdk_events_queue (void)
static gboolean static gboolean
gdk_event_prepare (gpointer source_data, gdk_event_prepare (gpointer source_data,
GTimeVal *current_time, GTimeVal *current_time,
gint *timeout) gint *timeout,
gpointer user_data)
{ {
gboolean retval; gboolean retval;
@ -2034,7 +2048,8 @@ gdk_event_prepare (gpointer source_data,
static gboolean static gboolean
gdk_event_check (gpointer source_data, gdk_event_check (gpointer source_data,
GTimeVal *current_time) GTimeVal *current_time,
gpointer user_data)
{ {
gboolean retval; gboolean retval;
@ -2133,29 +2148,29 @@ gdk_event_send_client_message_to_all_recurse (XEvent *xev,
guint level) guint level)
{ {
static GdkAtom wm_state_atom = GDK_NONE; static GdkAtom wm_state_atom = GDK_NONE;
Atom type = None; Atom type = None;
int format; int format;
unsigned long nitems, after; unsigned long nitems, after;
unsigned char *data; unsigned char *data;
Window *ret_children, ret_root, ret_parent; Window *ret_children, ret_root, ret_parent;
unsigned int ret_nchildren; unsigned int ret_nchildren;
int i; gint old_warnings = gdk_error_warnings;
gboolean send = FALSE; gboolean send = FALSE;
gboolean found = FALSE; gboolean found = FALSE;
int i;
if (!wm_state_atom) if (!wm_state_atom)
wm_state_atom = gdk_atom_intern ("WM_STATE", FALSE); wm_state_atom = gdk_atom_intern ("WM_STATE", FALSE);
gdk_error_warnings = FALSE;
gdk_error_code = 0; gdk_error_code = 0;
XGetWindowProperty (gdk_display, xid, wm_state_atom, 0, 0, False, AnyPropertyType, XGetWindowProperty (gdk_display, xid, wm_state_atom, 0, 0, False, AnyPropertyType,
&type, &format, &nitems, &after, &data); &type, &format, &nitems, &after, &data);
if (gdk_error_code) if (gdk_error_code)
{ {
gdk_error_code = 0; gdk_error_warnings = old_warnings;
return FALSE; return FALSE;
} }
@ -2167,18 +2182,20 @@ gdk_event_send_client_message_to_all_recurse (XEvent *xev,
else else
{ {
/* OK, we're all set, now let's find some windows to send this to */ /* OK, we're all set, now let's find some windows to send this to */
if (XQueryTree(gdk_display, xid, &ret_root, &ret_parent, if (XQueryTree (gdk_display, xid, &ret_root, &ret_parent,
&ret_children, &ret_nchildren) != True) &ret_children, &ret_nchildren) != True ||
return FALSE; gdk_error_code)
{
gdk_error_warnings = old_warnings;
if (gdk_error_code) return FALSE;
return FALSE; }
for(i = 0; i < ret_nchildren; i++) for(i = 0; i < ret_nchildren; i++)
if (gdk_event_send_client_message_to_all_recurse(xev, ret_children[i], level + 1)) if (gdk_event_send_client_message_to_all_recurse (xev, ret_children[i], level + 1))
found = TRUE; found = TRUE;
XFree(ret_children); XFree (ret_children);
} }
if (send || (!found && (level == 1))) if (send || (!found && (level == 1)))
@ -2187,6 +2204,8 @@ gdk_event_send_client_message_to_all_recurse (XEvent *xev,
gdk_send_xevent (xid, False, NoEventMask, xev); gdk_send_xevent (xid, False, NoEventMask, xev);
} }
gdk_error_warnings = old_warnings;
return (send || found); return (send || found);
} }

View file

@ -29,6 +29,63 @@
#include "gdk.h" #include "gdk.h"
#include "gdkprivate.h" #include "gdkprivate.h"
static GHashTable *font_name_hash = NULL;
static GHashTable *fontset_name_hash = NULL;
static void
gdk_font_hash_insert (GdkFontType type, GdkFont *font, const gchar *font_name)
{
GdkFontPrivate *private = (GdkFontPrivate *)font;
GHashTable **hashp = (type == GDK_FONT_FONT) ?
&font_name_hash : &fontset_name_hash;
if (!*hashp)
*hashp = g_hash_table_new (g_str_hash, g_str_equal);
private->names = g_slist_prepend (private->names, g_strdup (font_name));
g_hash_table_insert (*hashp, private->names->data, font);
}
static void
gdk_font_hash_remove (GdkFontType type, GdkFont *font)
{
GdkFontPrivate *private = (GdkFontPrivate *)font;
GSList *tmp_list;
GHashTable *hash = (type == GDK_FONT_FONT) ?
font_name_hash : fontset_name_hash;
tmp_list = private->names;
while (tmp_list)
{
g_hash_table_remove (hash, tmp_list->data);
g_free (tmp_list->data);
tmp_list = tmp_list->next;
}
g_slist_free (private->names);
private->names = NULL;
}
static GdkFont *
gdk_font_hash_lookup (GdkFontType type, const gchar *font_name)
{
GdkFont *result;
GHashTable *hash = (type == GDK_FONT_FONT) ?
font_name_hash : fontset_name_hash;
if (!hash)
return NULL;
else
{
result = g_hash_table_lookup (hash, font_name);
if (result)
gdk_font_ref (result);
return result;
}
}
GdkFont* GdkFont*
gdk_font_load (const gchar *font_name) gdk_font_load (const gchar *font_name)
{ {
@ -38,6 +95,10 @@ gdk_font_load (const gchar *font_name)
g_return_val_if_fail (font_name != NULL, NULL); g_return_val_if_fail (font_name != NULL, NULL);
font = gdk_font_hash_lookup (GDK_FONT_FONT, font_name);
if (font)
return font;
xfont = XLoadQueryFont (gdk_display, font_name); xfont = XLoadQueryFont (gdk_display, font_name);
if (xfont == NULL) if (xfont == NULL)
return NULL; return NULL;
@ -57,6 +118,7 @@ gdk_font_load (const gchar *font_name)
private->xdisplay = gdk_display; private->xdisplay = gdk_display;
private->xfont = xfont; private->xfont = xfont;
private->ref_count = 1; private->ref_count = 1;
private->names = NULL;
font = (GdkFont*) private; font = (GdkFont*) private;
font->type = GDK_FONT_FONT; font->type = GDK_FONT_FONT;
@ -66,6 +128,8 @@ gdk_font_load (const gchar *font_name)
gdk_xid_table_insert (&xfont->fid, font); gdk_xid_table_insert (&xfont->fid, font);
} }
gdk_font_hash_insert (GDK_FONT_FONT, font, font_name);
return font; return font;
} }
@ -79,6 +143,10 @@ gdk_fontset_load (gchar *fontset_name)
gchar **missing_charset_list; gchar **missing_charset_list;
gchar *def_string; gchar *def_string;
font = gdk_font_hash_lookup (GDK_FONT_FONTSET, fontset_name);
if (font)
return font;
private = g_new (GdkFontPrivate, 1); private = g_new (GdkFontPrivate, 1);
font = (GdkFont*) private; font = (GdkFont*) private;
@ -121,8 +189,12 @@ gdk_fontset_load (gchar *fontset_name)
font->ascent = MAX (font->ascent, font_structs[i]->ascent); font->ascent = MAX (font->ascent, font_structs[i]->ascent);
font->descent = MAX (font->descent, font_structs[i]->descent); font->descent = MAX (font->descent, font_structs[i]->descent);
} }
private->names = NULL;
gdk_font_hash_insert (GDK_FONT_FONTSET, font, fontset_name);
return font;
} }
return font;
} }
GdkFont* GdkFont*
@ -141,14 +213,16 @@ void
gdk_font_unref (GdkFont *font) gdk_font_unref (GdkFont *font)
{ {
GdkFontPrivate *private; GdkFontPrivate *private;
private = (GdkFontPrivate*) font;
g_return_if_fail (font != NULL); g_return_if_fail (font != NULL);
g_return_if_fail (private->ref_count > 0);
private = (GdkFontPrivate*) font;
private->ref_count -= 1; private->ref_count -= 1;
if (private->ref_count == 0) if (private->ref_count == 0)
{ {
gdk_font_hash_remove (font->type, font);
switch (font->type) switch (font->type)
{ {
case GDK_FONT_FONT: case GDK_FONT_FONT:
@ -205,8 +279,12 @@ gdk_font_equal (const GdkFont *fonta,
} }
else if (fonta->type == GDK_FONT_FONTSET && fontb->type == GDK_FONT_FONTSET) else if (fonta->type == GDK_FONT_FONTSET && fontb->type == GDK_FONT_FONTSET)
{ {
/* how to compare two fontsets ?? by basename or XFontSet ?? */ gchar *namea, *nameb;
return (((XFontSet) privatea->xfont) == ((XFontSet) privateb->xfont));
namea = XBaseFontNameListOfFontSet((XFontSet) privatea->xfont);
nameb = XBaseFontNameListOfFontSet((XFontSet) privateb->xfont);
return (strcmp(namea, nameb) == 0);
} }
else else
/* fontset != font */ /* fontset != font */
@ -578,7 +656,20 @@ gdk_text_extents_wc (GdkFont *font,
} }
case GDK_FONT_FONTSET: case GDK_FONT_FONTSET:
fontset = (XFontSet) private->xfont; fontset = (XFontSet) private->xfont;
XwcTextExtents (fontset, text, text_length, &ink, &logical);
if (sizeof(GdkWChar) == sizeof(wchar_t))
XwcTextExtents (fontset, (wchar_t *)text, text_length, &ink, &logical);
else
{
wchar_t *text_wchar;
gint i;
text_wchar = g_new (wchar_t, text_length);
for (i = 0; i < text_length; i++)
text_wchar[i] = text[i];
XwcTextExtents (fontset, text_wchar, text_length, &ink, &logical);
g_free (text_wchar);
}
if (lbearing) if (lbearing)
*lbearing = ink.x; *lbearing = ink.x;
if (rbearing) if (rbearing)
@ -652,7 +743,7 @@ gdk_text_measure (GdkFont *font,
case GDK_FONT_FONTSET: case GDK_FONT_FONTSET:
fontset = (XFontSet) private->xfont; fontset = (XFontSet) private->xfont;
XmbTextExtents (fontset, text, text_length, &ink, &log); XmbTextExtents (fontset, text, text_length, &ink, &log);
width = log.width; width = ink.x + ink.width;
break; break;
default: default:
width = 0; width = 0;

View file

@ -57,7 +57,7 @@ GdkDndGlobals gdk_dnd = {None,None,None,
{0,0}, {0,0}, {0,0}, {0,0},
{0,0,0,0}, NULL, None, 0}; {0,0,0,0}, NULL, None, 0};
gchar *gdk_progclass = NULL; gchar *gdk_progclass = NULL;
gint gdk_error_code; gint gdk_error_code = 0;
gint gdk_error_warnings = TRUE; gint gdk_error_warnings = TRUE;
gint gdk_null_window_warnings = TRUE; gint gdk_null_window_warnings = TRUE;
GList *gdk_default_filters = NULL; GList *gdk_default_filters = NULL;

View file

@ -386,7 +386,7 @@ gdk_im_real_open (void)
destroy_cb.callback = gdk_im_destroy_cb; destroy_cb.callback = gdk_im_destroy_cb;
destroy_cb.client_data = NULL; destroy_cb.client_data = NULL;
if (NULL != XSetIMValues (xim_im, XNDestroyCallback, &destroy_cb, NULL)) if (NULL != (void *) XSetIMValues (xim_im, XNDestroyCallback, &destroy_cb, NULL))
GDK_NOTE (XIM, g_warning ("Could not set destroy callback to IM. Be careful to not destroy your input method.")); GDK_NOTE (XIM, g_warning ("Could not set destroy callback to IM. Be careful to not destroy your input method."));
#endif #endif
@ -469,7 +469,7 @@ gdk_ic_real_new (GdkIC *ic)
mask |= GDK_IC_PREEDIT_AREA_REQ; mask |= GDK_IC_PREEDIT_AREA_REQ;
preedit_area.x = attr->preedit_area.x; preedit_area.x = attr->preedit_area.x;
preedit_area.y = attr->preedit_area.x; preedit_area.y = attr->preedit_area.y;
preedit_area.width = attr->preedit_area.width; preedit_area.width = attr->preedit_area.width;
preedit_area.height = attr->preedit_area.height; preedit_area.height = attr->preedit_area.height;
@ -484,7 +484,7 @@ gdk_ic_real_new (GdkIC *ic)
mask |= GDK_IC_PREEDIT_POSITION_REQ; mask |= GDK_IC_PREEDIT_POSITION_REQ;
preedit_area.x = attr->preedit_area.x; preedit_area.x = attr->preedit_area.x;
preedit_area.y = attr->preedit_area.x; preedit_area.y = attr->preedit_area.y;
preedit_area.width = attr->preedit_area.width; preedit_area.width = attr->preedit_area.width;
preedit_area.height = attr->preedit_area.height; preedit_area.height = attr->preedit_area.height;
@ -506,7 +506,7 @@ gdk_ic_real_new (GdkIC *ic)
mask |= GDK_IC_STATUS_AREA_REQ; mask |= GDK_IC_STATUS_AREA_REQ;
status_area.x = attr->status_area.x; status_area.x = attr->status_area.x;
status_area.y = attr->status_area.x; status_area.y = attr->status_area.y;
status_area.width = attr->status_area.width; status_area.width = attr->status_area.width;
status_area.height = attr->status_area.height; status_area.height = attr->status_area.height;
@ -518,6 +518,12 @@ gdk_ic_real_new (GdkIC *ic)
break; break;
} }
/* We have to ensure that the client window is actually created on
* the X server, or XCreateIC fails because the XIM server can't get
* information about the client window.
*/
gdk_flush();
if (preedit_attr != NULL && status_attr != NULL) if (preedit_attr != NULL && status_attr != NULL)
private->xic = XCreateIC (xim_im, private->xic = XCreateIC (xim_im,
XNInputStyle, XNInputStyle,
@ -871,7 +877,7 @@ gdk_ic_real_set_attr (GdkIC *ic,
arg->name = XNFontSet; arg->name = XNFontSet;
arg->value = (gpointer) GDK_FONT_XFONT(attr->status_fontset); arg->value = (gpointer) GDK_FONT_XFONT(attr->status_fontset);
if (XSetICValues (xic, XNPreeditAttributes, arg, NULL)) if (XSetICValues (xic, XNStatusAttributes, arg, NULL))
error |= GDK_IC_STATUS_FONTSET; error |= GDK_IC_STATUS_FONTSET;
} }
@ -887,7 +893,7 @@ gdk_ic_real_set_attr (GdkIC *ic,
arg->name = XNArea; arg->name = XNArea;
arg->value = (gpointer) &rect; arg->value = (gpointer) &rect;
if (XSetICValues (xic, XNPreeditAttributes, arg, NULL)) if (XSetICValues (xic, XNStatusAttributes, arg, NULL))
error |= GDK_IC_STATUS_AREA; error |= GDK_IC_STATUS_AREA;
} }
@ -903,7 +909,7 @@ gdk_ic_real_set_attr (GdkIC *ic,
arg->name = XNArea; arg->name = XNArea;
arg->value = (gpointer) &rect; arg->value = (gpointer) &rect;
if (XSetICValues (xic, XNPreeditAttributes, arg, NULL)) if (XSetICValues (xic, XNStatusAttributes, arg, NULL))
error |= GDK_IC_STATUS_AREA_NEEDED; error |= GDK_IC_STATUS_AREA_NEEDED;
else else
private->mask &= ~GDK_IC_STATUS_AREA_NEEDED; private->mask &= ~GDK_IC_STATUS_AREA_NEEDED;
@ -914,7 +920,7 @@ gdk_ic_real_set_attr (GdkIC *ic,
arg->name = XNForeground; arg->name = XNForeground;
arg->value = (gpointer) attr->status_foreground.pixel; arg->value = (gpointer) attr->status_foreground.pixel;
if (XSetICValues (xic, XNPreeditAttributes, arg, NULL)) if (XSetICValues (xic, XNStatusAttributes, arg, NULL))
error |= GDK_IC_STATUS_FOREGROUND; error |= GDK_IC_STATUS_FOREGROUND;
} }
@ -923,7 +929,7 @@ gdk_ic_real_set_attr (GdkIC *ic,
arg->name = XNBackground; arg->name = XNBackground;
arg->value = (gpointer) attr->status_background.pixel; arg->value = (gpointer) attr->status_background.pixel;
if (XSetICValues (xic, XNPreeditAttributes, arg, NULL)) if (XSetICValues (xic, XNStatusAttributes, arg, NULL))
error |= GDK_IC_STATUS_BACKGROUND; error |= GDK_IC_STATUS_BACKGROUND;
} }
@ -932,7 +938,7 @@ gdk_ic_real_set_attr (GdkIC *ic,
arg->name = XNBackgroundPixmap; arg->name = XNBackgroundPixmap;
arg->value = (gpointer) GDK_WINDOW_XWINDOW(attr->status_pixmap); arg->value = (gpointer) GDK_WINDOW_XWINDOW(attr->status_pixmap);
if (XSetICValues (xic, XNPreeditAttributes, arg, NULL)) if (XSetICValues (xic, XNStatusAttributes, arg, NULL))
error |= GDK_IC_STATUS_PIXMAP; error |= GDK_IC_STATUS_PIXMAP;
} }
@ -941,7 +947,7 @@ gdk_ic_real_set_attr (GdkIC *ic,
arg->name = XNColormap; arg->name = XNColormap;
arg->value = (gpointer) GDK_COLORMAP_XCOLORMAP(attr->status_colormap); arg->value = (gpointer) GDK_COLORMAP_XCOLORMAP(attr->status_colormap);
if (XSetICValues (xic, XNPreeditAttributes, arg, NULL)) if (XSetICValues (xic, XNStatusAttributes, arg, NULL))
error |= GDK_IC_STATUS_COLORMAP; error |= GDK_IC_STATUS_COLORMAP;
} }
@ -1565,8 +1571,10 @@ gdk_mbstowcs (GdkWChar *dest, const gchar *src, gint dest_max)
!= Success) != Success)
{ {
/* InvalidChar */ /* InvalidChar */
XFree(tpr.value);
return -1; return -1;
} }
XFree(tpr.value);
if (num_wstrs == 0) if (num_wstrs == 0)
return 0; return 0;
wstr_src = wstrs[0]; wstr_src = wstrs[0];

View file

@ -251,14 +251,12 @@ gdk_image_new (GdkImageType type,
return NULL; return NULL;
} }
gdk_error_code = 0; gdk_error_trap_push ();
gdk_error_warnings = 0;
XShmAttach (private->xdisplay, x_shm_info); XShmAttach (private->xdisplay, x_shm_info);
XSync (private->xdisplay, False); XSync (private->xdisplay, False);
gdk_error_warnings = 1; if (gdk_error_trap_pop ())
if (gdk_error_code == -1)
{ {
/* this is the common failure case so omit warning */ /* this is the common failure case so omit warning */
XDestroyImage (private->ximage); XDestroyImage (private->ximage);
@ -269,6 +267,7 @@ gdk_image_new (GdkImageType type,
g_free (image); g_free (image);
gdk_use_xshm = False; gdk_use_xshm = False;
return NULL; return NULL;
} }
@ -315,22 +314,7 @@ gdk_image_new (GdkImageType type,
image->byte_order = private->ximage->byte_order; image->byte_order = private->ximage->byte_order;
image->mem = private->ximage->data; image->mem = private->ximage->data;
image->bpl = private->ximage->bytes_per_line; image->bpl = private->ximage->bytes_per_line;
image->bpp = (private->ximage->bits_per_pixel + 7) / 8;
switch (private->ximage->bits_per_pixel)
{
case 8:
image->bpp = 1;
break;
case 16:
image->bpp = 2;
break;
case 24:
image->bpp = 3;
break;
case 32:
image->bpp = 4;
break;
}
} }
} }

View file

@ -31,6 +31,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <limits.h> #include <limits.h>
#include <errno.h>
#ifdef HAVE_SYS_SELECT_H #ifdef HAVE_SYS_SELECT_H
#include <sys/select.h> #include <sys/select.h>
@ -48,6 +49,7 @@
#include "gdkinput.h" #include "gdkinput.h"
#include "gdkx.h" #include "gdkx.h"
#include "gdki18n.h" #include "gdki18n.h"
#include "gdkkeysyms.h"
#ifndef X_GETTIMEOFDAY #ifndef X_GETTIMEOFDAY
#define X_GETTIMEOFDAY(tv) gettimeofday (tv, NULL) #define X_GETTIMEOFDAY(tv) gettimeofday (tv, NULL)
@ -333,6 +335,7 @@ gdk_init_check (int *argc,
gdk_im_set_best_style (GDK_IM_PREEDIT_POSITION); gdk_im_set_best_style (GDK_IM_PREEDIT_POSITION);
else if (strcmp ("callbacks", (*argv)[i]) == 0) else if (strcmp ("callbacks", (*argv)[i]) == 0)
gdk_im_set_best_style (GDK_IM_PREEDIT_CALLBACKS); gdk_im_set_best_style (GDK_IM_PREEDIT_CALLBACKS);
(*argv)[i] = NULL;
} }
} }
else if (strcmp ("--xim-status", (*argv)[i]) == 0) else if (strcmp ("--xim-status", (*argv)[i]) == 0)
@ -348,6 +351,7 @@ gdk_init_check (int *argc,
gdk_im_set_best_style (GDK_IM_STATUS_AREA); gdk_im_set_best_style (GDK_IM_STATUS_AREA);
else if (strcmp ("callbacks", (*argv)[i]) == 0) else if (strcmp ("callbacks", (*argv)[i]) == 0)
gdk_im_set_best_style (GDK_IM_STATUS_CALLBACKS); gdk_im_set_best_style (GDK_IM_STATUS_CALLBACKS);
(*argv)[i] = NULL;
} }
} }
#endif #endif
@ -406,9 +410,9 @@ gdk_init_check (int *argc,
g_free(argv_orig[i]); g_free(argv_orig[i]);
g_free(argv_orig); g_free(argv_orig);
gdk_wm_delete_window = XInternAtom (gdk_display, "WM_DELETE_WINDOW", True); gdk_wm_delete_window = XInternAtom (gdk_display, "WM_DELETE_WINDOW", False);
gdk_wm_take_focus = XInternAtom (gdk_display, "WM_TAKE_FOCUS", True); gdk_wm_take_focus = XInternAtom (gdk_display, "WM_TAKE_FOCUS", False);
gdk_wm_protocols = XInternAtom (gdk_display, "WM_PROTOCOLS", True); gdk_wm_protocols = XInternAtom (gdk_display, "WM_PROTOCOLS", False);
gdk_wm_window_protocols[0] = gdk_wm_delete_window; gdk_wm_window_protocols[0] = gdk_wm_delete_window;
gdk_wm_window_protocols[1] = gdk_wm_take_focus; gdk_wm_window_protocols[1] = gdk_wm_take_focus;
gdk_selection_property = XInternAtom (gdk_display, "GDK_SELECTION", False); gdk_selection_property = XInternAtom (gdk_display, "GDK_SELECTION", False);
@ -1032,20 +1036,35 @@ static int
gdk_x_error (Display *display, gdk_x_error (Display *display,
XErrorEvent *error) XErrorEvent *error)
{ {
char buf[64]; if (error->error_code)
if (gdk_error_warnings)
{ {
XGetErrorText (display, error->error_code, buf, 63); if (gdk_error_warnings)
g_error ("%s\n serial %ld error_code %d request_code %d minor_code %d\n", {
buf, char buf[64];
error->serial,
error->error_code, XGetErrorText (display, error->error_code, buf, 63);
error->request_code,
error->minor_code); #ifdef G_ENABLE_DEBUG
g_error ("%s\n serial %ld error_code %d request_code %d minor_code %d\n",
buf,
error->serial,
error->error_code,
error->request_code,
error->minor_code);
#else /* !G_ENABLE_DEBUG */
fprintf (stderr, "Gdk-ERROR **: %s\n serial %ld error_code %d request_code %d minor_code %d\n",
buf,
error->serial,
error->error_code,
error->request_code,
error->minor_code);
exit(1);
#endif /* G_ENABLE_DEBUG */
}
gdk_error_code = error->error_code;
} }
gdk_error_code = -1;
return 0; return 0;
} }
@ -1071,8 +1090,27 @@ gdk_x_error (Display *display,
static int static int
gdk_x_io_error (Display *display) gdk_x_io_error (Display *display)
{ {
g_error ("an x io error occurred"); /* This is basically modelled after the code in XLib. We need
return 0; * an explicit error handler here, so we can disable our atexit()
* which would otherwise cause a nice segfault.
* We fprintf(stderr, instead of g_warning() because g_warning()
* could possibly be redirected to a dialog
*/
if (errno == EPIPE)
{
fprintf (stderr, "Gdk-ERROR **: X connection to %s broken (explicit kill or server shutdown).\n", gdk_display ? DisplayString (gdk_display) : gdk_get_display());
}
else
{
fprintf (stderr, "Gdk-ERROR **: Fatal IO error %d (%s) on X server %s.\n",
errno, g_strerror (errno),
gdk_display ? DisplayString (gdk_display) : gdk_get_display());
}
/* Disable the atexit shutdown for GDK */
gdk_initialized = 0;
exit(1);
} }
gchar * gchar *
@ -1104,7 +1142,7 @@ gdk_error_trap_push (void)
} }
else else
{ {
node = g_slist_alloc(); node = g_slist_alloc ();
node->data = g_new (GdkErrorTrap, 1); node->data = g_new (GdkErrorTrap, 1);
} }
@ -1166,7 +1204,7 @@ gdk_send_xevent (Window window, gboolean propagate, glong event_mask,
XSync (gdk_display, False); XSync (gdk_display, False);
gdk_error_warnings = old_warnings; gdk_error_warnings = old_warnings;
return result && (gdk_error_code != -1); return result && !gdk_error_code;
} }
#ifndef HAVE_XCONVERTCASE #ifndef HAVE_XCONVERTCASE

View file

@ -518,7 +518,7 @@ _gdk_pixmap_create_from_xpm (GdkWindow *window,
color_name = gdk_pixmap_extract_color (buffer); color_name = gdk_pixmap_extract_color (buffer);
if (color_name == NULL || if (color_name == NULL || g_strcasecmp (color_name, "None") == 0 ||
gdk_color_parse (color_name, &color->color) == FALSE) gdk_color_parse (color_name, &color->color) == FALSE)
{ {
color->color = *transparent_color; color->color = *transparent_color;
@ -817,7 +817,8 @@ void
gdk_pixmap_unref (GdkPixmap *pixmap) gdk_pixmap_unref (GdkPixmap *pixmap)
{ {
GdkWindowPrivate *private = (GdkWindowPrivate *)pixmap; GdkWindowPrivate *private = (GdkWindowPrivate *)pixmap;
g_return_if_fail(pixmap != NULL); g_return_if_fail (pixmap != NULL);
g_return_if_fail (private->ref_count > 0);
private->ref_count -= 1; private->ref_count -= 1;
if (private->ref_count == 0) if (private->ref_count == 0)

View file

@ -45,15 +45,16 @@ gdk_atom_intern (const gchar *atom_name,
{ {
retval = XInternAtom (gdk_display, atom_name, only_if_exists); retval = XInternAtom (gdk_display, atom_name, only_if_exists);
g_hash_table_insert (atom_hash, if (retval != None)
g_strdup (atom_name), g_hash_table_insert (atom_hash,
GUINT_TO_POINTER (retval)); g_strdup (atom_name),
GUINT_TO_POINTER (retval));
} }
return retval; return retval;
} }
gchar * gchar*
gdk_atom_name (GdkAtom atom) gdk_atom_name (GdkAtom atom)
{ {
gchar *t; gchar *t;
@ -69,7 +70,7 @@ gdk_atom_name (GdkAtom atom)
t = XGetAtomName (gdk_display, atom); t = XGetAtomName (gdk_display, atom);
gdk_error_warnings = old_error_warnings; gdk_error_warnings = old_error_warnings;
if (gdk_error_code == -1) if (gdk_error_code)
{ {
if (t) if (t)
XFree (t); XFree (t);
@ -162,10 +163,10 @@ gdk_property_get (GdkWindow *window,
ret_length = ret_nitems; ret_length = ret_nitems;
break; break;
case 16: case 16:
ret_length = 2 * ret_nitems; ret_length = sizeof(short) * ret_nitems;
break; break;
case 32: case 32:
ret_length = 4 * ret_nitems; ret_length = sizeof(long) * ret_nitems;
break; break;
default: default:
g_warning ("unknown property return format: %d", ret_format); g_warning ("unknown property return format: %d", ret_format);

View file

@ -105,11 +105,11 @@ gdk_selection_property_get (GdkWindow *requestor,
gulong length; gulong length;
GdkAtom prop_type; GdkAtom prop_type;
gint prop_format; gint prop_format;
guchar *t; guchar *t = NULL;
g_return_val_if_fail (requestor != NULL, 0); g_return_val_if_fail (requestor != NULL, 0);
/* If retrieved chunks are typically small, (and the ICCM says the /* If retrieved chunks are typically small, (and the ICCCM says the
should be) it would be a win to try first with a buffer of should be) it would be a win to try first with a buffer of
moderate length, to avoid two round trips to the server */ moderate length, to avoid two round trips to the server */
@ -136,8 +136,8 @@ gdk_selection_property_get (GdkWindow *requestor,
if (t) if (t)
{ {
t = NULL;
XFree (t); XFree (t);
t = NULL;
} }
/* Add on an extra byte to handle null termination. X guarantees /* Add on an extra byte to handle null termination. X guarantees
@ -188,7 +188,7 @@ gdk_selection_send_notify (guint32 requestor,
xevent.property = property; xevent.property = property;
xevent.time = time; xevent.time = time;
XSendEvent (gdk_display, requestor, False, NoEventMask, (XEvent*) &xevent); gdk_send_xevent (requestor, False, NoEventMask, (XEvent*) &xevent);
} }
gint gint

View file

@ -34,17 +34,9 @@
#include "gdkprivate.h" #include "gdkprivate.h"
#include "MwmUtil.h" #include "MwmUtil.h"
#if HAVE_CONFIG_H #include <stdlib.h>
# include <config.h> #include <stdio.h>
# if STDC_HEADERS #include <string.h>
# include <stdlib.h>
# include <stdio.h>
# include <string.h>
# endif
#else
# include <stdlib.h>
# include <stdio.h>
#endif
#ifdef HAVE_SHAPE_EXT #ifdef HAVE_SHAPE_EXT
@ -707,10 +699,10 @@ gdk_window_destroy_notify (GdkWindow *window)
if (!private->destroyed) if (!private->destroyed)
{ {
if (private->window_type == GDK_WINDOW_FOREIGN) if (private->window_type != GDK_WINDOW_FOREIGN)
gdk_window_internal_destroy (window, FALSE, FALSE);
else
g_warning ("GdkWindow %#lx unexpectedly destroyed", private->xwindow); g_warning ("GdkWindow %#lx unexpectedly destroyed", private->xwindow);
gdk_window_internal_destroy (window, FALSE, FALSE);
} }
gdk_xid_table_remove (private->xwindow); gdk_xid_table_remove (private->xwindow);
@ -732,6 +724,7 @@ gdk_window_unref (GdkWindow *window)
{ {
GdkWindowPrivate *private = (GdkWindowPrivate *)window; GdkWindowPrivate *private = (GdkWindowPrivate *)window;
g_return_if_fail (window != NULL); g_return_if_fail (window != NULL);
g_return_if_fail (private->ref_count > 0);
private->ref_count -= 1; private->ref_count -= 1;
if (private->ref_count == 0) if (private->ref_count == 0)
@ -1089,8 +1082,10 @@ gdk_window_set_hints (GdkWindow *window,
size_hints.max_height = max_height; size_hints.max_height = max_height;
} }
if (flags) /* FIXME: Would it be better to delete this property of
XSetWMNormalHints (private->xdisplay, private->xwindow, &size_hints); * flags == 0? It would save space on the server
*/
XSetWMNormalHints (private->xdisplay, private->xwindow, &size_hints);
} }
void void
@ -1110,7 +1105,15 @@ gdk_window_set_geometry_hints (GdkWindow *window,
size_hints.flags = 0; size_hints.flags = 0;
if (geom_mask & GDK_HINT_POS) if (geom_mask & GDK_HINT_POS)
size_hints.flags |= PPosition; {
size_hints.flags |= PPosition;
/* We need to initialize the following obsolete fields because KWM
* apparently uses these fields if they are non-zero.
* #@#!#!$!.
*/
size_hints.x = 0;
size_hints.y = 0;
}
if (geom_mask & GDK_HINT_MIN_SIZE) if (geom_mask & GDK_HINT_MIN_SIZE)
{ {
@ -1145,28 +1148,30 @@ gdk_window_set_geometry_hints (GdkWindow *window,
size_hints.flags |= PAspect; size_hints.flags |= PAspect;
if (geometry->min_aspect <= 1) if (geometry->min_aspect <= 1)
{ {
size_hints.min_aspect.x = G_MAXINT * geometry->min_aspect; size_hints.min_aspect.x = 65536 * geometry->min_aspect;
size_hints.min_aspect.y = G_MAXINT; size_hints.min_aspect.y = 65536;
} }
else else
{ {
size_hints.min_aspect.x = G_MAXINT; size_hints.min_aspect.x = 65536;
size_hints.min_aspect.y = G_MAXINT / geometry->min_aspect;; size_hints.min_aspect.y = 65536 / geometry->min_aspect;;
} }
if (geometry->max_aspect <= 1) if (geometry->max_aspect <= 1)
{ {
size_hints.max_aspect.x = G_MAXINT * geometry->max_aspect; size_hints.max_aspect.x = 65536 * geometry->max_aspect;
size_hints.max_aspect.y = G_MAXINT; size_hints.max_aspect.y = 65536;
} }
else else
{ {
size_hints.max_aspect.x = G_MAXINT; size_hints.max_aspect.x = 65536;
size_hints.max_aspect.y = G_MAXINT / geometry->max_aspect;; size_hints.max_aspect.y = 65536 / geometry->max_aspect;;
} }
} }
if (geom_mask) /* FIXME: Would it be better to delete this property of
XSetWMNormalHints (private->xdisplay, private->xwindow, &size_hints); * geom_mask == 0? It would save space on the server
*/
XSetWMNormalHints (private->xdisplay, private->xwindow, &size_hints);
} }
void void

View file

@ -56,7 +56,7 @@ while test $# -gt 0; do
echo_exec_prefix=yes echo_exec_prefix=yes
;; ;;
--version) --version)
echo @GTK_VERSION@ echo @GTK_MAJOR_VERSION@.@GTK_MINOR_VERSION@.@GTK_MICRO_VERSION@
;; ;;
--cflags) --cflags)
echo_cflags=yes echo_cflags=yes

123
gtk/gtkfeatures.h.in Normal file
View file

@ -0,0 +1,123 @@
/* GTK - The GIMP Toolkit
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef __GTK_FEATURES_H__
#define __GTK_FEATURES_H__
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/* compile time version
*/
#define GTK_MAJOR_VERSION (@GTK_MAJOR_VERSION@)
#define GTK_MINOR_VERSION (@GTK_MINOR_VERSION@)
#define GTK_MICRO_VERSION (@GTK_MICRO_VERSION@)
#define GTK_BINARY_AGE (@GTK_BINARY_AGE@)
#define GTK_INTERFACE_AGE (@GTK_INTERFACE_AGE@)
#define GTK_CHECK_VERSION(major,minor,micro) \
(GTK_MAJOR_VERSION > (major) || \
(GTK_MAJOR_VERSION == (major) && GTK_MINOR_VERSION > (minor)) || \
(GTK_MAJOR_VERSION == (major) && GTK_MINOR_VERSION == (minor) && \
GTK_MICRO_VERSION >= (micro)))
/* new gtk_container_set_focus_[hv]adjustment()
*/
#define GTK_HAVE_CONTAINER_FOCUS_ADJUSTMENTS 1-0-1
/* newly exported gtk_signal_init()
* new gtk_signal_n_emissions*()
* "signal-name" is now an alias for "signal_name"
* new gtk_signal_emitv*()
*/
#define GTK_HAVE_SIGNAL_INIT 1-0-2
/* Gtk+ 1.1.0 version tag.
* - new gtk_rc_set_image_loader () to install custom image loaders for rc
* files.
* - GtkAccel groups replaced GtkAcceleratorTables
* - Gdk supports full crossing event now.
* - Buttons featur relief styles now.
* - gdk_rgb_*() functions are in place.
* - stringified enum values can be queried for enum types now.
* - new key binding system is in place (GtkBindingSet).
* - simple algorithm for pattern matching is exported now (GtkPatternSpec).
*/
#define GTK_HAVE_FEATURES_1_1_0 1-1-0
/* Gtk+ 1.1.2 version tag
* - ctree function name changes
*/
#define GTK_HAVE_FEATURES_1_1_2 1-1-2
/* Gtk+ 1.1.4 version tag
* - clist v/hscrollbar -> v/hadjustment changes
*/
#define GTK_HAVE_FEATURES_1_1_4 1-1-4
/* Gtk+ 1.1.5 version tag
*/
#define GTK_HAVE_FEATURES_1_1_5 1-1-5
/* Gtk+ 1.1.6 version tag
*/
#define GTK_HAVE_FEATURES_1_1_6 1-1-6
/* Gtk+ 1.1.7 version tag
*/
#define GTK_HAVE_FEATURES_1_1_7 1-1-7
/* Gtk+ 1.1.8 version tag
*/
#define GTK_HAVE_FEATURES_1_1_8 1-1-8
/* Gtk+ 1.1.9 version tag
*/
#define GTK_HAVE_FEATURES_1_1_9 1-1-9
/* Gtk+ 1.1.10 version tag
*/
#define GTK_HAVE_FEATURES_1_1_10 1-1-10
/* Gtk+ 1.1.11 version tag
*/
#define GTK_HAVE_FEATURES_1_1_11 1-1-11
/* Gtk+ 1.1.12 version tag
*/
#define GTK_HAVE_FEATURES_1_1_12 1-1-12
/* Gtk+ 1.1.13 version tag
* gtk_toggle_button_set_state name changes
*/
#define GTK_HAVE_FEATURES_1_1_13 1-1-13
/* Gtk+ 1.1.14 version tag
* working gtk layout, etc
*/
#define GTK_HAVE_FEATURES_1_1_14 1-1-14
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __GTK_FEATURES_H__ */

168
ltconfig
View file

@ -169,8 +169,8 @@ progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'`
# Constants: # Constants:
PROGRAM=ltconfig PROGRAM=ltconfig
PACKAGE=libtool PACKAGE=libtool
VERSION=1.3.2 VERSION=1.3.3
TIMESTAMP=" (1.385.2.150 1999/05/26 00:28:32)" TIMESTAMP=" (1.385.2.181 1999/07/02 15:49:11)"
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5'
ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.c $LIBS 1>&5' ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.c $LIBS 1>&5'
rm="rm -f" rm="rm -f"
@ -181,7 +181,8 @@ help="Try \`$progname --help' for more information."
default_ofile=libtool default_ofile=libtool
can_build_shared=yes can_build_shared=yes
enable_shared=yes enable_shared=yes
# All known linkers require a `.a' archive for static linking. # All known linkers require a `.a' archive for static linking (except M$VC,
# which needs '.lib').
enable_static=yes enable_static=yes
enable_fast_install=yes enable_fast_install=yes
enable_dlopen=unknown enable_dlopen=unknown
@ -201,6 +202,7 @@ need_locks=yes
ac_ext=c ac_ext=c
objext=o objext=o
libext=a libext=a
exeext=
cache_file= cache_file=
old_AR="$AR" old_AR="$AR"
@ -576,7 +578,7 @@ if test "$with_gcc" != yes || test -z "$CC"; then
# Now see if the compiler is really GCC. # Now see if the compiler is really GCC.
with_gcc=no with_gcc=no
echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6 echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6
echo "$progname:579: checking whether we are using GNU C" >&5 echo "$progname:581: checking whether we are using GNU C" >&5
$rm conftest.c $rm conftest.c
cat > conftest.c <<EOF cat > conftest.c <<EOF
@ -584,7 +586,7 @@ if test "$with_gcc" != yes || test -z "$CC"; then
yes; yes;
#endif #endif
EOF EOF
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo $progname:587: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then if { ac_try='${CC-cc} -E conftest.c'; { (eval echo $progname:589: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
with_gcc=yes with_gcc=yes
fi fi
$rm conftest.c $rm conftest.c
@ -598,8 +600,8 @@ compiler="$2"
echo $ac_n "checking for object suffix... $ac_c" 1>&6 echo $ac_n "checking for object suffix... $ac_c" 1>&6
$rm conftest* $rm conftest*
echo 'int i = 1;' > conftest.c echo 'int i = 1;' > conftest.c
echo "$progname:601: checking for object suffix" >& 5 echo "$progname:603: checking for object suffix" >& 5
if { (eval echo $progname:602: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; }; then if { (eval echo $progname:604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; }; then
# Append any warnings to the config.log. # Append any warnings to the config.log.
cat conftest.err 1>&5 cat conftest.err 1>&5
@ -617,6 +619,38 @@ fi
$rm conftest* $rm conftest*
echo "$ac_t$objext" 1>&6 echo "$ac_t$objext" 1>&6
echo $ac_n "checking for executable suffix... $ac_c" 1>&6
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_exeext="no"
$rm conftest*
echo 'main () { return 0; }' > conftest.c
echo "$progname:629: checking for executable suffix" >& 5
if { (eval echo $progname:630: \"$ac_link\") 1>&5; (eval $ac_link) 2>conftest.err; }; then
# Append any warnings to the config.log.
cat conftest.err 1>&5
for ac_file in conftest.*; do
case $ac_file in
*.c | *.err | *.$objext ) ;;
*) ac_cv_exeext=.`echo $ac_file | sed -e s/conftest.//` ;;
esac
done
else
cat conftest.err 1>&5
echo "$progname: failed program was:" >&5
cat conftest.c >&5
fi
$rm conftest*
fi
if test "X$ac_cv_exeext" = Xno; then
exeext=""
else
exeext="$ac_cv_exeext"
fi
echo "$ac_t$ac_cv_exeext" 1>&6
echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6 echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6
pic_flag= pic_flag=
special_shlib_compile_flags= special_shlib_compile_flags=
@ -739,8 +773,8 @@ if test -n "$pic_flag"; then
echo "int some_variable = 0;" > conftest.c echo "int some_variable = 0;" > conftest.c
save_CFLAGS="$CFLAGS" save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $pic_flag -DPIC" CFLAGS="$CFLAGS $pic_flag -DPIC"
echo "$progname:742: checking if $compiler PIC flag $pic_flag works" >&5 echo "$progname:776: checking if $compiler PIC flag $pic_flag works" >&5
if { (eval echo $progname:743: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then if { (eval echo $progname:777: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then
# Append any warnings to the config.log. # Append any warnings to the config.log.
cat conftest.err 1>&5 cat conftest.err 1>&5
@ -792,8 +826,8 @@ mkdir out
chmod -w . chmod -w .
save_CFLAGS="$CFLAGS" save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -o out/conftest2.o" CFLAGS="$CFLAGS -o out/conftest2.o"
echo "$progname:795: checking if $compiler supports -c -o file.o" >&5 echo "$progname:829: checking if $compiler supports -c -o file.o" >&5
if { (eval echo $progname:796: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.o; then if { (eval echo $progname:830: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.o; then
# The compiler can only warn and ignore the option if not recognized # The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings # So say no if there are warnings
@ -825,8 +859,8 @@ if test x"$compiler_c_o" = x"yes"; then
echo "int some_variable = 0;" > conftest.c echo "int some_variable = 0;" > conftest.c
save_CFLAGS="$CFLAGS" save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -c -o conftest.lo" CFLAGS="$CFLAGS -c -o conftest.lo"
echo "$progname:828: checking if $compiler supports -c -o file.lo" >&5 echo "$progname:862: checking if $compiler supports -c -o file.lo" >&5
if { (eval echo $progname:829: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.lo; then if { (eval echo $progname:863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.lo; then
# The compiler can only warn and ignore the option if not recognized # The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings # So say no if there are warnings
@ -877,8 +911,8 @@ if test "$with_gcc" = yes; then
echo "int some_variable = 0;" > conftest.c echo "int some_variable = 0;" > conftest.c
save_CFLAGS="$CFLAGS" save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.c" CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.c"
echo "$progname:880: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 echo "$progname:914: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
if { (eval echo $progname:881: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then if { (eval echo $progname:915: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then
# The compiler can only warn and ignore the option if not recognized # The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings # So say no if there are warnings
@ -921,8 +955,8 @@ $rm conftest*
echo 'main(){return(0);}' > conftest.c echo 'main(){return(0);}' > conftest.c
save_LDFLAGS="$LDFLAGS" save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $link_static_flag" LDFLAGS="$LDFLAGS $link_static_flag"
echo "$progname:924: checking if $compiler static flag $link_static_flag works" >&5 echo "$progname:958: checking if $compiler static flag $link_static_flag works" >&5
if { (eval echo $progname:925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then if { (eval echo $progname:959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
echo "$ac_t$link_static_flag" 1>&6 echo "$ac_t$link_static_flag" 1>&6
else else
echo "$ac_t"none 1>&6 echo "$ac_t"none 1>&6
@ -954,7 +988,7 @@ if test -z "$LD"; then
if test "$with_gcc" = yes; then if test "$with_gcc" = yes; then
# Check if gcc -print-prog-name=ld gives a path. # Check if gcc -print-prog-name=ld gives a path.
echo $ac_n "checking for ld used by GCC... $ac_c" 1>&6 echo $ac_n "checking for ld used by GCC... $ac_c" 1>&6
echo "$progname:957: checking for ld used by GCC" >&5 echo "$progname:991: checking for ld used by GCC" >&5
ac_prog=`($CC -print-prog-name=ld) 2>&5` ac_prog=`($CC -print-prog-name=ld) 2>&5`
case "$ac_prog" in case "$ac_prog" in
# Accept absolute paths. # Accept absolute paths.
@ -978,10 +1012,10 @@ if test -z "$LD"; then
esac esac
elif test "$with_gnu_ld" = yes; then elif test "$with_gnu_ld" = yes; then
echo $ac_n "checking for GNU ld... $ac_c" 1>&6 echo $ac_n "checking for GNU ld... $ac_c" 1>&6
echo "$progname:981: checking for GNU ld" >&5 echo "$progname:1015: checking for GNU ld" >&5
else else
echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
echo "$progname:984: checking for non-GNU ld" >&5 echo "$progname:1018: checking for non-GNU ld" >&5
fi fi
if test -z "$LD"; then if test -z "$LD"; then
@ -1047,7 +1081,7 @@ hardcode_minus_L=no
hardcode_shlibpath_var=unsupported hardcode_shlibpath_var=unsupported
runpath_var= runpath_var=
always_export_symbols=no always_export_symbols=no
export_symbols_cmds='$NM $libobjs | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols' export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
# include_expsyms should be a list of space-separated symbols to be *always* # include_expsyms should be a list of space-separated symbols to be *always*
# included in the symbol list # included in the symbol list
include_expsyms= include_expsyms=
@ -1130,10 +1164,9 @@ EOF
# Extract the symbol export list from an `--export-all' def file, # Extract the symbol export list from an `--export-all' def file,
# then regenerate the def file from the symbol export list, so that # then regenerate the def file from the symbol export list, so that
# the compiled dll only exports the symbol export list. # the compiled dll only exports the symbol export list.
export_symbols_cmds='rm -f $objdir/$soname-ltdll.c~ export_symbols_cmds='test -f $objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~
sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~ test -f $objdir/$soname-ltdll.$objext || (cd $objdir && $CC -c $soname-ltdll.c)~
(cd $objdir && $CC -c $soname-ltdll.c)~ $DLLTOOL --export-all --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --output-def $objdir/$soname-def $objdir/$soname-ltdll.$objext $libobjs $convenience~
$DLLTOOL --export-all --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --output-def $objdir/$soname-def $objdir/$soname-ltdll.$objext $libobjs~
sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]* ; *//" < $objdir/$soname-def > $export_symbols' sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]* ; *//" < $objdir/$soname-def > $export_symbols'
archive_expsym_cmds='echo EXPORTS > $objdir/$soname-def~ archive_expsym_cmds='echo EXPORTS > $objdir/$soname-def~
@ -1142,6 +1175,8 @@ EOF
echo " \$symbol @ \$_lt_hint ; " >> $objdir/$soname-def; echo " \$symbol @ \$_lt_hint ; " >> $objdir/$soname-def;
_lt_hint=`expr 1 + \$_lt_hint`; _lt_hint=`expr 1 + \$_lt_hint`;
done~ done~
test -f $objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~
test -f $objdir/$soname-ltdll.$objext || (cd $objdir && $CC -c $soname-ltdll.c)~
$CC -Wl,--base-file,$objdir/$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~ $CC -Wl,--base-file,$objdir/$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~
$DLLTOOL --as=$AS --dllname $soname --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~ $DLLTOOL --as=$AS --dllname $soname --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~
$CC -Wl,--base-file,$objdir/$soname-base $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~ $CC -Wl,--base-file,$objdir/$soname-base $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~
@ -1554,11 +1589,11 @@ void nm_test_func(){}
main(){nm_test_var='a';nm_test_func();return(0);} main(){nm_test_var='a';nm_test_func();return(0);}
EOF EOF
echo "$progname:1557: checking if global_symbol_pipe works" >&5 echo "$progname:1592: checking if global_symbol_pipe works" >&5
if { (eval echo $progname:1558: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then if { (eval echo $progname:1593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then
# Now try to grab the symbols. # Now try to grab the symbols.
nlist=conftest.nm nlist=conftest.nm
if { echo "$progname:1561: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then if { echo "$progname:1596: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
# Try sorting and uniquifying the output. # Try sorting and uniquifying the output.
if sort "$nlist" | uniq > "$nlist"T; then if sort "$nlist" | uniq > "$nlist"T; then
@ -1610,7 +1645,7 @@ EOF
save_CFLAGS="$CFLAGS" save_CFLAGS="$CFLAGS"
LIBS="conftstm.$objext" LIBS="conftstm.$objext"
CFLAGS="$CFLAGS$no_builtin_flag" CFLAGS="$CFLAGS$no_builtin_flag"
if { (eval echo $progname:1613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then if { (eval echo $progname:1648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
pipe_works=yes pipe_works=yes
else else
echo "$progname: failed program was:" >&5 echo "$progname: failed program was:" >&5
@ -1756,7 +1791,7 @@ bsdi4*)
soname_spec='${libname}.so' soname_spec='${libname}.so'
finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
shlibpath_var=LD_LIBRARY_PATH shlibpath_var=LD_LIBRARY_PATH
deplibs_check_method='file_magic ELF 32-bit LSB shared object' deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
file_magic_cmd=/usr/bin/file file_magic_cmd=/usr/bin/file
file_magic_test_file=/shlib/libc.so file_magic_test_file=/shlib/libc.so
sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
@ -1768,6 +1803,8 @@ bsdi4*)
cygwin* | mingw*) cygwin* | mingw*)
version_type=windows version_type=windows
need_version=no
need_lib_prefix=no
if test "$with_gcc" = yes; then if test "$with_gcc" = yes; then
library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.a' library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.a'
else else
@ -1776,7 +1813,6 @@ cygwin* | mingw*)
dynamic_linker='Win32 ld.exe' dynamic_linker='Win32 ld.exe'
deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
file_magic_cmd='${OBJDUMP} -f' file_magic_cmd='${OBJDUMP} -f'
need_lib_prefix=no
# FIXME: first we should search . and the directory the executable is in # FIXME: first we should search . and the directory the executable is in
shlibpath_var=PATH shlibpath_var=PATH
lt_cv_dlopen="LoadLibrary" lt_cv_dlopen="LoadLibrary"
@ -1807,11 +1843,22 @@ freebsd*)
esac esac
finish_cmds='PATH="\$PATH:/sbin" OBJFORMAT="'"$objformat"'" ldconfig -m $libdir' finish_cmds='PATH="\$PATH:/sbin" OBJFORMAT="'"$objformat"'" ldconfig -m $libdir'
shlibpath_var=LD_LIBRARY_PATH shlibpath_var=LD_LIBRARY_PATH
case "$host_os" in
freebsd2* | freebsd3.[01]*)
shlibpath_overrides_runpath=yes
;;
*) # from 3.2 on
shlibpath_overrides_runpath=no
;;
esac
;; ;;
gnu*) gnu*)
version_type=linux version_type=linux
library_names_spec='${libname}${release}.so$versuffix ${libname}.so' need_lib_prefix=no
need_version=no
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
soname_spec='${libname}${release}.so$major'
shlibpath_var=LD_LIBRARY_PATH shlibpath_var=LD_LIBRARY_PATH
;; ;;
@ -2120,7 +2167,7 @@ else
if eval "test \"`echo '$''{'lt_cv_dlopen'+set}'`\" != set"; then if eval "test \"`echo '$''{'lt_cv_dlopen'+set}'`\" != set"; then
lt_cv_dlopen=no lt_cv_dlopen_libs= lt_cv_dlopen=no lt_cv_dlopen_libs=
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
echo "$progname:2123: checking for dlopen in -ldl" >&5 echo "$progname:2170: checking for dlopen in -ldl" >&5
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
@ -2128,7 +2175,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS" LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2131 "ltconfig" #line 2178 "ltconfig"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */ builtin and then its argument prototype would still apply. */
@ -2138,7 +2185,7 @@ int main() {
dlopen() dlopen()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo $progname:2141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo $progname:2188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
@ -2157,12 +2204,12 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
else else
echo "$ac_t""no" 1>&6 echo "$ac_t""no" 1>&6
echo $ac_n "checking for dlopen""... $ac_c" 1>&6 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
echo "$progname:2160: checking for dlopen" >&5 echo "$progname:2207: checking for dlopen" >&5
if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2165 "ltconfig" #line 2212 "ltconfig"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char dlopen(); below. */ which can conflict with char dlopen(); below. */
#include <assert.h> #include <assert.h>
@ -2184,7 +2231,7 @@ dlopen();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo $progname:2187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo $progname:2234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_dlopen=yes" eval "ac_cv_func_dlopen=yes"
else else
@ -2201,7 +2248,7 @@ if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
else else
echo "$ac_t""no" 1>&6 echo "$ac_t""no" 1>&6
echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
echo "$progname:2204: checking for dld_link in -ldld" >&5 echo "$progname:2251: checking for dld_link in -ldld" >&5
ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'` ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
@ -2209,7 +2256,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-ldld $LIBS" LIBS="-ldld $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2212 "ltconfig" #line 2259 "ltconfig"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */ builtin and then its argument prototype would still apply. */
@ -2219,7 +2266,7 @@ int main() {
dld_link() dld_link()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo $progname:2222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo $progname:2269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
@ -2238,12 +2285,12 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
else else
echo "$ac_t""no" 1>&6 echo "$ac_t""no" 1>&6
echo $ac_n "checking for shl_load""... $ac_c" 1>&6 echo $ac_n "checking for shl_load""... $ac_c" 1>&6
echo "$progname:2241: checking for shl_load" >&5 echo "$progname:2288: checking for shl_load" >&5
if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2246 "ltconfig" #line 2293 "ltconfig"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char shl_load(); below. */ which can conflict with char shl_load(); below. */
#include <assert.h> #include <assert.h>
@ -2265,7 +2312,7 @@ shl_load();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo $progname:2268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo $progname:2315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_shl_load=yes" eval "ac_cv_func_shl_load=yes"
else else
@ -2283,7 +2330,7 @@ if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
else else
echo "$ac_t""no" 1>&6 echo "$ac_t""no" 1>&6
echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
echo "$progname:2286: checking for shl_load in -ldld" >&5 echo "$progname:2333: checking for shl_load in -ldld" >&5
ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
@ -2291,7 +2338,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-ldld $LIBS" LIBS="-ldld $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2294 "ltconfig" #line 2341 "ltconfig"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
@ -2302,7 +2349,7 @@ int main() {
shl_load() shl_load()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo $progname:2305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo $progname:2352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
@ -2345,17 +2392,17 @@ fi
for ac_hdr in dlfcn.h; do for ac_hdr in dlfcn.h; do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "$progname:2348: checking for $ac_hdr" >&5 echo "$progname:2395: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2353 "ltconfig" #line 2400 "ltconfig"
#include <$ac_hdr> #include <$ac_hdr>
int fnord = 0; int fnord = 0;
EOF EOF
ac_try="$ac_compile conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_compile conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo $progname:2358: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo $progname:2405: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
@ -2383,7 +2430,7 @@ done
LIBS="$lt_cv_dlopen_libs $LIBS" LIBS="$lt_cv_dlopen_libs $LIBS"
echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6 echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
echo "$progname:2386: checking whether a program can dlopen itself" >&5 echo "$progname:2433: checking whether a program can dlopen itself" >&5
if test "${lt_cv_dlopen_self+set}" = set; then if test "${lt_cv_dlopen_self+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -2391,7 +2438,7 @@ else
lt_cv_dlopen_self=cross lt_cv_dlopen_self=cross
else else
cat > conftest.c <<EOF cat > conftest.c <<EOF
#line 2394 "ltconfig" #line 2441 "ltconfig"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H
#include <dlfcn.h> #include <dlfcn.h>
@ -2434,10 +2481,10 @@ else
fnord() { int i=42;} fnord() { int i=42;}
main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW); main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord"); if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
if(ptr1 || ptr2) exit(0); } exit(1); } if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); }
EOF EOF
if { (eval echo $progname:2440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null if { (eval echo $progname:2487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then then
lt_cv_dlopen_self=yes lt_cv_dlopen_self=yes
else else
@ -2456,7 +2503,7 @@ echo "$ac_t""$lt_cv_dlopen_self" 1>&6
if test "$lt_cv_dlopen_self" = yes; then if test "$lt_cv_dlopen_self" = yes; then
LDFLAGS="$LDFLAGS $link_static_flag" LDFLAGS="$LDFLAGS $link_static_flag"
echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6 echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
echo "$progname:2459: checking whether a statically linked program can dlopen itself" >&5 echo "$progname:2506: checking whether a statically linked program can dlopen itself" >&5
if test "${lt_cv_dlopen_self_static+set}" = set; then if test "${lt_cv_dlopen_self_static+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -2464,7 +2511,7 @@ else
lt_cv_dlopen_self_static=cross lt_cv_dlopen_self_static=cross
else else
cat > conftest.c <<EOF cat > conftest.c <<EOF
#line 2467 "ltconfig" #line 2514 "ltconfig"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H
#include <dlfcn.h> #include <dlfcn.h>
@ -2507,10 +2554,10 @@ else
fnord() { int i=42;} fnord() { int i=42;}
main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW); main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord"); if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
if(ptr1 || ptr2) exit(0); } exit(1); } if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); }
EOF EOF
if { (eval echo $progname:2513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null if { (eval echo $progname:2560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then then
lt_cv_dlopen_self_static=yes lt_cv_dlopen_self_static=yes
else else
@ -2729,6 +2776,9 @@ objext="$objext"
# Old archive suffix (normally "a"). # Old archive suffix (normally "a").
libext="$libext" libext="$libext"
# Executable file suffix (normally "").
exeext="$exeext"
# Additional compiler flags for building library objects. # Additional compiler flags for building library objects.
pic_flag=$pic_flag pic_flag=$pic_flag
@ -2897,7 +2947,7 @@ EOF
esac esac
# Append the ltmain.sh script. # Append the ltmain.sh script.
cat "$ltmain" >> "$ofile" || (rm -f "$ofile"; exit 1) sed '$q' "$ltmain" >> "$ofile" || (rm -f "$ofile"; exit 1)
chmod +x "$ofile" chmod +x "$ofile"
;; ;;

212
ltmain.sh
View file

@ -54,8 +54,8 @@ modename="$progname"
# Constants. # Constants.
PROGRAM=ltmain.sh PROGRAM=ltmain.sh
PACKAGE=libtool PACKAGE=libtool
VERSION=1.3.2 VERSION=1.3.3
TIMESTAMP=" (1.385.2.150 1999/05/26 00:28:32)" TIMESTAMP=" (1.385.2.181 1999/07/02 15:49:11)"
default_mode= default_mode=
help="Try \`$progname --help' for more information." help="Try \`$progname --help' for more information."
@ -69,7 +69,7 @@ rm="rm -f"
Xsed='sed -e 1s/^X//' Xsed='sed -e 1s/^X//'
sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g' sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
SP2NL='tr \040 \012' SP2NL='tr \040 \012'
NL2SP='tr \012 \040' NL2SP='tr \015\012 \040\040'
# NLS nuisances. # NLS nuisances.
# Only set LANG and LC_ALL to C if already set. # Only set LANG and LC_ALL to C if already set.
@ -638,6 +638,12 @@ compiler."
# #undef WIN32_LEAN_AND_MEAN # #undef WIN32_LEAN_AND_MEAN
# #include <stdio.h> # #include <stdio.h>
# #
# #ifndef __CYGWIN__
# # ifdef __CYGWIN32__
# # define __CYGWIN__ __CYGWIN32__
# # endif
# #endif
#
# #ifdef __cplusplus # #ifdef __cplusplus
# extern "C" { # extern "C" {
# #endif # #endif
@ -646,8 +652,10 @@ compiler."
# } # }
# #endif # #endif
# #
# #ifdef __CYGWIN__
# #include <cygwin/cygwin_dll.h> # #include <cygwin/cygwin_dll.h>
# DECLARE_CYGWIN_DLL( DllMain ); # DECLARE_CYGWIN_DLL( DllMain );
# #endif
# HINSTANCE __hDllInstance_base; # HINSTANCE __hDllInstance_base;
# #
# BOOL APIENTRY # BOOL APIENTRY
@ -790,9 +798,6 @@ compiler."
# } # }
# /* impgen.c ends here */ # /* impgen.c ends here */
;; ;;
*-*-beos*)
allow_undefined=no
;;
*) *)
allow_undefined=yes allow_undefined=yes
;; ;;
@ -896,6 +901,14 @@ compiler."
fi fi
case "$arg" in case "$arg" in
*.la | *.lo) ;; # We handle these cases below. *.la | *.lo) ;; # We handle these cases below.
force)
if test "$dlself" = no; then
dlself=needless
export_dynamic=yes
fi
prev=
continue
;;
self) self)
if test "$prev" = dlprefiles; then if test "$prev" = dlprefiles; then
dlself=yes dlself=yes
@ -1225,7 +1238,7 @@ compiler."
fi fi
if test -n "$dependency_libs"; then if test -n "$dependency_libs"; then
# Extract -R from dependency_libs # Extract -R and -L from dependency_libs
temp_deplibs= temp_deplibs=
for deplib in $dependency_libs; do for deplib in $dependency_libs; do
case "$deplib" in case "$deplib" in
@ -1237,7 +1250,13 @@ compiler."
-L*) case "$compile_command $temp_deplibs " in -L*) case "$compile_command $temp_deplibs " in
*" $deplib "*) ;; *" $deplib "*) ;;
*) temp_deplibs="$temp_deplibs $deplib";; *) temp_deplibs="$temp_deplibs $deplib";;
esac;; esac
temp_dir=`$echo "X$deplib" | $Xsed -e 's/^-L//'`
case " $lib_search_path " in
*" $temp_dir "*) ;;
*) lib_search_path="$lib_search_path $temp_dir";;
esac
;;
*) temp_deplibs="$temp_deplibs $deplib";; *) temp_deplibs="$temp_deplibs $deplib";;
esac esac
done done
@ -2040,51 +2059,6 @@ EOF
# Use standard objects if they are pic # Use standard objects if they are pic
test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
if test -n "$whole_archive_flag_spec"; then
if test -n "$convenience"; then
eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
fi
else
gentop="$output_objdir/${outputname}x"
$show "${rm}r $gentop"
$run ${rm}r "$gentop"
$show "mkdir $gentop"
$run mkdir "$gentop"
status=$?
if test $status -ne 0 && test ! -d "$gentop"; then
exit $status
fi
generated="$generated $gentop"
for xlib in $convenience; do
# Extract the objects.
case "$xlib" in
[\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
*) xabs=`pwd`"/$xlib" ;;
esac
xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
xdir="$gentop/$xlib"
$show "${rm}r $xdir"
$run ${rm}r "$xdir"
$show "mkdir $xdir"
$run mkdir "$xdir"
status=$?
if test $status -ne 0 && test ! -d "$xdir"; then
exit $status
fi
$show "(cd $xdir && $AR x $xabs)"
$run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
libobjs="$libobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
done
fi
if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
eval flag=\"$thread_safe_flag_spec\"
linkopts="$linkopts $flag"
fi
# Prepare the list of exported symbols # Prepare the list of exported symbols
if test -z "$export_symbols"; then if test -z "$export_symbols"; then
if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
@ -2112,6 +2086,51 @@ EOF
$run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
fi fi
if test -n "$convenience"; then
if test -n "$whole_archive_flag_spec"; then
eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
else
gentop="$output_objdir/${outputname}x"
$show "${rm}r $gentop"
$run ${rm}r "$gentop"
$show "mkdir $gentop"
$run mkdir "$gentop"
status=$?
if test $status -ne 0 && test ! -d "$gentop"; then
exit $status
fi
generated="$generated $gentop"
for xlib in $convenience; do
# Extract the objects.
case "$xlib" in
[\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
*) xabs=`pwd`"/$xlib" ;;
esac
xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
xdir="$gentop/$xlib"
$show "${rm}r $xdir"
$run ${rm}r "$xdir"
$show "mkdir $xdir"
$run mkdir "$xdir"
status=$?
if test $status -ne 0 && test ! -d "$xdir"; then
exit $status
fi
$show "(cd $xdir && $AR x $xabs)"
$run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
libobjs="$libobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
done
fi
fi
if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
eval flag=\"$thread_safe_flag_spec\"
linkopts="$linkopts $flag"
fi
# Do each of the archive commands. # Do each of the archive commands.
if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
eval cmds=\"$archive_expsym_cmds\" eval cmds=\"$archive_expsym_cmds\"
@ -2190,8 +2209,58 @@ EOF
# Delete the old objects. # Delete the old objects.
$run $rm $obj $libobj $run $rm $obj $libobj
# Objects from convenience libraries. This assumes
# single-version convenience libraries. Whenever we create
# different ones for PIC/non-PIC, this we'll have to duplicate
# the extraction.
reload_conv_objs=
gentop=
# reload_cmds runs $LD directly, so let us get rid of
# -Wl from whole_archive_flag_spec
wl=
if test -n "$convenience"; then
if test -n "$whole_archive_flag_spec"; then
eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
else
gentop="$output_objdir/${obj}x"
$show "${rm}r $gentop"
$run ${rm}r "$gentop"
$show "mkdir $gentop"
$run mkdir "$gentop"
status=$?
if test $status -ne 0 && test ! -d "$gentop"; then
exit $status
fi
generated="$generated $gentop"
for xlib in $convenience; do
# Extract the objects.
case "$xlib" in
[\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
*) xabs=`pwd`"/$xlib" ;;
esac
xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
xdir="$gentop/$xlib"
$show "${rm}r $xdir"
$run ${rm}r "$xdir"
$show "mkdir $xdir"
$run mkdir "$xdir"
status=$?
if test $status -ne 0 && test ! -d "$xdir"; then
exit $status
fi
$show "(cd $xdir && $AR x $xabs)"
$run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
reload_conv_objs="$reload_objs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
done
fi
fi
# Create the old-style object. # Create the old-style object.
reload_objs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP` reload_objs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs"
output="$obj" output="$obj"
eval cmds=\"$reload_cmds\" eval cmds=\"$reload_cmds\"
@ -2204,9 +2273,21 @@ EOF
IFS="$save_ifs" IFS="$save_ifs"
# Exit if we aren't doing a library object file. # Exit if we aren't doing a library object file.
test -z "$libobj" && exit 0 if test -z "$libobj"; then
if test -n "$gentop"; then
$show "${rm}r $gentop"
$run ${rm}r $gentop
fi
exit 0
fi
if test "$build_libtool_libs" != yes; then if test "$build_libtool_libs" != yes; then
if test -n "$gentop"; then
$show "${rm}r $gentop"
$run ${rm}r $gentop
fi
# Create an invalid libtool object if no PIC, so that we don't # Create an invalid libtool object if no PIC, so that we don't
# accidentally link it into a program. # accidentally link it into a program.
$show "echo timestamp > $libobj" $show "echo timestamp > $libobj"
@ -2216,7 +2297,7 @@ EOF
if test -n "$pic_flag"; then if test -n "$pic_flag"; then
# Only do commands if we really have different PIC objects. # Only do commands if we really have different PIC objects.
reload_objs="$libobjs" reload_objs="$libobjs $reload_conv_objs"
output="$libobj" output="$libobj"
eval cmds=\"$reload_cmds\" eval cmds=\"$reload_cmds\"
IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
@ -2234,6 +2315,11 @@ EOF
$run $LN_S $obj $libobj || exit $? $run $LN_S $obj $libobj || exit $?
fi fi
if test -n "$gentop"; then
$show "${rm}r $gentop"
$run ${rm}r $gentop
fi
exit 0 exit 0
;; ;;
@ -2366,7 +2452,7 @@ EOF
fi fi
dlsyms= dlsyms=
if test -n "$dlfiles$dlprefiles" || test "$dlself" = yes; then if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
if test -n "$NM" && test -n "$global_symbol_pipe"; then if test -n "$NM" && test -n "$global_symbol_pipe"; then
dlsyms="${outputname}S.c" dlsyms="${outputname}S.c"
else else
@ -2779,7 +2865,7 @@ else
fi" fi"
else else
echo >> $output "\ echo >> $output "\
program='$outputname' program='$outputname$exeext'
progdir=\"\$thisdir/$objdir\" progdir=\"\$thisdir/$objdir\"
" "
fi fi
@ -3204,13 +3290,11 @@ libdir='$install_libdir'\
# Install the shared library and build the symlinks. # Install the shared library and build the symlinks.
$show "$install_prog $dir/$realname $destdir/$realname" $show "$install_prog $dir/$realname $destdir/$realname"
$run eval "$install_prog $dir/$realname $destdir/$realname" || exit $? $run eval "$install_prog $dir/$realname $destdir/$realname" || exit $?
test "X$dlname" = "X$realname" && dlname=
if test $# -gt 0; then if test $# -gt 0; then
# Delete the old symlinks, and create new ones. # Delete the old symlinks, and create new ones.
for linkname for linkname
do do
test "X$dlname" = "X$linkname" && dlname=
if test "$linkname" != "$realname"; then if test "$linkname" != "$realname"; then
$show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
$run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
@ -3218,12 +3302,6 @@ libdir='$install_libdir'\
done done
fi fi
if test -n "$dlname"; then
# Install the dynamically-loadable library.
$show "$install_prog $dir/$dlname $destdir/$dlname"
$run eval "$install_prog $dir/$dlname $destdir/$dlname" || exit $?
fi
# Do each command in the postinstall commands. # Do each command in the postinstall commands.
lib="$destdir/$realname" lib="$destdir/$realname"
eval cmds=\"$postinstall_cmds\" eval cmds=\"$postinstall_cmds\"
@ -3655,9 +3733,7 @@ libdir='$install_libdir'\
# Delete the libtool libraries and symlinks. # Delete the libtool libraries and symlinks.
for n in $library_names; do for n in $library_names; do
rmfiles="$rmfiles $dir/$n" rmfiles="$rmfiles $dir/$n"
test "X$n" = "X$dlname" && dlname=
done done
test -n "$dlname" && rmfiles="$rmfiles $dir/$dlname"
test -n "$old_library" && rmfiles="$rmfiles $dir/$old_library" test -n "$old_library" && rmfiles="$rmfiles $dir/$old_library"
$show "$rm $rmfiles" $show "$rm $rmfiles"

View file

@ -13,17 +13,6 @@ echo "Checking gtk+-$VERSION.tar.gz..."
tar xfz gtk+-$VERSION.tar.gz tar xfz gtk+-$VERSION.tar.gz
for file in gtk+.spec docs/gtk-config.1
do
echo -n "$file... "
if [ "x`grep $VERSION gtk+-$VERSION/$file | wc -l | awk -F' ' '{print $1}'`" == "x1" ]; then
echo "ok"
else
echo "failed."
exit 1
fi
done
echo -n "README..." echo -n "README..."
if [ "x`grep $VERSION gtk+-$VERSION/README | wc -l | awk -F' ' '{print $1}'`" == "x4" ]; then if [ "x`grep $VERSION gtk+-$VERSION/README | wc -l | awk -F' ' '{print $1}'`" == "x4" ]; then
echo "ok" echo "ok"