diff options
author | Federico Mena Quintero <federico@redhat.com> | 1999-09-28 20:19:13 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 1999-09-28 20:19:13 +0000 |
commit | 95b3f3e46016e4993e60e8c139bfd03a106201ba (patch) | |
tree | b029a3211a1cfc14ec11507e3cce8c5be0657f60 | |
parent | c3e01fe599d7f6d7cb313545f9c136afb6a9fd68 (diff) | |
download | gtk+-95b3f3e46016e4993e60e8c139bfd03a106201ba.tar.gz |
[ 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>
54 files changed, 5501 insertions, 1064 deletions
@@ -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> * gdk/win32/gdk.c (gdk_exit_func): Delete the gdk_DC when exiting, diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index b3c28abbd7..add3c28b1d 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -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> * gdk/win32/gdk.c (gdk_exit_func): Delete the gdk_DC when exiting, diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index b3c28abbd7..add3c28b1d 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -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> * gdk/win32/gdk.c (gdk_exit_func): Delete the gdk_DC when exiting, diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index b3c28abbd7..add3c28b1d 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -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> * gdk/win32/gdk.c (gdk_exit_func): Delete the gdk_DC when exiting, diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index b3c28abbd7..add3c28b1d 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -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> * gdk/win32/gdk.c (gdk_exit_func): Delete the gdk_DC when exiting, diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index b3c28abbd7..add3c28b1d 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -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> * gdk/win32/gdk.c (gdk_exit_func): Delete the gdk_DC when exiting, diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index b3c28abbd7..add3c28b1d 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -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> * gdk/win32/gdk.c (gdk_exit_func): Delete the gdk_DC when exiting, @@ -7,12 +7,12 @@ you got this package. Simple install procedure ======================== - % gzip -cd gtk+-1.2.0.tar.gz | tar xvf - # unpack the sources - % cd gtk+-1.2.0 # change to the toplevel directory - % ./configure # run the `configure' script - % make # build GTK + % gzip -cd gtk+-1.2.5.tar.gz | tar xvf - # unpack the sources + % cd gtk+-1.2.5 # change to the toplevel directory + % ./configure # run the `configure' script + % make # build GTK [ Become root if necessary ] - % make install # install GTK + % make install # install GTK The Nitty-Gritty ================ @@ -43,6 +43,13 @@ which form of support to use: 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] 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 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 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 +Native-Language Support and gettext() +===================================== + +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 -================================= +Using an uninstalled copy of GLIB [ Unsupported ] +================================================= You can compile GTK+ against a copy of GLIB that you have not yet installed. To do this, give the --with-glib=DIR options 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 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 ======================== @@ -126,7 +157,7 @@ For complete details, see the file docs/gtk-config.txt 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 kinput is available from: diff --git a/Makefile.am b/Makefile.am index 0ec9ada69a..da06375b48 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,10 +1,13 @@ -## Process this file with automake to produce Makefile.in +## Makefile.am for GTK+ SRC_SUBDIRS = gdk gtk SUBDIRS = po $(SRC_SUBDIRS) docs bin_SCRIPTS = gtk-config +# require automake 1.4 +AUTOMAKE_OPTIONS = 1.4 + EXTRA_DIST = \ HACKING \ gtk+.spec.in \ @@ -97,8 +100,14 @@ EXTRA_DIST = \ examples/spinbutton/Makefile \ examples/find-examples.sh -dist-hook: - cp gtk+.spec $(distdir) +dist-hook: gtk+.spec + 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 m4data_DATA = gtk.m4 @@ -12,21 +12,14 @@ Outstanding items: * Make all widget attributes configurable after the widget is created (timj). * 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 - such - - * More dialogs: Print, GtkFontSelector, maybe others... + * More dialogs: Print, maybe others... * make the gtk_main callbacks consistent in their add/remove behaviour. * 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 - 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 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: Bugs: diff --git a/acinclude.m4 b/acinclude.m4 index f9e725a7b3..5de6f7aa19 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -473,22 +473,22 @@ AC_DEFUN(AM_GTK_WITH_NLS, CATOBJEXT=NONE AC_CHECK_HEADER(libintl.h, - [AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc, - [AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")], - gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)]) + [AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc, + [AC_TRY_LINK([#include <libintl.h>], [return (int) dgettext ("","")], + 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_CACHE_CHECK([for gettext in libintl], - gt_cv_func_gettext_libintl, - [AC_CHECK_LIB(intl, gettext, - gt_cv_func_gettext_libintl=yes, - gt_cv_func_gettext_libintl=no)], - gt_cv_func_gettext_libintl=no)]) + [AC_CACHE_CHECK([for dgettext in libintl], + gt_cv_func_dgettext_libintl, + [AC_CHECK_LIB(intl, dgettext, + gt_cv_func_dgettext_libintl=yes, + gt_cv_func_dgettext_libintl=no)], + gt_cv_func_dgettext_libintl=no)]) fi - if test "$gt_cv_func_gettext_libc" = "yes" \ - || test "$gt_cv_func_gettext_libintl" = "yes"; then + if test "$gt_cv_func_dgettext_libc" = "yes" \ + || test "$gt_cv_func_dgettext_libintl" = "yes"; then AC_DEFINE(HAVE_GETTEXT) AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl @@ -508,8 +508,8 @@ AC_DEFUN(AM_GTK_WITH_NLS, fi # Added by Martin Baulig 12/15/98 for libc5 systems - if test "$gt_cv_func_gettext_libc" != "yes" \ - && test "$gt_cv_func_gettext_libintl" = "yes"; then + if test "$gt_cv_func_dgettext_libc" != "yes" \ + && test "$gt_cv_func_dgettext_libintl" = "yes"; then INTLLIBS=-lintl LIBS=`echo $LIBS | sed -e 's/-lintl//'` fi diff --git a/autogen.sh b/autogen.sh index fa0fabfa2e..6fe026c861 100755 --- a/autogen.sh +++ b/autogen.sh @@ -80,7 +80,7 @@ automake -a $am_opt autoconf cd $ORIGDIR -$srcdir/configure "$@" +$srcdir/configure --enable-maintainer-mode "$@" echo echo "Now type 'make' to compile $PROJECT." diff --git a/configure.in b/configure.in index a682df2f36..ed35036dd2 100644 --- a/configure.in +++ b/configure.in @@ -95,6 +95,7 @@ AC_ARG_ENABLE(xim, [ --enable-xim support XIM [default=yes]], , enable_xim="yes") AC_ARG_ENABLE(xim_inst, [ --disable-xim-inst does not use xim instantiate callback], , 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(xinput, [ --with-xinput=[no/gxi/xfree] support XInput ]) @@ -143,7 +144,10 @@ if test "x$GCC" = "xyes"; then fi 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 AC_PROG_AWK @@ -153,22 +157,34 @@ AC_CHECK_PROGS(PERL, perl5 perl) AC_CHECK_PROG(INDENT, indent, indent) REBUILD=\# -if test -n "$PERL" && perl -v | grep 'version 5.' > /dev/null ; then - if test -n "$AWK" ; then - REBUILD= - fi +if test "x$enable_rebuilds" = "xyes" && \ + test -n "$PERL" && \ + $PERL -e 'exit !($] >= 5.002)' > /dev/null 2>&1 && \ + test -n "$AWK" ; then + REBUILD= fi AC_SUBST(REBUILD) 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 -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 -AC_CHECK_FUNC(gettext, - , - AC_CHECK_LIB(intl, gettext) -) +LIBS="$LIBS $INTLLIBS" + # AM_GTK_GNU_GETTEXT above substs $DATADIRNAME # this is the directory where the *.{mo,gmo} files are installed gtklocaledir='${prefix}/${DATADIRNAME}/locale' @@ -596,11 +612,13 @@ fi AC_OUTPUT([ gtk+.spec +docs/gtk-config.1 Makefile gtk-config po/Makefile.in docs/Makefile gdk/Makefile gtk/Makefile +gtk/gtkfeatures.h gtk/gtkcompat.h ], [chmod +x gtk-config]) diff --git a/docs/Makefile.am b/docs/Makefile.am index ddebc3e36f..8d58f71fdd 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -101,36 +101,7 @@ FAQ_FILES=html/gtkfaq.html \ html/gtkfaq-7.html \ text/gtkfaq.txt -EXTRA_DIST = \ - 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) +html/gtk_tut_table.gif: gdk.html gtk.html .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 \ echo $$p; \ 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) diff --git a/docs/gtk-config.1 b/docs/gtk-config.1 index a7ad1baaa7..b6bc5e09cf 100644 --- a/docs/gtk-config.1 +++ b/docs/gtk-config.1 @@ -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 gtk-config - script to get information about the installed version of GTK+ .SH SYNOPSIS diff --git a/docs/gtk-config.1.in b/docs/gtk-config.1.in new file mode 100644 index 0000000000..5f40942324 --- /dev/null +++ b/docs/gtk-config.1.in @@ -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. diff --git a/gdk/COPYING b/gdk/COPYING new file mode 100644 index 0000000000..223ede7de3 --- /dev/null +++ b/gdk/COPYING @@ -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! + + diff --git a/gdk/Makefile.am b/gdk/Makefile.am index 6bb478351d..39f07bbfaa 100644 --- a/gdk/Makefile.am +++ b/gdk/Makefile.am @@ -1,21 +1,47 @@ -## Process this file with automake to produce Makefile.in +## Makefile.am for gtk+/gdk -gdkincludedir = $(includedir)/gdk - - - -lib_LTLIBRARIES = libgdk.la - -INCLUDES = \ +INCLUDES = @STRIP_BEGIN@ \ -DG_LOG_DOMAIN=\"Gdk\" \ -I$(top_srcdir) \ @GTK_DEBUG_FLAGS@ \ @GTK_XIM_FLAGS@ \ @GTK_LOCALE_FLAGS@ \ @GLIB_CFLAGS@ \ - @x_cflags@ + @x_cflags@ \ +@STRIP_END@ + +# +# libraries to compile and install +# +lib_LTLIBRARIES = libgdk.la -libgdk_la_SOURCES = \ +# 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 \ gdkcc.c \ gdkcolor.c \ @@ -46,34 +72,35 @@ libgdk_la_SOURCES = \ MwmUtil.h \ gxid_lib.h \ gxid_proto.h \ - gxid_lib.c -## this last one is ifdef'd out unless XINPUT_GXI is defined -## It's easier than trying to get automake to handle compiling -## it conditionally - -gdkinclude_HEADERS = \ - gdk.h \ - gdkcursors.h \ - gdkrgb.h \ - gdki18n.h \ - gdkkeysyms.h \ - gdkprivate.h \ - gdktypes.h \ - gdkx.h - -LDADDS = \ - @x_ldflags@ \ - @x_libs@ \ - @GLIB_LIBS@ \ - -lm - -libgdk_la_LDFLAGS = \ - -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) -release $(LT_RELEASE) \ - @GLIB_DEPLIBS@ \ - @x_ldflags@ \ - @x_libs@ \ - -lm + gxid_lib.c \ +@STRIP_END@ + +# +# setup GDK sources and their dependancies +# +libgdkinclude_HEADERS = $(gdk_public_h_sources) +libgdk_la_SOURCES = $(gdk_c_sources) +MAINTAINERCLEANFILES += +EXTRA_HEADERS += +EXTRA_DIST += +EXTRA_DIST += + +# +# rules to generate built sources +# +# we only need to remake these headers once a new X version is released +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 +# +# Rule to install gdkconfig.h header file +# configexecincludedir = $(pkglibdir)/include #configexecinclude_DATA = 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 echo timestamp > stamp-gc-h +# +# extra programs +# EXTRA_PROGRAMS = gxid - bin_PROGRAMS = @xinput_progs@ - +LDADDS = @STRIP_BEGIN@ \ + @x_ldflags@ \ + @x_libs@ \ + @GLIB_LIBS@ \ + -lm \ +@STRIP_END@ gxid_SOURCES = gxid.c - 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 @@ -31,6 +31,7 @@ #include <stdlib.h> #include <string.h> #include <limits.h> +#include <errno.h> #ifdef HAVE_SYS_SELECT_H #include <sys/select.h> @@ -48,6 +49,7 @@ #include "gdkinput.h" #include "gdkx.h" #include "gdki18n.h" +#include "gdkkeysyms.h" #ifndef X_GETTIMEOFDAY #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); else if (strcmp ("callbacks", (*argv)[i]) == 0) gdk_im_set_best_style (GDK_IM_PREEDIT_CALLBACKS); + (*argv)[i] = NULL; } } 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); else if (strcmp ("callbacks", (*argv)[i]) == 0) gdk_im_set_best_style (GDK_IM_STATUS_CALLBACKS); + (*argv)[i] = NULL; } } #endif @@ -406,9 +410,9 @@ gdk_init_check (int *argc, g_free(argv_orig[i]); g_free(argv_orig); - gdk_wm_delete_window = XInternAtom (gdk_display, "WM_DELETE_WINDOW", True); - gdk_wm_take_focus = XInternAtom (gdk_display, "WM_TAKE_FOCUS", True); - gdk_wm_protocols = XInternAtom (gdk_display, "WM_PROTOCOLS", True); + gdk_wm_delete_window = XInternAtom (gdk_display, "WM_DELETE_WINDOW", False); + gdk_wm_take_focus = XInternAtom (gdk_display, "WM_TAKE_FOCUS", False); + gdk_wm_protocols = XInternAtom (gdk_display, "WM_PROTOCOLS", False); gdk_wm_window_protocols[0] = gdk_wm_delete_window; gdk_wm_window_protocols[1] = gdk_wm_take_focus; gdk_selection_property = XInternAtom (gdk_display, "GDK_SELECTION", False); @@ -1032,20 +1036,35 @@ static int gdk_x_error (Display *display, XErrorEvent *error) { - char buf[64]; - - if (gdk_error_warnings) + if (error->error_code) { - XGetErrorText (display, error->error_code, buf, 63); - 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); + if (gdk_error_warnings) + { + char buf[64]; + + XGetErrorText (display, error->error_code, buf, 63); + +#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; } @@ -1071,8 +1090,27 @@ gdk_x_error (Display *display, static int gdk_x_io_error (Display *display) { - g_error ("an x io error occurred"); - return 0; + /* This is basically modelled after the code in XLib. We need + * 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 * @@ -1104,7 +1142,7 @@ gdk_error_trap_push (void) } else { - node = g_slist_alloc(); + node = g_slist_alloc (); node->data = g_new (GdkErrorTrap, 1); } @@ -1166,7 +1204,7 @@ gdk_send_xevent (Window window, gboolean propagate, glong event_mask, XSync (gdk_display, False); gdk_error_warnings = old_warnings; - return result && (gdk_error_code != -1); + return result && !gdk_error_code; } #ifndef HAVE_XCONVERTCASE @@ -488,8 +488,8 @@ GdkPixmap* gdk_pixmap_create_from_xpm (GdkWindow *window, GdkBitmap **mask, GdkColor *transparent_color, const gchar *filename); -GdkPixmap* gdk_pixmap_colormap_create_from_xpm - (GdkWindow *window, +GdkPixmap* gdk_pixmap_colormap_create_from_xpm ( + GdkWindow *window, GdkColormap *colormap, GdkBitmap **mask, GdkColor *transparent_color, @@ -498,8 +498,8 @@ GdkPixmap* gdk_pixmap_create_from_xpm_d (GdkWindow *window, GdkBitmap **mask, GdkColor *transparent_color, gchar **data); -GdkPixmap* gdk_pixmap_colormap_create_from_xpm_d - (GdkWindow *window, +GdkPixmap* gdk_pixmap_colormap_create_from_xpm_d ( + GdkWindow *window, GdkColormap *colormap, GdkBitmap **mask, GdkColor *transparent_color, @@ -544,66 +544,65 @@ void gdk_image_destroy (GdkImage *image); /* Color */ -GdkColormap* gdk_colormap_new (GdkVisual *visual, - gint allocate); -GdkColormap* gdk_colormap_ref (GdkColormap *cmap); -void gdk_colormap_unref (GdkColormap *cmap); - -GdkColormap* gdk_colormap_get_system (void); -gint gdk_colormap_get_system_size (void); - -void gdk_colormap_change (GdkColormap *colormap, - 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); - -GdkVisual *gdk_colormap_get_visual (GdkColormap *colormap); - -GdkColor *gdk_color_copy (GdkColor *color); -void gdk_color_free (GdkColor *color); - -gint gdk_color_parse (const gchar *spec, - GdkColor *color); -guint gdk_color_hash (const GdkColor *colora); -gint gdk_color_equal (const GdkColor *colora, - const GdkColor *colorb); +GdkColormap* gdk_colormap_new (GdkVisual *visual, + gint allocate); +GdkColormap* gdk_colormap_ref (GdkColormap *cmap); +void gdk_colormap_unref (GdkColormap *cmap); + +GdkColormap* gdk_colormap_get_system (void); +gint gdk_colormap_get_system_size (void); + +void gdk_colormap_change (GdkColormap *colormap, + 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); + +GdkVisual* gdk_colormap_get_visual (GdkColormap *colormap); + +GdkColor* gdk_color_copy (GdkColor *color); +void gdk_color_free (GdkColor *color); + +gboolean gdk_color_parse (const gchar *spec, + GdkColor *color); +guint gdk_color_hash (const GdkColor *colora); +gint gdk_color_equal (const GdkColor *colora, + const GdkColor *colorb); /* The following functions are deprecated */ -void gdk_colors_store (GdkColormap *colormap, - GdkColor *colors, - gint ncolors); -gint gdk_colors_alloc (GdkColormap *colormap, - gint contiguous, - gulong *planes, - gint nplanes, - gulong *pixels, - gint npixels); -void gdk_colors_free (GdkColormap *colormap, - gulong *pixels, - gint npixels, - gulong planes); -gint gdk_color_white (GdkColormap *colormap, - GdkColor *color); -gint gdk_color_black (GdkColormap *colormap, - GdkColor *color); -gint gdk_color_alloc (GdkColormap *colormap, - GdkColor *color); -gint gdk_color_change (GdkColormap *colormap, - GdkColor *color); +void gdk_colors_store (GdkColormap *colormap, + GdkColor *colors, + gint ncolors); +gboolean gdk_colors_alloc (GdkColormap *colormap, + gint contiguous, + gulong *planes, + gint nplanes, + gulong *pixels, + gint npixels); +void gdk_colors_free (GdkColormap *colormap, + gulong *pixels, + gint npixels, + gulong planes); +gboolean gdk_color_white (GdkColormap *colormap, + GdkColor *color); +gboolean gdk_color_black (GdkColormap *colormap, + GdkColor *color); +gboolean gdk_color_alloc (GdkColormap *colormap, + GdkColor *color); +gboolean gdk_color_change (GdkColormap *colormap, + GdkColor *color); /* Fonts diff --git a/gdk/gdkcc.c b/gdk/gdkcc.c index 573b2efa15..d1d1e754f7 100644 --- a/gdk/gdkcc.c +++ b/gdk/gdkcc.c @@ -491,10 +491,11 @@ init_palette (GdkColorContext *cc) 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); - cc->color_hash = g_hash_table_new (hash_color, compare_colors); + cc->color_hash = 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", 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; } @@ -677,17 +673,9 @@ gdk_color_context_free (GdkColorContext *cc) gdk_colormap_unref (cc->colormap); /* free any palette that has been associated with this GdkColorContext */ - + 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); } @@ -780,13 +768,14 @@ gdk_color_context_get_pixel (GdkColorContext *cc, default: { GdkColor color; - GdkColor *result; + GdkColor *result = NULL; color.red = red; color.green = green; 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) { @@ -831,6 +820,9 @@ gdk_color_context_get_pixel (GdkColorContext *cc, cnew = g_new (GdkColor, 1); *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); 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 */ if (num_palette == 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); + return 0; /* copy incoming palette */ @@ -1549,6 +1528,9 @@ gdk_color_context_add_palette (GdkColorContext *cc, if (cc->color_hash) { + g_hash_table_foreach (cc->color_hash, + free_hash_entry, + NULL); g_hash_table_destroy (cc->color_hash); cc->color_hash = NULL; } diff --git a/gdk/gdkcolor.c b/gdk/gdkcolor.c index bd48087543..2baa200ee0 100644 --- a/gdk/gdkcolor.c +++ b/gdk/gdkcolor.c @@ -70,13 +70,14 @@ gdk_colormap_new (GdkVisual *visual, xvisual = ((GdkVisualPrivate*) visual)->xvisual; colormap->size = visual->colormap_size; - colormap->colors = g_new (GdkColor, colormap->size); + colormap->colors = NULL; switch (visual->type) { case GDK_VISUAL_GRAYSCALE: case GDK_VISUAL_PSEUDO_COLOR: private->info = g_new0 (GdkColorInfo, colormap->size); + colormap->colors = g_new (GdkColor, colormap->size); private->hash = g_hash_table_new ((GHashFunc) gdk_color_hash, (GCompareFunc) gdk_color_equal); @@ -116,6 +117,7 @@ gdk_colormap_new (GdkVisual *visual, private->private_val = TRUE; private->xcolormap = XCreateColormap (private->xdisplay, gdk_root_window, xvisual, AllocAll); + colormap->colors = g_new (GdkColor, colormap->size); size = 1 << visual->red_prec; for (i = 0; i < size; i++) @@ -428,56 +430,7 @@ gdk_colors_alloc (GdkColormap *colormap, } } - 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[in_pixels[i]]); - private->info[pixel].flags = 0; - } - } - } - - if (npixels) - XFreeColors (private->xdisplay, private->xcolormap, - pixels, npixels, planes); - g_free (pixels); + return return_val != 0; } /* @@ -536,7 +489,7 @@ gdk_color_free (GdkColor *color) g_mem_chunk_free (color_chunk, color); } -gint +gboolean gdk_color_white (GdkColormap *colormap, GdkColor *color) { @@ -559,7 +512,7 @@ gdk_color_white (GdkColormap *colormap, return return_val; } -gint +gboolean gdk_color_black (GdkColormap *colormap, GdkColor *color) { @@ -608,6 +561,104 @@ gdk_color_parse (const gchar *spec, 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 * ********************/ @@ -648,6 +699,7 @@ gdk_colormap_alloc1 (GdkColormap *colormap, else { colormap->colors[ret->pixel] = *color; + colormap->colors[ret->pixel].pixel = ret->pixel; private->info[ret->pixel].ref_count = 1; g_hash_table_insert (private->hash, @@ -1025,55 +1077,6 @@ gdk_colormap_alloc_color (GdkColormap *colormap, 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 gdk_color_alloc (GdkColormap *colormap, GdkColor *color) diff --git a/gdk/gdkdnd.c b/gdk/gdkdnd.c index 3b8f05d8fd..a2be5e160c 100644 --- a/gdk/gdkdnd.c +++ b/gdk/gdkdnd.c @@ -31,8 +31,6 @@ #include "gdk/gdkprivate.h" #include "gdk.h" -#define NEW_DRAGS - typedef struct _GdkDragContextPrivate GdkDragContextPrivate; typedef enum { @@ -70,7 +68,8 @@ struct _GdkDragContextPrivate { GdkDragAction old_actions; /* The last actions we sent to the source */ 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_actions_set : 1; /* Whether we've already set XdndActionList */ guint xdnd_have_actions : 1; /* Whether an XdndActionList was provided */ @@ -151,6 +150,7 @@ gdk_drag_context_unref (GdkDragContext *context) GdkDragContextPrivate *private = (GdkDragContextPrivate *)context; g_return_if_fail (context != NULL); + g_return_if_fail (private->ref_count > 0); private->ref_count--; @@ -196,8 +196,8 @@ gdk_drag_context_find (gboolean is_source, private = (GdkDragContextPrivate *)context; context_dest_xid = context->dest_window ? - (private->dest_xid ? - private->dest_xid : + (private->drop_xid ? + private->drop_xid : GDK_WINDOW_XWINDOW (context->dest_window)) : None; @@ -387,7 +387,7 @@ gdk_window_cache_new (void) xwa.x, xwa.y, xwa.width, xwa.height, xwa.map_state != IsUnmapped); - if (gdk_error_code != 0) + if (gdk_error_code) gdk_error_code = 0; else { @@ -441,9 +441,10 @@ get_client_window_at_coords_recurse (Window win, wm_state_atom, 0, 0, False, AnyPropertyType, &type, &format, &nitems, &after, &data); - if (gdk_error_code != 0) + if (gdk_error_code) { gdk_error_code = 0; + return None; } @@ -458,9 +459,10 @@ get_client_window_at_coords_recurse (Window win, XTranslateCoordinates (gdk_display, gdk_root_window, win, x_root, y_root, &dest_x, &dest_y, &child); - if (gdk_error_code != 0) + if (gdk_error_code) { gdk_error_code = 0; + return None; } @@ -469,7 +471,7 @@ get_client_window_at_coords_recurse (Window win, &root, &tmp_parent, &children, &nchildren) == 0) return 0; - if (gdk_error_code == 0) + if (!gdk_error_code) { 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); - if (gdk_error_code != 0) + if (gdk_error_code) gdk_error_code = 0; else if ((xwa.map_state == IsViewable) && (xwa.class == InputOutput) && (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, &type, &format, &nitems, &after, &data); - if (gdk_error_code != 0) + if (gdk_error_code) { gdk_error_code = 0; + return None; } @@ -581,9 +584,10 @@ get_client_window_at_coords_recurse (Window win, XTranslateCoordinates (gdk_display, gdk_root_window, win, x_root, y_root, &dest_x, &dest_y, &child); - if (gdk_error_code != 0) + if (gdk_error_code) { gdk_error_code = 0; + return None; } @@ -620,7 +624,7 @@ get_client_window_at_coords (Window ignore, XGetWindowAttributes (gdk_display, children[i], &xwa); - if (gdk_error_code != 0) + if (gdk_error_code) gdk_error_code = 0; else if ((xwa.map_state == IsViewable) && (x_root >= xwa.x) && (x_root < xwa.x + (gint)xwa.width) && @@ -869,7 +873,7 @@ motif_find_drag_window (gboolean create) Display *display; XSetWindowAttributes attr; - display = XOpenDisplay (NULL); + display = XOpenDisplay (gdk_display_name); XSetCloseDownMode (display, RetainPermanent); XGrabServer (display); @@ -2027,6 +2031,8 @@ xdnd_set_targets (GdkDragContext *context) XA_ATOM, 32, PropModeReplace, (guchar *)atomlist, n_atoms); + g_free (atomlist); + private->xdnd_targets_set = 1; } @@ -2073,6 +2079,8 @@ xdnd_set_actions (GdkDragContext *context) XA_ATOM, 32, PropModeReplace, (guchar *)atomlist, n_atoms); + g_free (atomlist); + private->xdnd_actions_set = 1; private->xdnd_actions = context->actions; } @@ -2106,13 +2114,9 @@ xdnd_send_enter (GdkDragContext *context) xev.xclient.type = ClientMessage; xev.xclient.message_type = gdk_atom_intern ("XdndEnter", FALSE); xev.xclient.format = 32; -#ifdef NEW_DRAGS - xev.xclient.window = private->dest_xid ? - private->dest_xid : + xev.xclient.window = private->drop_xid ? + private->drop_xid : 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[1] = (3 << 24); /* version */ xev.xclient.data.l[2] = 0; @@ -2162,13 +2166,9 @@ xdnd_send_leave (GdkDragContext *context) xev.xclient.type = ClientMessage; xev.xclient.message_type = gdk_atom_intern ("XdndLeave", FALSE); xev.xclient.format = 32; -#ifdef NEW_DRAGS - xev.xclient.window = private->dest_xid ? - private->dest_xid : + xev.xclient.window = private->drop_xid ? + private->drop_xid : 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[1] = 0; xev.xclient.data.l[2] = 0; @@ -2195,13 +2195,9 @@ xdnd_send_drop (GdkDragContext *context, guint32 time) xev.xclient.type = ClientMessage; xev.xclient.message_type = gdk_atom_intern ("XdndDrop", FALSE); xev.xclient.format = 32; -#ifdef NEW_DRAGS - xev.xclient.window = private->dest_xid ? - private->dest_xid : + xev.xclient.window = private->drop_xid ? + private->drop_xid : 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[1] = 0; xev.xclient.data.l[2] = time; @@ -2232,13 +2228,9 @@ xdnd_send_motion (GdkDragContext *context, xev.xclient.type = ClientMessage; xev.xclient.message_type = gdk_atom_intern ("XdndPosition", FALSE); xev.xclient.format = 32; -#ifdef NEW_DRAGS - xev.xclient.window = private->dest_xid ? - private->dest_xid : + xev.xclient.window = private->drop_xid ? + private->drop_xid : 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[1] = 0; 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 */ + /* 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))) { *dest_window = gdk_window_lookup (recipient); @@ -2917,6 +2915,7 @@ gdk_drag_motion (GdkDragContext *context, if (dest_window) { context->dest_window = dest_window; + private->drop_xid = private->dest_xid; gdk_window_ref (context->dest_window); context->protocol = protocol; @@ -2941,6 +2940,7 @@ gdk_drag_motion (GdkDragContext *context, else { context->dest_window = NULL; + private->drop_xid = None; context->action = 0; } diff --git a/gdk/gdkdraw.c b/gdk/gdkdraw.c index cb4f96e78c..8ae417e4aa 100644 --- a/gdk/gdkdraw.c +++ b/gdk/gdkdraw.c @@ -501,12 +501,14 @@ gdk_draw_lines (GdkDrawable *drawable, g_return_if_fail (gc != NULL); drawable_private = (GdkWindowPrivate*) drawable; + if (drawable_private->destroyed) + return; gc_private = (GdkGCPrivate*) gc; XDrawLines (drawable_private->xdisplay, - drawable_private->xwindow, - gc_private->xgc, - (XPoint *) points, - npoints, - CoordModeOrigin); + drawable_private->xwindow, + gc_private->xgc, + (XPoint *) points, + npoints, + CoordModeOrigin); } diff --git a/gdk/gdkevents.c b/gdk/gdkevents.c index 159e0ee9e5..4f6f577f29 100644 --- a/gdk/gdkevents.c +++ b/gdk/gdkevents.c @@ -27,7 +27,6 @@ #include "gdk.h" #include "gdkx.h" #include "gdkprivate.h" -#include "gdkinput.h" #include "gdkkeysyms.h" #if HAVE_CONFIG_H @@ -37,6 +36,7 @@ # endif #endif +#include "gdkinput.h" typedef struct _GdkIOClosure GdkIOClosure; typedef struct _GdkEventPrivate GdkEventPrivate; @@ -88,9 +88,11 @@ static GdkEvent* gdk_event_unqueue (void); static gboolean gdk_event_prepare (gpointer source_data, GTimeVal *current_time, - gint *timeout); + gint *timeout, + gpointer user_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, GTimeVal *current_time, gpointer user_data); @@ -434,6 +436,10 @@ gdk_compress_exposures (XEvent *xevent, rect1.width = xevent->xexpose.width; rect1.height = xevent->xexpose.height; + event.any.type = GDK_EXPOSE; + event.any.window = None; + event.any.send_event = FALSE; + while (1) { if (count == 0) @@ -449,6 +455,8 @@ gdk_compress_exposures (XEvent *xevent, &tmp_event, expose_predicate, (XPointer)&info); + + event.any.window = window; /* We apply filters here, and if it was filtered, completely * ignore the return @@ -849,6 +857,12 @@ gdk_io_destroy (gpointer data) 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 gdk_io_invoke (GIOChannel *source, GIOCondition condition, @@ -857,11 +871,11 @@ gdk_io_invoke (GIOChannel *source, GdkIOClosure *closure = data; GdkInputCondition gdk_cond = 0; - if (condition & (G_IO_IN | G_IO_PRI)) + if (condition & READ_CONDITION) gdk_cond |= GDK_INPUT_READ; - if (condition & G_IO_OUT) + if (condition & WRITE_CONDITION) 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; if (closure->condition & gdk_cond) @@ -888,11 +902,11 @@ gdk_input_add_full (gint source, closure->data = data; if (condition & GDK_INPUT_READ) - cond |= (G_IO_IN | G_IO_PRI); + cond |= READ_CONDITION; if (condition & GDK_INPUT_WRITE) - cond |= G_IO_OUT; + cond |= WRITE_CONDITION; 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); result = g_io_add_watch_full (channel, G_PRIORITY_DEFAULT, cond, @@ -923,7 +937,6 @@ gdk_event_apply_filters (XEvent *xevent, GdkEvent *event, GList *filters) { - GdkEventFilter *filter; GList *tmp_list; GdkFilterReturn result; @@ -931,13 +944,12 @@ gdk_event_apply_filters (XEvent *xevent, while (tmp_list) { - filter = (GdkEventFilter*) tmp_list->data; + GdkEventFilter *filter = (GdkEventFilter*) tmp_list->data; - result = (*filter->function) (xevent, event, filter->data); + tmp_list = tmp_list->next; + result = filter->function (xevent, event, filter->data); if (result != GDK_FILTER_CONTINUE) return result; - - tmp_list = tmp_list->next; } return GDK_FILTER_CONTINUE; @@ -1002,7 +1014,7 @@ gdk_event_translate (GdkEvent *event, gdk_window_ref (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) { @@ -1057,9 +1069,6 @@ gdk_event_translate (GdkEvent *event, } #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 * GdkEvent. The structures are mostly the same so * the conversion is fairly straightforward. We also @@ -1513,10 +1522,11 @@ gdk_event_translate (GdkEvent *event, /* Print debugging info. */ 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.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); event->expose.type = GDK_EXPOSE; @@ -1601,7 +1611,17 @@ gdk_event_translate (GdkEvent *event, break; 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; case DestroyNotify: @@ -1616,7 +1636,7 @@ gdk_event_translate (GdkEvent *event, 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); break; @@ -1651,8 +1671,12 @@ gdk_event_translate (GdkEvent *event, /* Print debugging info. */ GDK_NOTE (EVENTS, - g_message ("reparent notify:\twindow: %ld", - xevent->xreparent.window)); + g_message ("reparent notify:\twindow: %ld x,y: %d %d parent: %ld ovr: %d", + xevent->xreparent.window, + xevent->xreparent.x, + xevent->xreparent.y, + xevent->xreparent.parent, + xevent->xreparent.override_redirect)); /* Not currently handled */ return_val = FALSE; @@ -1661,36 +1685,8 @@ gdk_event_translate (GdkEvent *event, case ConfigureNotify: /* 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, - 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.x, xevent->xconfigure.y, @@ -1698,14 +1694,19 @@ gdk_event_translate (GdkEvent *event, xevent->xconfigure.height, xevent->xconfigure.border_width, xevent->xconfigure.above, - xevent->xconfigure.override_redirect)); - - if (!window_private->destroyed && + xevent->xconfigure.override_redirect, + !window + ? " (discarding)" + : window_private->window_type == GDK_WINDOW_CHILD + ? " (discarding child)" + : "")); + if (window && + !window_private->destroyed && (window_private->extension_events != 0) && gdk_input_vtable.configure_event) 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; else { @@ -1721,17 +1722,23 @@ gdk_event_translate (GdkEvent *event, gint tx = 0; gint ty = 0; Window child_window = 0; - - if (!XTranslateCoordinates (window_private->xdisplay, - window_private->xwindow, - gdk_root_window, - 0, 0, - &tx, &ty, - &child_window)) - g_warning ("GdkWindow %ld doesn't share root windows display?", - window_private->xwindow); - event->configure.x = tx; - event->configure.y = ty; + + gdk_error_trap_push (); + if (XTranslateCoordinates (window_private->xdisplay, + window_private->xwindow, + gdk_root_window, + 0, 0, + &tx, &ty, + &child_window)) + { + if (!gdk_error_trap_pop ()) + { + event->configure.x = tx; + event->configure.y = ty; + } + } + else + gdk_error_trap_pop (); } else { @@ -1751,8 +1758,15 @@ gdk_event_translate (GdkEvent *event, /* Print debugging info. */ GDK_NOTE (EVENTS, - g_message ("property notify:\twindow: %ld", - xevent->xproperty.window)); + gchar *atom = gdk_atom_name (xevent->xproperty.atom); + 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.window = window; @@ -1910,8 +1924,8 @@ gdk_event_translate (GdkEvent *event, GdkFilterReturn gdk_wm_protocols_filter (GdkXEvent *xev, - GdkEvent *event, - gpointer data) + GdkEvent *event, + gpointer data) { XEvent *xevent = (XEvent *)xev; @@ -1993,8 +2007,7 @@ gdk_events_queue (void) event->any.type = GDK_NOTHING; event->any.window = NULL; - event->any.send_event = FALSE; - event->any.send_event = xevent.xany.send_event; + event->any.send_event = xevent.xany.send_event ? TRUE : FALSE; ((GdkEventPrivate *)event)->flags |= GDK_EVENT_PENDING; @@ -2017,7 +2030,8 @@ gdk_events_queue (void) static gboolean gdk_event_prepare (gpointer source_data, GTimeVal *current_time, - gint *timeout) + gint *timeout, + gpointer user_data) { gboolean retval; @@ -2034,7 +2048,8 @@ gdk_event_prepare (gpointer source_data, static gboolean gdk_event_check (gpointer source_data, - GTimeVal *current_time) + GTimeVal *current_time, + gpointer user_data) { gboolean retval; @@ -2133,29 +2148,29 @@ gdk_event_send_client_message_to_all_recurse (XEvent *xev, guint level) { static GdkAtom wm_state_atom = GDK_NONE; - Atom type = None; int format; unsigned long nitems, after; unsigned char *data; - Window *ret_children, ret_root, ret_parent; unsigned int ret_nchildren; - int i; - + gint old_warnings = gdk_error_warnings; gboolean send = FALSE; gboolean found = FALSE; + int i; if (!wm_state_atom) wm_state_atom = gdk_atom_intern ("WM_STATE", FALSE); + gdk_error_warnings = FALSE; gdk_error_code = 0; XGetWindowProperty (gdk_display, xid, wm_state_atom, 0, 0, False, AnyPropertyType, &type, &format, &nitems, &after, &data); if (gdk_error_code) { - gdk_error_code = 0; + gdk_error_warnings = old_warnings; + return FALSE; } @@ -2167,18 +2182,20 @@ gdk_event_send_client_message_to_all_recurse (XEvent *xev, else { /* OK, we're all set, now let's find some windows to send this to */ - if (XQueryTree(gdk_display, xid, &ret_root, &ret_parent, - &ret_children, &ret_nchildren) != True) - return FALSE; - - if (gdk_error_code) - return FALSE; + if (XQueryTree (gdk_display, xid, &ret_root, &ret_parent, + &ret_children, &ret_nchildren) != True || + gdk_error_code) + { + gdk_error_warnings = old_warnings; + + return FALSE; + } 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; - XFree(ret_children); + XFree (ret_children); } 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_error_warnings = old_warnings; + return (send || found); } diff --git a/gdk/gdkfont.c b/gdk/gdkfont.c index d1f779a064..096cf8a537 100644 --- a/gdk/gdkfont.c +++ b/gdk/gdkfont.c @@ -29,6 +29,63 @@ #include "gdk.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* 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); + font = gdk_font_hash_lookup (GDK_FONT_FONT, font_name); + if (font) + return font; + xfont = XLoadQueryFont (gdk_display, font_name); if (xfont == NULL) return NULL; @@ -57,7 +118,8 @@ gdk_font_load (const gchar *font_name) private->xdisplay = gdk_display; private->xfont = xfont; private->ref_count = 1; - + private->names = NULL; + font = (GdkFont*) private; font->type = GDK_FONT_FONT; font->ascent = xfont->ascent; @@ -66,6 +128,8 @@ gdk_font_load (const gchar *font_name) gdk_xid_table_insert (&xfont->fid, font); } + gdk_font_hash_insert (GDK_FONT_FONT, font, font_name); + return font; } @@ -79,6 +143,10 @@ gdk_fontset_load (gchar *fontset_name) gchar **missing_charset_list; gchar *def_string; + font = gdk_font_hash_lookup (GDK_FONT_FONTSET, fontset_name); + if (font) + return font; + private = g_new (GdkFontPrivate, 1); font = (GdkFont*) private; @@ -121,8 +189,12 @@ gdk_fontset_load (gchar *fontset_name) font->ascent = MAX (font->ascent, font_structs[i]->ascent); 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* @@ -141,14 +213,16 @@ void gdk_font_unref (GdkFont *font) { GdkFontPrivate *private; + private = (GdkFontPrivate*) font; g_return_if_fail (font != NULL); - - private = (GdkFontPrivate*) font; + g_return_if_fail (private->ref_count > 0); private->ref_count -= 1; if (private->ref_count == 0) { + gdk_font_hash_remove (font->type, font); + switch (font->type) { 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) { - /* how to compare two fontsets ?? by basename or XFontSet ?? */ - return (((XFontSet) privatea->xfont) == ((XFontSet) privateb->xfont)); + gchar *namea, *nameb; + + namea = XBaseFontNameListOfFontSet((XFontSet) privatea->xfont); + nameb = XBaseFontNameListOfFontSet((XFontSet) privateb->xfont); + + return (strcmp(namea, nameb) == 0); } else /* fontset != font */ @@ -578,7 +656,20 @@ gdk_text_extents_wc (GdkFont *font, } case GDK_FONT_FONTSET: 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) *lbearing = ink.x; if (rbearing) @@ -652,7 +743,7 @@ gdk_text_measure (GdkFont *font, case GDK_FONT_FONTSET: fontset = (XFontSet) private->xfont; XmbTextExtents (fontset, text, text_length, &ink, &log); - width = log.width; + width = ink.x + ink.width; break; default: width = 0; diff --git a/gdk/gdkgc.c b/gdk/gdkgc.c index 470c358675..8b6e4fd0ed 100644 --- a/gdk/gdkgc.c +++ b/gdk/gdkgc.c @@ -286,6 +286,7 @@ gdk_gc_unref (GdkGC *gc) GdkGCPrivate *private = (GdkGCPrivate*) gc; g_return_if_fail (gc != NULL); + g_return_if_fail (private->ref_count > 0); if (private->ref_count > 1) private->ref_count -= 1; diff --git a/gdk/gdkglobals.c b/gdk/gdkglobals.c index 7a9307b2af..ae6c066f96 100644 --- a/gdk/gdkglobals.c +++ b/gdk/gdkglobals.c @@ -57,7 +57,7 @@ GdkDndGlobals gdk_dnd = {None,None,None, {0,0}, {0,0}, {0,0,0,0}, NULL, None, 0}; gchar *gdk_progclass = NULL; -gint gdk_error_code; +gint gdk_error_code = 0; gint gdk_error_warnings = TRUE; gint gdk_null_window_warnings = TRUE; GList *gdk_default_filters = NULL; diff --git a/gdk/gdkim.c b/gdk/gdkim.c index c06afc0577..e453925093 100644 --- a/gdk/gdkim.c +++ b/gdk/gdkim.c @@ -386,7 +386,7 @@ gdk_im_real_open (void) destroy_cb.callback = gdk_im_destroy_cb; 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.")); #endif @@ -469,7 +469,7 @@ gdk_ic_real_new (GdkIC *ic) mask |= GDK_IC_PREEDIT_AREA_REQ; 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.height = attr->preedit_area.height; @@ -484,7 +484,7 @@ gdk_ic_real_new (GdkIC *ic) mask |= GDK_IC_PREEDIT_POSITION_REQ; 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.height = attr->preedit_area.height; @@ -506,7 +506,7 @@ gdk_ic_real_new (GdkIC *ic) mask |= GDK_IC_STATUS_AREA_REQ; 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.height = attr->status_area.height; @@ -518,6 +518,12 @@ gdk_ic_real_new (GdkIC *ic) 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) private->xic = XCreateIC (xim_im, XNInputStyle, @@ -871,7 +877,7 @@ gdk_ic_real_set_attr (GdkIC *ic, arg->name = XNFontSet; 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; } @@ -887,7 +893,7 @@ gdk_ic_real_set_attr (GdkIC *ic, arg->name = XNArea; arg->value = (gpointer) ▭ - if (XSetICValues (xic, XNPreeditAttributes, arg, NULL)) + if (XSetICValues (xic, XNStatusAttributes, arg, NULL)) error |= GDK_IC_STATUS_AREA; } @@ -903,7 +909,7 @@ gdk_ic_real_set_attr (GdkIC *ic, arg->name = XNArea; arg->value = (gpointer) ▭ - if (XSetICValues (xic, XNPreeditAttributes, arg, NULL)) + if (XSetICValues (xic, XNStatusAttributes, arg, NULL)) error |= GDK_IC_STATUS_AREA_NEEDED; else private->mask &= ~GDK_IC_STATUS_AREA_NEEDED; @@ -914,7 +920,7 @@ gdk_ic_real_set_attr (GdkIC *ic, arg->name = XNForeground; arg->value = (gpointer) attr->status_foreground.pixel; - if (XSetICValues (xic, XNPreeditAttributes, arg, NULL)) + if (XSetICValues (xic, XNStatusAttributes, arg, NULL)) error |= GDK_IC_STATUS_FOREGROUND; } @@ -923,7 +929,7 @@ gdk_ic_real_set_attr (GdkIC *ic, arg->name = XNBackground; arg->value = (gpointer) attr->status_background.pixel; - if (XSetICValues (xic, XNPreeditAttributes, arg, NULL)) + if (XSetICValues (xic, XNStatusAttributes, arg, NULL)) error |= GDK_IC_STATUS_BACKGROUND; } @@ -932,7 +938,7 @@ gdk_ic_real_set_attr (GdkIC *ic, arg->name = XNBackgroundPixmap; 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; } @@ -941,7 +947,7 @@ gdk_ic_real_set_attr (GdkIC *ic, arg->name = XNColormap; 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; } @@ -1565,8 +1571,10 @@ gdk_mbstowcs (GdkWChar *dest, const gchar *src, gint dest_max) != Success) { /* InvalidChar */ + XFree(tpr.value); return -1; } + XFree(tpr.value); if (num_wstrs == 0) return 0; wstr_src = wstrs[0]; diff --git a/gdk/gdkimage.c b/gdk/gdkimage.c index d2e66803d1..7dae0d92ee 100644 --- a/gdk/gdkimage.c +++ b/gdk/gdkimage.c @@ -251,14 +251,12 @@ gdk_image_new (GdkImageType type, return NULL; } - gdk_error_code = 0; - gdk_error_warnings = 0; + gdk_error_trap_push (); XShmAttach (private->xdisplay, x_shm_info); XSync (private->xdisplay, False); - gdk_error_warnings = 1; - if (gdk_error_code == -1) + if (gdk_error_trap_pop ()) { /* this is the common failure case so omit warning */ XDestroyImage (private->ximage); @@ -269,6 +267,7 @@ gdk_image_new (GdkImageType type, g_free (image); gdk_use_xshm = False; + return NULL; } @@ -315,22 +314,7 @@ gdk_image_new (GdkImageType type, image->byte_order = private->ximage->byte_order; image->mem = private->ximage->data; image->bpl = private->ximage->bytes_per_line; - - 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; - } + image->bpp = (private->ximage->bits_per_pixel + 7) / 8; } } diff --git a/gdk/gdkpixmap.c b/gdk/gdkpixmap.c index 22e5a07867..6fc47e316e 100644 --- a/gdk/gdkpixmap.c +++ b/gdk/gdkpixmap.c @@ -518,7 +518,7 @@ _gdk_pixmap_create_from_xpm (GdkWindow *window, 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) { color->color = *transparent_color; @@ -817,7 +817,8 @@ void gdk_pixmap_unref (GdkPixmap *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; if (private->ref_count == 0) diff --git a/gdk/gdkprivate.h b/gdk/gdkprivate.h index 4f12915c1e..b549211858 100644 --- a/gdk/gdkprivate.h +++ b/gdk/gdkprivate.h @@ -146,6 +146,8 @@ struct _GdkFontPrivate gpointer xfont; Display *xdisplay; guint ref_count; + + GSList *names; }; struct _GdkCursorPrivate diff --git a/gdk/gdkproperty.c b/gdk/gdkproperty.c index 5663352460..7973d8fc7e 100644 --- a/gdk/gdkproperty.c +++ b/gdk/gdkproperty.c @@ -45,15 +45,16 @@ gdk_atom_intern (const gchar *atom_name, { retval = XInternAtom (gdk_display, atom_name, only_if_exists); - g_hash_table_insert (atom_hash, - g_strdup (atom_name), - GUINT_TO_POINTER (retval)); + if (retval != None) + g_hash_table_insert (atom_hash, + g_strdup (atom_name), + GUINT_TO_POINTER (retval)); } return retval; } -gchar * +gchar* gdk_atom_name (GdkAtom atom) { gchar *t; @@ -69,7 +70,7 @@ gdk_atom_name (GdkAtom atom) t = XGetAtomName (gdk_display, atom); gdk_error_warnings = old_error_warnings; - if (gdk_error_code == -1) + if (gdk_error_code) { if (t) XFree (t); @@ -162,10 +163,10 @@ gdk_property_get (GdkWindow *window, ret_length = ret_nitems; break; case 16: - ret_length = 2 * ret_nitems; + ret_length = sizeof(short) * ret_nitems; break; case 32: - ret_length = 4 * ret_nitems; + ret_length = sizeof(long) * ret_nitems; break; default: g_warning ("unknown property return format: %d", ret_format); diff --git a/gdk/gdkrgb.c b/gdk/gdkrgb.c index 86d6f998d1..e800916f50 100644 --- a/gdk/gdkrgb.c +++ b/gdk/gdkrgb.c @@ -482,27 +482,30 @@ gdk_rgb_score_visual (GdkVisual *visual) static void gdk_rgb_choose_visual (void) { - GList *visuals; + GList *visuals, *tmp_list; guint32 score, best_score; GdkVisual *visual, *best_visual; visuals = gdk_list_visuals (); + tmp_list = visuals; - best_visual = visuals->data; + best_visual = tmp_list->data; best_score = gdk_rgb_score_visual (best_visual); - visuals = visuals->next; - while (visuals) + tmp_list = tmp_list->next; + while (tmp_list) { - visual = visuals->data; + visual = tmp_list->data; score = gdk_rgb_score_visual (visual); if (score > best_score) { best_score = score; best_visual = visual; } - visuals = visuals->next; + tmp_list = tmp_list->next; } + g_list_free (visuals); + image_info->visual = best_visual; } diff --git a/gdk/gdkselection.c b/gdk/gdkselection.c index 64a18d0424..3ee2e43b3d 100644 --- a/gdk/gdkselection.c +++ b/gdk/gdkselection.c @@ -105,11 +105,11 @@ gdk_selection_property_get (GdkWindow *requestor, gulong length; GdkAtom prop_type; gint prop_format; - guchar *t; + guchar *t = NULL; 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 moderate length, to avoid two round trips to the server */ @@ -133,11 +133,11 @@ gdk_selection_property_get (GdkWindow *requestor, *data = NULL; return 0; } - + if (t) { - t = NULL; XFree (t); + t = NULL; } /* 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.time = time; - XSendEvent (gdk_display, requestor, False, NoEventMask, (XEvent*) &xevent); + gdk_send_xevent (requestor, False, NoEventMask, (XEvent*) &xevent); } gint diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c index 93fd0a4a7d..47b200c3e4 100644 --- a/gdk/gdkwindow.c +++ b/gdk/gdkwindow.c @@ -34,17 +34,9 @@ #include "gdkprivate.h" #include "MwmUtil.h" -#if HAVE_CONFIG_H -# include <config.h> -# if STDC_HEADERS -# include <stdlib.h> -# include <stdio.h> -# include <string.h> -# endif -#else -# include <stdlib.h> -# include <stdio.h> -#endif +#include <stdlib.h> +#include <stdio.h> +#include <string.h> #ifdef HAVE_SHAPE_EXT @@ -707,10 +699,10 @@ gdk_window_destroy_notify (GdkWindow *window) if (!private->destroyed) { - if (private->window_type == GDK_WINDOW_FOREIGN) - gdk_window_internal_destroy (window, FALSE, FALSE); - else + if (private->window_type != GDK_WINDOW_FOREIGN) g_warning ("GdkWindow %#lx unexpectedly destroyed", private->xwindow); + + gdk_window_internal_destroy (window, FALSE, FALSE); } gdk_xid_table_remove (private->xwindow); @@ -732,6 +724,7 @@ gdk_window_unref (GdkWindow *window) { GdkWindowPrivate *private = (GdkWindowPrivate *)window; g_return_if_fail (window != NULL); + g_return_if_fail (private->ref_count > 0); private->ref_count -= 1; if (private->ref_count == 0) @@ -1089,8 +1082,10 @@ gdk_window_set_hints (GdkWindow *window, size_hints.max_height = max_height; } - if (flags) - XSetWMNormalHints (private->xdisplay, private->xwindow, &size_hints); + /* FIXME: Would it be better to delete this property of + * flags == 0? It would save space on the server + */ + XSetWMNormalHints (private->xdisplay, private->xwindow, &size_hints); } void @@ -1110,7 +1105,15 @@ gdk_window_set_geometry_hints (GdkWindow *window, size_hints.flags = 0; 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) { @@ -1145,28 +1148,30 @@ gdk_window_set_geometry_hints (GdkWindow *window, size_hints.flags |= PAspect; if (geometry->min_aspect <= 1) { - size_hints.min_aspect.x = G_MAXINT * geometry->min_aspect; - size_hints.min_aspect.y = G_MAXINT; + size_hints.min_aspect.x = 65536 * geometry->min_aspect; + size_hints.min_aspect.y = 65536; } else { - size_hints.min_aspect.x = G_MAXINT; - size_hints.min_aspect.y = G_MAXINT / geometry->min_aspect;; + size_hints.min_aspect.x = 65536; + size_hints.min_aspect.y = 65536 / geometry->min_aspect;; } if (geometry->max_aspect <= 1) { - size_hints.max_aspect.x = G_MAXINT * geometry->max_aspect; - size_hints.max_aspect.y = G_MAXINT; + size_hints.max_aspect.x = 65536 * geometry->max_aspect; + size_hints.max_aspect.y = 65536; } else { - size_hints.max_aspect.x = G_MAXINT; - size_hints.max_aspect.y = G_MAXINT / geometry->max_aspect;; + size_hints.max_aspect.x = 65536; + size_hints.max_aspect.y = 65536 / geometry->max_aspect;; } } - - if (geom_mask) - XSetWMNormalHints (private->xdisplay, private->xwindow, &size_hints); + + /* FIXME: Would it be better to delete this property of + * geom_mask == 0? It would save space on the server + */ + XSetWMNormalHints (private->xdisplay, private->xwindow, &size_hints); } void diff --git a/gdk/x11/gdkcc-x11.c b/gdk/x11/gdkcc-x11.c index 573b2efa15..d1d1e754f7 100644 --- a/gdk/x11/gdkcc-x11.c +++ b/gdk/x11/gdkcc-x11.c @@ -491,10 +491,11 @@ init_palette (GdkColorContext *cc) 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); - cc->color_hash = g_hash_table_new (hash_color, compare_colors); + cc->color_hash = 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", 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; } @@ -677,17 +673,9 @@ gdk_color_context_free (GdkColorContext *cc) gdk_colormap_unref (cc->colormap); /* free any palette that has been associated with this GdkColorContext */ - + 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); } @@ -780,13 +768,14 @@ gdk_color_context_get_pixel (GdkColorContext *cc, default: { GdkColor color; - GdkColor *result; + GdkColor *result = NULL; color.red = red; color.green = green; 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) { @@ -831,6 +820,9 @@ gdk_color_context_get_pixel (GdkColorContext *cc, cnew = g_new (GdkColor, 1); *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); 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 */ if (num_palette == 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); + return 0; /* copy incoming palette */ @@ -1549,6 +1528,9 @@ gdk_color_context_add_palette (GdkColorContext *cc, if (cc->color_hash) { + g_hash_table_foreach (cc->color_hash, + free_hash_entry, + NULL); g_hash_table_destroy (cc->color_hash); cc->color_hash = NULL; } diff --git a/gdk/x11/gdkcolor-x11.c b/gdk/x11/gdkcolor-x11.c index bd48087543..2baa200ee0 100644 --- a/gdk/x11/gdkcolor-x11.c +++ b/gdk/x11/gdkcolor-x11.c @@ -70,13 +70,14 @@ gdk_colormap_new (GdkVisual *visual, xvisual = ((GdkVisualPrivate*) visual)->xvisual; colormap->size = visual->colormap_size; - colormap->colors = g_new (GdkColor, colormap->size); + colormap->colors = NULL; switch (visual->type) { case GDK_VISUAL_GRAYSCALE: case GDK_VISUAL_PSEUDO_COLOR: private->info = g_new0 (GdkColorInfo, colormap->size); + colormap->colors = g_new (GdkColor, colormap->size); private->hash = g_hash_table_new ((GHashFunc) gdk_color_hash, (GCompareFunc) gdk_color_equal); @@ -116,6 +117,7 @@ gdk_colormap_new (GdkVisual *visual, private->private_val = TRUE; private->xcolormap = XCreateColormap (private->xdisplay, gdk_root_window, xvisual, AllocAll); + colormap->colors = g_new (GdkColor, colormap->size); size = 1 << visual->red_prec; for (i = 0; i < size; i++) @@ -428,56 +430,7 @@ gdk_colors_alloc (GdkColormap *colormap, } } - 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[in_pixels[i]]); - private->info[pixel].flags = 0; - } - } - } - - if (npixels) - XFreeColors (private->xdisplay, private->xcolormap, - pixels, npixels, planes); - g_free (pixels); + return return_val != 0; } /* @@ -536,7 +489,7 @@ gdk_color_free (GdkColor *color) g_mem_chunk_free (color_chunk, color); } -gint +gboolean gdk_color_white (GdkColormap *colormap, GdkColor *color) { @@ -559,7 +512,7 @@ gdk_color_white (GdkColormap *colormap, return return_val; } -gint +gboolean gdk_color_black (GdkColormap *colormap, GdkColor *color) { @@ -608,6 +561,104 @@ gdk_color_parse (const gchar *spec, 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 * ********************/ @@ -648,6 +699,7 @@ gdk_colormap_alloc1 (GdkColormap *colormap, else { colormap->colors[ret->pixel] = *color; + colormap->colors[ret->pixel].pixel = ret->pixel; private->info[ret->pixel].ref_count = 1; g_hash_table_insert (private->hash, @@ -1025,55 +1077,6 @@ gdk_colormap_alloc_color (GdkColormap *colormap, 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 gdk_color_alloc (GdkColormap *colormap, GdkColor *color) diff --git a/gdk/x11/gdkdnd-x11.c b/gdk/x11/gdkdnd-x11.c index 3b8f05d8fd..a2be5e160c 100644 --- a/gdk/x11/gdkdnd-x11.c +++ b/gdk/x11/gdkdnd-x11.c @@ -31,8 +31,6 @@ #include "gdk/gdkprivate.h" #include "gdk.h" -#define NEW_DRAGS - typedef struct _GdkDragContextPrivate GdkDragContextPrivate; typedef enum { @@ -70,7 +68,8 @@ struct _GdkDragContextPrivate { GdkDragAction old_actions; /* The last actions we sent to the source */ 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_actions_set : 1; /* Whether we've already set XdndActionList */ guint xdnd_have_actions : 1; /* Whether an XdndActionList was provided */ @@ -151,6 +150,7 @@ gdk_drag_context_unref (GdkDragContext *context) GdkDragContextPrivate *private = (GdkDragContextPrivate *)context; g_return_if_fail (context != NULL); + g_return_if_fail (private->ref_count > 0); private->ref_count--; @@ -196,8 +196,8 @@ gdk_drag_context_find (gboolean is_source, private = (GdkDragContextPrivate *)context; context_dest_xid = context->dest_window ? - (private->dest_xid ? - private->dest_xid : + (private->drop_xid ? + private->drop_xid : GDK_WINDOW_XWINDOW (context->dest_window)) : None; @@ -387,7 +387,7 @@ gdk_window_cache_new (void) xwa.x, xwa.y, xwa.width, xwa.height, xwa.map_state != IsUnmapped); - if (gdk_error_code != 0) + if (gdk_error_code) gdk_error_code = 0; else { @@ -441,9 +441,10 @@ get_client_window_at_coords_recurse (Window win, wm_state_atom, 0, 0, False, AnyPropertyType, &type, &format, &nitems, &after, &data); - if (gdk_error_code != 0) + if (gdk_error_code) { gdk_error_code = 0; + return None; } @@ -458,9 +459,10 @@ get_client_window_at_coords_recurse (Window win, XTranslateCoordinates (gdk_display, gdk_root_window, win, x_root, y_root, &dest_x, &dest_y, &child); - if (gdk_error_code != 0) + if (gdk_error_code) { gdk_error_code = 0; + return None; } @@ -469,7 +471,7 @@ get_client_window_at_coords_recurse (Window win, &root, &tmp_parent, &children, &nchildren) == 0) return 0; - if (gdk_error_code == 0) + if (!gdk_error_code) { 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); - if (gdk_error_code != 0) + if (gdk_error_code) gdk_error_code = 0; else if ((xwa.map_state == IsViewable) && (xwa.class == InputOutput) && (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, &type, &format, &nitems, &after, &data); - if (gdk_error_code != 0) + if (gdk_error_code) { gdk_error_code = 0; + return None; } @@ -581,9 +584,10 @@ get_client_window_at_coords_recurse (Window win, XTranslateCoordinates (gdk_display, gdk_root_window, win, x_root, y_root, &dest_x, &dest_y, &child); - if (gdk_error_code != 0) + if (gdk_error_code) { gdk_error_code = 0; + return None; } @@ -620,7 +624,7 @@ get_client_window_at_coords (Window ignore, XGetWindowAttributes (gdk_display, children[i], &xwa); - if (gdk_error_code != 0) + if (gdk_error_code) gdk_error_code = 0; else if ((xwa.map_state == IsViewable) && (x_root >= xwa.x) && (x_root < xwa.x + (gint)xwa.width) && @@ -869,7 +873,7 @@ motif_find_drag_window (gboolean create) Display *display; XSetWindowAttributes attr; - display = XOpenDisplay (NULL); + display = XOpenDisplay (gdk_display_name); XSetCloseDownMode (display, RetainPermanent); XGrabServer (display); @@ -2027,6 +2031,8 @@ xdnd_set_targets (GdkDragContext *context) XA_ATOM, 32, PropModeReplace, (guchar *)atomlist, n_atoms); + g_free (atomlist); + private->xdnd_targets_set = 1; } @@ -2073,6 +2079,8 @@ xdnd_set_actions (GdkDragContext *context) XA_ATOM, 32, PropModeReplace, (guchar *)atomlist, n_atoms); + g_free (atomlist); + private->xdnd_actions_set = 1; private->xdnd_actions = context->actions; } @@ -2106,13 +2114,9 @@ xdnd_send_enter (GdkDragContext *context) xev.xclient.type = ClientMessage; xev.xclient.message_type = gdk_atom_intern ("XdndEnter", FALSE); xev.xclient.format = 32; -#ifdef NEW_DRAGS - xev.xclient.window = private->dest_xid ? - private->dest_xid : + xev.xclient.window = private->drop_xid ? + private->drop_xid : 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[1] = (3 << 24); /* version */ xev.xclient.data.l[2] = 0; @@ -2162,13 +2166,9 @@ xdnd_send_leave (GdkDragContext *context) xev.xclient.type = ClientMessage; xev.xclient.message_type = gdk_atom_intern ("XdndLeave", FALSE); xev.xclient.format = 32; -#ifdef NEW_DRAGS - xev.xclient.window = private->dest_xid ? - private->dest_xid : + xev.xclient.window = private->drop_xid ? + private->drop_xid : 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[1] = 0; xev.xclient.data.l[2] = 0; @@ -2195,13 +2195,9 @@ xdnd_send_drop (GdkDragContext *context, guint32 time) xev.xclient.type = ClientMessage; xev.xclient.message_type = gdk_atom_intern ("XdndDrop", FALSE); xev.xclient.format = 32; -#ifdef NEW_DRAGS - xev.xclient.window = private->dest_xid ? - private->dest_xid : + xev.xclient.window = private->drop_xid ? + private->drop_xid : 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[1] = 0; xev.xclient.data.l[2] = time; @@ -2232,13 +2228,9 @@ xdnd_send_motion (GdkDragContext *context, xev.xclient.type = ClientMessage; xev.xclient.message_type = gdk_atom_intern ("XdndPosition", FALSE); xev.xclient.format = 32; -#ifdef NEW_DRAGS - xev.xclient.window = private->dest_xid ? - private->dest_xid : + xev.xclient.window = private->drop_xid ? + private->drop_xid : 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[1] = 0; 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 */ + /* 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))) { *dest_window = gdk_window_lookup (recipient); @@ -2917,6 +2915,7 @@ gdk_drag_motion (GdkDragContext *context, if (dest_window) { context->dest_window = dest_window; + private->drop_xid = private->dest_xid; gdk_window_ref (context->dest_window); context->protocol = protocol; @@ -2941,6 +2940,7 @@ gdk_drag_motion (GdkDragContext *context, else { context->dest_window = NULL; + private->drop_xid = None; context->action = 0; } diff --git a/gdk/x11/gdkevents-x11.c b/gdk/x11/gdkevents-x11.c index 159e0ee9e5..4f6f577f29 100644 --- a/gdk/x11/gdkevents-x11.c +++ b/gdk/x11/gdkevents-x11.c @@ -27,7 +27,6 @@ #include "gdk.h" #include "gdkx.h" #include "gdkprivate.h" -#include "gdkinput.h" #include "gdkkeysyms.h" #if HAVE_CONFIG_H @@ -37,6 +36,7 @@ # endif #endif +#include "gdkinput.h" typedef struct _GdkIOClosure GdkIOClosure; typedef struct _GdkEventPrivate GdkEventPrivate; @@ -88,9 +88,11 @@ static GdkEvent* gdk_event_unqueue (void); static gboolean gdk_event_prepare (gpointer source_data, GTimeVal *current_time, - gint *timeout); + gint *timeout, + gpointer user_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, GTimeVal *current_time, gpointer user_data); @@ -434,6 +436,10 @@ gdk_compress_exposures (XEvent *xevent, rect1.width = xevent->xexpose.width; rect1.height = xevent->xexpose.height; + event.any.type = GDK_EXPOSE; + event.any.window = None; + event.any.send_event = FALSE; + while (1) { if (count == 0) @@ -449,6 +455,8 @@ gdk_compress_exposures (XEvent *xevent, &tmp_event, expose_predicate, (XPointer)&info); + + event.any.window = window; /* We apply filters here, and if it was filtered, completely * ignore the return @@ -849,6 +857,12 @@ gdk_io_destroy (gpointer data) 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 gdk_io_invoke (GIOChannel *source, GIOCondition condition, @@ -857,11 +871,11 @@ gdk_io_invoke (GIOChannel *source, GdkIOClosure *closure = data; GdkInputCondition gdk_cond = 0; - if (condition & (G_IO_IN | G_IO_PRI)) + if (condition & READ_CONDITION) gdk_cond |= GDK_INPUT_READ; - if (condition & G_IO_OUT) + if (condition & WRITE_CONDITION) 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; if (closure->condition & gdk_cond) @@ -888,11 +902,11 @@ gdk_input_add_full (gint source, closure->data = data; if (condition & GDK_INPUT_READ) - cond |= (G_IO_IN | G_IO_PRI); + cond |= READ_CONDITION; if (condition & GDK_INPUT_WRITE) - cond |= G_IO_OUT; + cond |= WRITE_CONDITION; 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); result = g_io_add_watch_full (channel, G_PRIORITY_DEFAULT, cond, @@ -923,7 +937,6 @@ gdk_event_apply_filters (XEvent *xevent, GdkEvent *event, GList *filters) { - GdkEventFilter *filter; GList *tmp_list; GdkFilterReturn result; @@ -931,13 +944,12 @@ gdk_event_apply_filters (XEvent *xevent, while (tmp_list) { - filter = (GdkEventFilter*) tmp_list->data; + GdkEventFilter *filter = (GdkEventFilter*) tmp_list->data; - result = (*filter->function) (xevent, event, filter->data); + tmp_list = tmp_list->next; + result = filter->function (xevent, event, filter->data); if (result != GDK_FILTER_CONTINUE) return result; - - tmp_list = tmp_list->next; } return GDK_FILTER_CONTINUE; @@ -1002,7 +1014,7 @@ gdk_event_translate (GdkEvent *event, gdk_window_ref (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) { @@ -1057,9 +1069,6 @@ gdk_event_translate (GdkEvent *event, } #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 * GdkEvent. The structures are mostly the same so * the conversion is fairly straightforward. We also @@ -1513,10 +1522,11 @@ gdk_event_translate (GdkEvent *event, /* Print debugging info. */ 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.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); event->expose.type = GDK_EXPOSE; @@ -1601,7 +1611,17 @@ gdk_event_translate (GdkEvent *event, break; 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; case DestroyNotify: @@ -1616,7 +1636,7 @@ gdk_event_translate (GdkEvent *event, 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); break; @@ -1651,8 +1671,12 @@ gdk_event_translate (GdkEvent *event, /* Print debugging info. */ GDK_NOTE (EVENTS, - g_message ("reparent notify:\twindow: %ld", - xevent->xreparent.window)); + g_message ("reparent notify:\twindow: %ld x,y: %d %d parent: %ld ovr: %d", + xevent->xreparent.window, + xevent->xreparent.x, + xevent->xreparent.y, + xevent->xreparent.parent, + xevent->xreparent.override_redirect)); /* Not currently handled */ return_val = FALSE; @@ -1661,36 +1685,8 @@ gdk_event_translate (GdkEvent *event, case ConfigureNotify: /* 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, - 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.x, xevent->xconfigure.y, @@ -1698,14 +1694,19 @@ gdk_event_translate (GdkEvent *event, xevent->xconfigure.height, xevent->xconfigure.border_width, xevent->xconfigure.above, - xevent->xconfigure.override_redirect)); - - if (!window_private->destroyed && + xevent->xconfigure.override_redirect, + !window + ? " (discarding)" + : window_private->window_type == GDK_WINDOW_CHILD + ? " (discarding child)" + : "")); + if (window && + !window_private->destroyed && (window_private->extension_events != 0) && gdk_input_vtable.configure_event) 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; else { @@ -1721,17 +1722,23 @@ gdk_event_translate (GdkEvent *event, gint tx = 0; gint ty = 0; Window child_window = 0; - - if (!XTranslateCoordinates (window_private->xdisplay, - window_private->xwindow, - gdk_root_window, - 0, 0, - &tx, &ty, - &child_window)) - g_warning ("GdkWindow %ld doesn't share root windows display?", - window_private->xwindow); - event->configure.x = tx; - event->configure.y = ty; + + gdk_error_trap_push (); + if (XTranslateCoordinates (window_private->xdisplay, + window_private->xwindow, + gdk_root_window, + 0, 0, + &tx, &ty, + &child_window)) + { + if (!gdk_error_trap_pop ()) + { + event->configure.x = tx; + event->configure.y = ty; + } + } + else + gdk_error_trap_pop (); } else { @@ -1751,8 +1758,15 @@ gdk_event_translate (GdkEvent *event, /* Print debugging info. */ GDK_NOTE (EVENTS, - g_message ("property notify:\twindow: %ld", - xevent->xproperty.window)); + gchar *atom = gdk_atom_name (xevent->xproperty.atom); + 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.window = window; @@ -1910,8 +1924,8 @@ gdk_event_translate (GdkEvent *event, GdkFilterReturn gdk_wm_protocols_filter (GdkXEvent *xev, - GdkEvent *event, - gpointer data) + GdkEvent *event, + gpointer data) { XEvent *xevent = (XEvent *)xev; @@ -1993,8 +2007,7 @@ gdk_events_queue (void) event->any.type = GDK_NOTHING; event->any.window = NULL; - event->any.send_event = FALSE; - event->any.send_event = xevent.xany.send_event; + event->any.send_event = xevent.xany.send_event ? TRUE : FALSE; ((GdkEventPrivate *)event)->flags |= GDK_EVENT_PENDING; @@ -2017,7 +2030,8 @@ gdk_events_queue (void) static gboolean gdk_event_prepare (gpointer source_data, GTimeVal *current_time, - gint *timeout) + gint *timeout, + gpointer user_data) { gboolean retval; @@ -2034,7 +2048,8 @@ gdk_event_prepare (gpointer source_data, static gboolean gdk_event_check (gpointer source_data, - GTimeVal *current_time) + GTimeVal *current_time, + gpointer user_data) { gboolean retval; @@ -2133,29 +2148,29 @@ gdk_event_send_client_message_to_all_recurse (XEvent *xev, guint level) { static GdkAtom wm_state_atom = GDK_NONE; - Atom type = None; int format; unsigned long nitems, after; unsigned char *data; - Window *ret_children, ret_root, ret_parent; unsigned int ret_nchildren; - int i; - + gint old_warnings = gdk_error_warnings; gboolean send = FALSE; gboolean found = FALSE; + int i; if (!wm_state_atom) wm_state_atom = gdk_atom_intern ("WM_STATE", FALSE); + gdk_error_warnings = FALSE; gdk_error_code = 0; XGetWindowProperty (gdk_display, xid, wm_state_atom, 0, 0, False, AnyPropertyType, &type, &format, &nitems, &after, &data); if (gdk_error_code) { - gdk_error_code = 0; + gdk_error_warnings = old_warnings; + return FALSE; } @@ -2167,18 +2182,20 @@ gdk_event_send_client_message_to_all_recurse (XEvent *xev, else { /* OK, we're all set, now let's find some windows to send this to */ - if (XQueryTree(gdk_display, xid, &ret_root, &ret_parent, - &ret_children, &ret_nchildren) != True) - return FALSE; - - if (gdk_error_code) - return FALSE; + if (XQueryTree (gdk_display, xid, &ret_root, &ret_parent, + &ret_children, &ret_nchildren) != True || + gdk_error_code) + { + gdk_error_warnings = old_warnings; + + return FALSE; + } 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; - XFree(ret_children); + XFree (ret_children); } 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_error_warnings = old_warnings; + return (send || found); } diff --git a/gdk/x11/gdkfont-x11.c b/gdk/x11/gdkfont-x11.c index d1f779a064..096cf8a537 100644 --- a/gdk/x11/gdkfont-x11.c +++ b/gdk/x11/gdkfont-x11.c @@ -29,6 +29,63 @@ #include "gdk.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* 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); + font = gdk_font_hash_lookup (GDK_FONT_FONT, font_name); + if (font) + return font; + xfont = XLoadQueryFont (gdk_display, font_name); if (xfont == NULL) return NULL; @@ -57,7 +118,8 @@ gdk_font_load (const gchar *font_name) private->xdisplay = gdk_display; private->xfont = xfont; private->ref_count = 1; - + private->names = NULL; + font = (GdkFont*) private; font->type = GDK_FONT_FONT; font->ascent = xfont->ascent; @@ -66,6 +128,8 @@ gdk_font_load (const gchar *font_name) gdk_xid_table_insert (&xfont->fid, font); } + gdk_font_hash_insert (GDK_FONT_FONT, font, font_name); + return font; } @@ -79,6 +143,10 @@ gdk_fontset_load (gchar *fontset_name) gchar **missing_charset_list; gchar *def_string; + font = gdk_font_hash_lookup (GDK_FONT_FONTSET, fontset_name); + if (font) + return font; + private = g_new (GdkFontPrivate, 1); font = (GdkFont*) private; @@ -121,8 +189,12 @@ gdk_fontset_load (gchar *fontset_name) font->ascent = MAX (font->ascent, font_structs[i]->ascent); 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* @@ -141,14 +213,16 @@ void gdk_font_unref (GdkFont *font) { GdkFontPrivate *private; + private = (GdkFontPrivate*) font; g_return_if_fail (font != NULL); - - private = (GdkFontPrivate*) font; + g_return_if_fail (private->ref_count > 0); private->ref_count -= 1; if (private->ref_count == 0) { + gdk_font_hash_remove (font->type, font); + switch (font->type) { 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) { - /* how to compare two fontsets ?? by basename or XFontSet ?? */ - return (((XFontSet) privatea->xfont) == ((XFontSet) privateb->xfont)); + gchar *namea, *nameb; + + namea = XBaseFontNameListOfFontSet((XFontSet) privatea->xfont); + nameb = XBaseFontNameListOfFontSet((XFontSet) privateb->xfont); + + return (strcmp(namea, nameb) == 0); } else /* fontset != font */ @@ -578,7 +656,20 @@ gdk_text_extents_wc (GdkFont *font, } case GDK_FONT_FONTSET: 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) *lbearing = ink.x; if (rbearing) @@ -652,7 +743,7 @@ gdk_text_measure (GdkFont *font, case GDK_FONT_FONTSET: fontset = (XFontSet) private->xfont; XmbTextExtents (fontset, text, text_length, &ink, &log); - width = log.width; + width = ink.x + ink.width; break; default: width = 0; diff --git a/gdk/x11/gdkglobals-x11.c b/gdk/x11/gdkglobals-x11.c index 7a9307b2af..ae6c066f96 100644 --- a/gdk/x11/gdkglobals-x11.c +++ b/gdk/x11/gdkglobals-x11.c @@ -57,7 +57,7 @@ GdkDndGlobals gdk_dnd = {None,None,None, {0,0}, {0,0}, {0,0,0,0}, NULL, None, 0}; gchar *gdk_progclass = NULL; -gint gdk_error_code; +gint gdk_error_code = 0; gint gdk_error_warnings = TRUE; gint gdk_null_window_warnings = TRUE; GList *gdk_default_filters = NULL; diff --git a/gdk/x11/gdkim-x11.c b/gdk/x11/gdkim-x11.c index c06afc0577..e453925093 100644 --- a/gdk/x11/gdkim-x11.c +++ b/gdk/x11/gdkim-x11.c @@ -386,7 +386,7 @@ gdk_im_real_open (void) destroy_cb.callback = gdk_im_destroy_cb; 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.")); #endif @@ -469,7 +469,7 @@ gdk_ic_real_new (GdkIC *ic) mask |= GDK_IC_PREEDIT_AREA_REQ; 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.height = attr->preedit_area.height; @@ -484,7 +484,7 @@ gdk_ic_real_new (GdkIC *ic) mask |= GDK_IC_PREEDIT_POSITION_REQ; 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.height = attr->preedit_area.height; @@ -506,7 +506,7 @@ gdk_ic_real_new (GdkIC *ic) mask |= GDK_IC_STATUS_AREA_REQ; 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.height = attr->status_area.height; @@ -518,6 +518,12 @@ gdk_ic_real_new (GdkIC *ic) 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) private->xic = XCreateIC (xim_im, XNInputStyle, @@ -871,7 +877,7 @@ gdk_ic_real_set_attr (GdkIC *ic, arg->name = XNFontSet; 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; } @@ -887,7 +893,7 @@ gdk_ic_real_set_attr (GdkIC *ic, arg->name = XNArea; arg->value = (gpointer) ▭ - if (XSetICValues (xic, XNPreeditAttributes, arg, NULL)) + if (XSetICValues (xic, XNStatusAttributes, arg, NULL)) error |= GDK_IC_STATUS_AREA; } @@ -903,7 +909,7 @@ gdk_ic_real_set_attr (GdkIC *ic, arg->name = XNArea; arg->value = (gpointer) ▭ - if (XSetICValues (xic, XNPreeditAttributes, arg, NULL)) + if (XSetICValues (xic, XNStatusAttributes, arg, NULL)) error |= GDK_IC_STATUS_AREA_NEEDED; else private->mask &= ~GDK_IC_STATUS_AREA_NEEDED; @@ -914,7 +920,7 @@ gdk_ic_real_set_attr (GdkIC *ic, arg->name = XNForeground; arg->value = (gpointer) attr->status_foreground.pixel; - if (XSetICValues (xic, XNPreeditAttributes, arg, NULL)) + if (XSetICValues (xic, XNStatusAttributes, arg, NULL)) error |= GDK_IC_STATUS_FOREGROUND; } @@ -923,7 +929,7 @@ gdk_ic_real_set_attr (GdkIC *ic, arg->name = XNBackground; arg->value = (gpointer) attr->status_background.pixel; - if (XSetICValues (xic, XNPreeditAttributes, arg, NULL)) + if (XSetICValues (xic, XNStatusAttributes, arg, NULL)) error |= GDK_IC_STATUS_BACKGROUND; } @@ -932,7 +938,7 @@ gdk_ic_real_set_attr (GdkIC *ic, arg->name = XNBackgroundPixmap; 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; } @@ -941,7 +947,7 @@ gdk_ic_real_set_attr (GdkIC *ic, arg->name = XNColormap; 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; } @@ -1565,8 +1571,10 @@ gdk_mbstowcs (GdkWChar *dest, const gchar *src, gint dest_max) != Success) { /* InvalidChar */ + XFree(tpr.value); return -1; } + XFree(tpr.value); if (num_wstrs == 0) return 0; wstr_src = wstrs[0]; diff --git a/gdk/x11/gdkimage-x11.c b/gdk/x11/gdkimage-x11.c index d2e66803d1..7dae0d92ee 100644 --- a/gdk/x11/gdkimage-x11.c +++ b/gdk/x11/gdkimage-x11.c @@ -251,14 +251,12 @@ gdk_image_new (GdkImageType type, return NULL; } - gdk_error_code = 0; - gdk_error_warnings = 0; + gdk_error_trap_push (); XShmAttach (private->xdisplay, x_shm_info); XSync (private->xdisplay, False); - gdk_error_warnings = 1; - if (gdk_error_code == -1) + if (gdk_error_trap_pop ()) { /* this is the common failure case so omit warning */ XDestroyImage (private->ximage); @@ -269,6 +267,7 @@ gdk_image_new (GdkImageType type, g_free (image); gdk_use_xshm = False; + return NULL; } @@ -315,22 +314,7 @@ gdk_image_new (GdkImageType type, image->byte_order = private->ximage->byte_order; image->mem = private->ximage->data; image->bpl = private->ximage->bytes_per_line; - - 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; - } + image->bpp = (private->ximage->bits_per_pixel + 7) / 8; } } diff --git a/gdk/x11/gdkmain-x11.c b/gdk/x11/gdkmain-x11.c index e907f04adb..de1d55ea8c 100644 --- a/gdk/x11/gdkmain-x11.c +++ b/gdk/x11/gdkmain-x11.c @@ -31,6 +31,7 @@ #include <stdlib.h> #include <string.h> #include <limits.h> +#include <errno.h> #ifdef HAVE_SYS_SELECT_H #include <sys/select.h> @@ -48,6 +49,7 @@ #include "gdkinput.h" #include "gdkx.h" #include "gdki18n.h" +#include "gdkkeysyms.h" #ifndef X_GETTIMEOFDAY #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); else if (strcmp ("callbacks", (*argv)[i]) == 0) gdk_im_set_best_style (GDK_IM_PREEDIT_CALLBACKS); + (*argv)[i] = NULL; } } 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); else if (strcmp ("callbacks", (*argv)[i]) == 0) gdk_im_set_best_style (GDK_IM_STATUS_CALLBACKS); + (*argv)[i] = NULL; } } #endif @@ -406,9 +410,9 @@ gdk_init_check (int *argc, g_free(argv_orig[i]); g_free(argv_orig); - gdk_wm_delete_window = XInternAtom (gdk_display, "WM_DELETE_WINDOW", True); - gdk_wm_take_focus = XInternAtom (gdk_display, "WM_TAKE_FOCUS", True); - gdk_wm_protocols = XInternAtom (gdk_display, "WM_PROTOCOLS", True); + gdk_wm_delete_window = XInternAtom (gdk_display, "WM_DELETE_WINDOW", False); + gdk_wm_take_focus = XInternAtom (gdk_display, "WM_TAKE_FOCUS", False); + gdk_wm_protocols = XInternAtom (gdk_display, "WM_PROTOCOLS", False); gdk_wm_window_protocols[0] = gdk_wm_delete_window; gdk_wm_window_protocols[1] = gdk_wm_take_focus; gdk_selection_property = XInternAtom (gdk_display, "GDK_SELECTION", False); @@ -1032,20 +1036,35 @@ static int gdk_x_error (Display *display, XErrorEvent *error) { - char buf[64]; - - if (gdk_error_warnings) + if (error->error_code) { - XGetErrorText (display, error->error_code, buf, 63); - 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); + if (gdk_error_warnings) + { + char buf[64]; + + XGetErrorText (display, error->error_code, buf, 63); + +#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; } @@ -1071,8 +1090,27 @@ gdk_x_error (Display *display, static int gdk_x_io_error (Display *display) { - g_error ("an x io error occurred"); - return 0; + /* This is basically modelled after the code in XLib. We need + * 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 * @@ -1104,7 +1142,7 @@ gdk_error_trap_push (void) } else { - node = g_slist_alloc(); + node = g_slist_alloc (); node->data = g_new (GdkErrorTrap, 1); } @@ -1166,7 +1204,7 @@ gdk_send_xevent (Window window, gboolean propagate, glong event_mask, XSync (gdk_display, False); gdk_error_warnings = old_warnings; - return result && (gdk_error_code != -1); + return result && !gdk_error_code; } #ifndef HAVE_XCONVERTCASE diff --git a/gdk/x11/gdkpixmap-x11.c b/gdk/x11/gdkpixmap-x11.c index 22e5a07867..6fc47e316e 100644 --- a/gdk/x11/gdkpixmap-x11.c +++ b/gdk/x11/gdkpixmap-x11.c @@ -518,7 +518,7 @@ _gdk_pixmap_create_from_xpm (GdkWindow *window, 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) { color->color = *transparent_color; @@ -817,7 +817,8 @@ void gdk_pixmap_unref (GdkPixmap *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; if (private->ref_count == 0) diff --git a/gdk/x11/gdkproperty-x11.c b/gdk/x11/gdkproperty-x11.c index 5663352460..7973d8fc7e 100644 --- a/gdk/x11/gdkproperty-x11.c +++ b/gdk/x11/gdkproperty-x11.c @@ -45,15 +45,16 @@ gdk_atom_intern (const gchar *atom_name, { retval = XInternAtom (gdk_display, atom_name, only_if_exists); - g_hash_table_insert (atom_hash, - g_strdup (atom_name), - GUINT_TO_POINTER (retval)); + if (retval != None) + g_hash_table_insert (atom_hash, + g_strdup (atom_name), + GUINT_TO_POINTER (retval)); } return retval; } -gchar * +gchar* gdk_atom_name (GdkAtom atom) { gchar *t; @@ -69,7 +70,7 @@ gdk_atom_name (GdkAtom atom) t = XGetAtomName (gdk_display, atom); gdk_error_warnings = old_error_warnings; - if (gdk_error_code == -1) + if (gdk_error_code) { if (t) XFree (t); @@ -162,10 +163,10 @@ gdk_property_get (GdkWindow *window, ret_length = ret_nitems; break; case 16: - ret_length = 2 * ret_nitems; + ret_length = sizeof(short) * ret_nitems; break; case 32: - ret_length = 4 * ret_nitems; + ret_length = sizeof(long) * ret_nitems; break; default: g_warning ("unknown property return format: %d", ret_format); diff --git a/gdk/x11/gdkselection-x11.c b/gdk/x11/gdkselection-x11.c index 64a18d0424..3ee2e43b3d 100644 --- a/gdk/x11/gdkselection-x11.c +++ b/gdk/x11/gdkselection-x11.c @@ -105,11 +105,11 @@ gdk_selection_property_get (GdkWindow *requestor, gulong length; GdkAtom prop_type; gint prop_format; - guchar *t; + guchar *t = NULL; 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 moderate length, to avoid two round trips to the server */ @@ -133,11 +133,11 @@ gdk_selection_property_get (GdkWindow *requestor, *data = NULL; return 0; } - + if (t) { - t = NULL; XFree (t); + t = NULL; } /* 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.time = time; - XSendEvent (gdk_display, requestor, False, NoEventMask, (XEvent*) &xevent); + gdk_send_xevent (requestor, False, NoEventMask, (XEvent*) &xevent); } gint diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c index 93fd0a4a7d..47b200c3e4 100644 --- a/gdk/x11/gdkwindow-x11.c +++ b/gdk/x11/gdkwindow-x11.c @@ -34,17 +34,9 @@ #include "gdkprivate.h" #include "MwmUtil.h" -#if HAVE_CONFIG_H -# include <config.h> -# if STDC_HEADERS -# include <stdlib.h> -# include <stdio.h> -# include <string.h> -# endif -#else -# include <stdlib.h> -# include <stdio.h> -#endif +#include <stdlib.h> +#include <stdio.h> +#include <string.h> #ifdef HAVE_SHAPE_EXT @@ -707,10 +699,10 @@ gdk_window_destroy_notify (GdkWindow *window) if (!private->destroyed) { - if (private->window_type == GDK_WINDOW_FOREIGN) - gdk_window_internal_destroy (window, FALSE, FALSE); - else + if (private->window_type != GDK_WINDOW_FOREIGN) g_warning ("GdkWindow %#lx unexpectedly destroyed", private->xwindow); + + gdk_window_internal_destroy (window, FALSE, FALSE); } gdk_xid_table_remove (private->xwindow); @@ -732,6 +724,7 @@ gdk_window_unref (GdkWindow *window) { GdkWindowPrivate *private = (GdkWindowPrivate *)window; g_return_if_fail (window != NULL); + g_return_if_fail (private->ref_count > 0); private->ref_count -= 1; if (private->ref_count == 0) @@ -1089,8 +1082,10 @@ gdk_window_set_hints (GdkWindow *window, size_hints.max_height = max_height; } - if (flags) - XSetWMNormalHints (private->xdisplay, private->xwindow, &size_hints); + /* FIXME: Would it be better to delete this property of + * flags == 0? It would save space on the server + */ + XSetWMNormalHints (private->xdisplay, private->xwindow, &size_hints); } void @@ -1110,7 +1105,15 @@ gdk_window_set_geometry_hints (GdkWindow *window, size_hints.flags = 0; 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) { @@ -1145,28 +1148,30 @@ gdk_window_set_geometry_hints (GdkWindow *window, size_hints.flags |= PAspect; if (geometry->min_aspect <= 1) { - size_hints.min_aspect.x = G_MAXINT * geometry->min_aspect; - size_hints.min_aspect.y = G_MAXINT; + size_hints.min_aspect.x = 65536 * geometry->min_aspect; + size_hints.min_aspect.y = 65536; } else { - size_hints.min_aspect.x = G_MAXINT; - size_hints.min_aspect.y = G_MAXINT / geometry->min_aspect;; + size_hints.min_aspect.x = 65536; + size_hints.min_aspect.y = 65536 / geometry->min_aspect;; } if (geometry->max_aspect <= 1) { - size_hints.max_aspect.x = G_MAXINT * geometry->max_aspect; - size_hints.max_aspect.y = G_MAXINT; + size_hints.max_aspect.x = 65536 * geometry->max_aspect; + size_hints.max_aspect.y = 65536; } else { - size_hints.max_aspect.x = G_MAXINT; - size_hints.max_aspect.y = G_MAXINT / geometry->max_aspect;; + size_hints.max_aspect.x = 65536; + size_hints.max_aspect.y = 65536 / geometry->max_aspect;; } } - - if (geom_mask) - XSetWMNormalHints (private->xdisplay, private->xwindow, &size_hints); + + /* FIXME: Would it be better to delete this property of + * geom_mask == 0? It would save space on the server + */ + XSetWMNormalHints (private->xdisplay, private->xwindow, &size_hints); } void diff --git a/gtk-config.in b/gtk-config.in index 846f826780..399d77efe5 100644 --- a/gtk-config.in +++ b/gtk-config.in @@ -56,7 +56,7 @@ while test $# -gt 0; do echo_exec_prefix=yes ;; --version) - echo @GTK_VERSION@ + echo @GTK_MAJOR_VERSION@.@GTK_MINOR_VERSION@.@GTK_MICRO_VERSION@ ;; --cflags) echo_cflags=yes diff --git a/gtk/gtkfeatures.h.in b/gtk/gtkfeatures.h.in new file mode 100644 index 0000000000..9fee280166 --- /dev/null +++ b/gtk/gtkfeatures.h.in @@ -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__ */ @@ -169,8 +169,8 @@ progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'` # Constants: PROGRAM=ltconfig PACKAGE=libtool -VERSION=1.3.2 -TIMESTAMP=" (1.385.2.150 1999/05/26 00:28:32)" +VERSION=1.3.3 +TIMESTAMP=" (1.385.2.181 1999/07/02 15:49:11)" 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' rm="rm -f" @@ -181,7 +181,8 @@ help="Try \`$progname --help' for more information." default_ofile=libtool can_build_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_fast_install=yes enable_dlopen=unknown @@ -201,6 +202,7 @@ need_locks=yes ac_ext=c objext=o libext=a +exeext= cache_file= old_AR="$AR" @@ -576,7 +578,7 @@ if test "$with_gcc" != yes || test -z "$CC"; then # Now see if the compiler is really GCC. with_gcc=no 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 cat > conftest.c <<EOF @@ -584,7 +586,7 @@ if test "$with_gcc" != yes || test -z "$CC"; then yes; #endif 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 fi $rm conftest.c @@ -598,8 +600,8 @@ compiler="$2" echo $ac_n "checking for object suffix... $ac_c" 1>&6 $rm conftest* echo 'int i = 1;' > conftest.c -echo "$progname:601: checking for object suffix" >& 5 -if { (eval echo $progname:602: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; }; then +echo "$progname:603: checking for object suffix" >& 5 +if { (eval echo $progname:604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; }; then # Append any warnings to the config.log. cat conftest.err 1>&5 @@ -617,6 +619,38 @@ fi $rm conftest* 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 pic_flag= special_shlib_compile_flags= @@ -739,8 +773,8 @@ if test -n "$pic_flag"; then echo "int some_variable = 0;" > conftest.c save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $pic_flag -DPIC" - echo "$progname:742: 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 + echo "$progname:776: checking if $compiler PIC flag $pic_flag works" >&5 + 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. cat conftest.err 1>&5 @@ -792,8 +826,8 @@ mkdir out chmod -w . save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -o out/conftest2.o" -echo "$progname:795: 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 +echo "$progname:829: checking if $compiler supports -c -o file.o" >&5 +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 # 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 save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -c -o conftest.lo" - echo "$progname:828: 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 + echo "$progname:862: checking if $compiler supports -c -o file.lo" >&5 +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 # So say no if there are warnings @@ -877,8 +911,8 @@ if test "$with_gcc" = yes; then echo "int some_variable = 0;" > conftest.c save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.c" - echo "$progname:880: 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 + echo "$progname:914: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 + 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 # So say no if there are warnings @@ -921,8 +955,8 @@ $rm conftest* echo 'main(){return(0);}' > conftest.c save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $link_static_flag" -echo "$progname:924: 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 +echo "$progname:958: checking if $compiler static flag $link_static_flag works" >&5 +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 else echo "$ac_t"none 1>&6 @@ -954,7 +988,7 @@ if test -z "$LD"; then if test "$with_gcc" = yes; then # Check if gcc -print-prog-name=ld gives a path. 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` case "$ac_prog" in # Accept absolute paths. @@ -978,10 +1012,10 @@ if test -z "$LD"; then esac elif test "$with_gnu_ld" = yes; then 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 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 if test -z "$LD"; then @@ -1047,7 +1081,7 @@ hardcode_minus_L=no hardcode_shlibpath_var=unsupported runpath_var= 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* # included in the symbol list include_expsyms= @@ -1130,10 +1164,9 @@ EOF # Extract the symbol export list from an `--export-all' def file, # then regenerate the def file from the symbol export list, so that # the compiled dll only exports the symbol export list. - export_symbols_cmds='rm -f $objdir/$soname-ltdll.c~ - sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$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~ + 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~ + test -f $objdir/$soname-ltdll.$objext || (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~ sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]* ; *//" < $objdir/$soname-def > $export_symbols' archive_expsym_cmds='echo EXPORTS > $objdir/$soname-def~ @@ -1142,13 +1175,15 @@ EOF echo " \$symbol @ \$_lt_hint ; " >> $objdir/$soname-def; _lt_hint=`expr 1 + \$_lt_hint`; 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~ $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~ $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 $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts' - old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $objdir/$soname-def --output-lib $objdir/$libname.a' + old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $objdir/$soname-def --output-lib $objdir/$libname.a' ;; netbsd*) @@ -1554,11 +1589,11 @@ void nm_test_func(){} main(){nm_test_var='a';nm_test_func();return(0);} EOF - echo "$progname:1557: 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 + echo "$progname:1592: checking if global_symbol_pipe works" >&5 + 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. 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. if sort "$nlist" | uniq > "$nlist"T; then @@ -1610,7 +1645,7 @@ EOF save_CFLAGS="$CFLAGS" LIBS="conftstm.$objext" 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 else echo "$progname: failed program was:" >&5 @@ -1756,7 +1791,7 @@ bsdi4*) soname_spec='${libname}.so' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 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_test_file=/shlib/libc.so 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*) version_type=windows + need_version=no + need_lib_prefix=no if test "$with_gcc" = yes; then library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.a' else @@ -1776,7 +1813,6 @@ cygwin* | mingw*) dynamic_linker='Win32 ld.exe' deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' file_magic_cmd='${OBJDUMP} -f' - need_lib_prefix=no # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH lt_cv_dlopen="LoadLibrary" @@ -1807,11 +1843,22 @@ freebsd*) esac finish_cmds='PATH="\$PATH:/sbin" OBJFORMAT="'"$objformat"'" ldconfig -m $libdir' 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*) 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 ;; @@ -2120,7 +2167,7 @@ else if eval "test \"`echo '$''{'lt_cv_dlopen'+set}'`\" != set"; then lt_cv_dlopen=no lt_cv_dlopen_libs= 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_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2128,7 +2175,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <<EOF -#line 2131 "ltconfig" +#line 2178 "ltconfig" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ @@ -2138,7 +2185,7 @@ int main() { dlopen() ; return 0; } 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* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2157,12 +2204,12 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then else echo "$ac_t""no" 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 echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2165 "ltconfig" +#line 2212 "ltconfig" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char dlopen(); below. */ #include <assert.h> @@ -2184,7 +2231,7 @@ dlopen(); ; return 0; } 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* eval "ac_cv_func_dlopen=yes" else @@ -2201,7 +2248,7 @@ if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then else echo "$ac_t""no" 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_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2209,7 +2256,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldld $LIBS" cat > conftest.$ac_ext <<EOF -#line 2212 "ltconfig" +#line 2259 "ltconfig" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ @@ -2219,7 +2266,7 @@ int main() { dld_link() ; return 0; } 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* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2238,12 +2285,12 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then else echo "$ac_t""no" 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 echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2246 "ltconfig" +#line 2293 "ltconfig" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shl_load(); below. */ #include <assert.h> @@ -2265,7 +2312,7 @@ shl_load(); ; return 0; } 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* eval "ac_cv_func_shl_load=yes" else @@ -2283,7 +2330,7 @@ if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then else echo "$ac_t""no" 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_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2291,7 +2338,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldld $LIBS" cat > conftest.$ac_ext <<EOF -#line 2294 "ltconfig" +#line 2341 "ltconfig" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -2302,7 +2349,7 @@ int main() { shl_load() ; return 0; } 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* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2345,17 +2392,17 @@ fi for ac_hdr in dlfcn.h; do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` 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 echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2353 "ltconfig" +#line 2400 "ltconfig" #include <$ac_hdr> int fnord = 0; EOF 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}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2383,7 +2430,7 @@ done LIBS="$lt_cv_dlopen_libs $LIBS" 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 echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2391,7 +2438,7 @@ else lt_cv_dlopen_self=cross else cat > conftest.c <<EOF -#line 2394 "ltconfig" +#line 2441 "ltconfig" #if HAVE_DLFCN_H #include <dlfcn.h> @@ -2434,10 +2481,10 @@ else fnord() { int i=42;} 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(ptr1 || ptr2) exit(0); } exit(1); } + if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } 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 lt_cv_dlopen_self=yes else @@ -2456,7 +2503,7 @@ echo "$ac_t""$lt_cv_dlopen_self" 1>&6 if test "$lt_cv_dlopen_self" = yes; then LDFLAGS="$LDFLAGS $link_static_flag" 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 echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2464,7 +2511,7 @@ else lt_cv_dlopen_self_static=cross else cat > conftest.c <<EOF -#line 2467 "ltconfig" +#line 2514 "ltconfig" #if HAVE_DLFCN_H #include <dlfcn.h> @@ -2507,10 +2554,10 @@ else fnord() { int i=42;} 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(ptr1 || ptr2) exit(0); } exit(1); } + if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } 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 lt_cv_dlopen_self_static=yes else @@ -2729,6 +2776,9 @@ objext="$objext" # Old archive suffix (normally "a"). libext="$libext" +# Executable file suffix (normally ""). +exeext="$exeext" + # Additional compiler flags for building library objects. pic_flag=$pic_flag @@ -2897,7 +2947,7 @@ EOF esac # 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" ;; @@ -54,8 +54,8 @@ modename="$progname" # Constants. PROGRAM=ltmain.sh PACKAGE=libtool -VERSION=1.3.2 -TIMESTAMP=" (1.385.2.150 1999/05/26 00:28:32)" +VERSION=1.3.3 +TIMESTAMP=" (1.385.2.181 1999/07/02 15:49:11)" default_mode= help="Try \`$progname --help' for more information." @@ -69,7 +69,7 @@ rm="rm -f" Xsed='sed -e 1s/^X//' sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g' SP2NL='tr \040 \012' -NL2SP='tr \012 \040' +NL2SP='tr \015\012 \040\040' # NLS nuisances. # Only set LANG and LC_ALL to C if already set. @@ -638,6 +638,12 @@ compiler." # #undef WIN32_LEAN_AND_MEAN # #include <stdio.h> # +# #ifndef __CYGWIN__ +# # ifdef __CYGWIN32__ +# # define __CYGWIN__ __CYGWIN32__ +# # endif +# #endif +# # #ifdef __cplusplus # extern "C" { # #endif @@ -646,8 +652,10 @@ compiler." # } # #endif # +# #ifdef __CYGWIN__ # #include <cygwin/cygwin_dll.h> # DECLARE_CYGWIN_DLL( DllMain ); +# #endif # HINSTANCE __hDllInstance_base; # # BOOL APIENTRY @@ -790,9 +798,6 @@ compiler." # } # /* impgen.c ends here */ ;; - *-*-beos*) - allow_undefined=no - ;; *) allow_undefined=yes ;; @@ -896,6 +901,14 @@ compiler." fi case "$arg" in *.la | *.lo) ;; # We handle these cases below. + force) + if test "$dlself" = no; then + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; self) if test "$prev" = dlprefiles; then dlself=yes @@ -1225,7 +1238,7 @@ compiler." fi if test -n "$dependency_libs"; then - # Extract -R from dependency_libs + # Extract -R and -L from dependency_libs temp_deplibs= for deplib in $dependency_libs; do case "$deplib" in @@ -1237,7 +1250,13 @@ compiler." -L*) case "$compile_command $temp_deplibs " in *" $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";; esac done @@ -2040,51 +2059,6 @@ EOF # Use standard objects if they are pic 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 if test -z "$export_symbols"; 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"' 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. if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval cmds=\"$archive_expsym_cmds\" @@ -2190,8 +2209,58 @@ EOF # Delete the old objects. $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. - 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" eval cmds=\"$reload_cmds\" @@ -2204,9 +2273,21 @@ EOF IFS="$save_ifs" # 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 -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 # accidentally link it into a program. $show "echo timestamp > $libobj" @@ -2216,7 +2297,7 @@ EOF if test -n "$pic_flag"; then # Only do commands if we really have different PIC objects. - reload_objs="$libobjs" + reload_objs="$libobjs $reload_conv_objs" output="$libobj" eval cmds=\"$reload_cmds\" IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' @@ -2234,6 +2315,11 @@ EOF $run $LN_S $obj $libobj || exit $? fi + if test -n "$gentop"; then + $show "${rm}r $gentop" + $run ${rm}r $gentop + fi + exit 0 ;; @@ -2366,7 +2452,7 @@ EOF fi 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 dlsyms="${outputname}S.c" else @@ -2779,7 +2865,7 @@ else fi" else echo >> $output "\ - program='$outputname' + program='$outputname$exeext' progdir=\"\$thisdir/$objdir\" " fi @@ -3204,13 +3290,11 @@ libdir='$install_libdir'\ # Install the shared library and build the symlinks. $show "$install_prog $dir/$realname $destdir/$realname" $run eval "$install_prog $dir/$realname $destdir/$realname" || exit $? - test "X$dlname" = "X$realname" && dlname= if test $# -gt 0; then # Delete the old symlinks, and create new ones. for linkname do - test "X$dlname" = "X$linkname" && dlname= if test "$linkname" != "$realname"; then $show "(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 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. lib="$destdir/$realname" eval cmds=\"$postinstall_cmds\" @@ -3655,9 +3733,7 @@ libdir='$install_libdir'\ # Delete the libtool libraries and symlinks. for n in $library_names; do rmfiles="$rmfiles $dir/$n" - test "X$n" = "X$dlname" && dlname= done - test -n "$dlname" && rmfiles="$rmfiles $dir/$dlname" test -n "$old_library" && rmfiles="$rmfiles $dir/$old_library" $show "$rm $rmfiles" diff --git a/sanity_check b/sanity_check index 95dddf35ef..84daf9b904 100755 --- a/sanity_check +++ b/sanity_check @@ -13,17 +13,6 @@ echo "Checking 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..." if [ "x`grep $VERSION gtk+-$VERSION/README | wc -l | awk -F' ' '{print $1}'`" == "x4" ]; then echo "ok" |