1997-11-24 22:37:52 +00:00
|
|
|
/* GDK - The GIMP Drawing Kit
|
|
|
|
* 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
|
1998-04-13 02:02:47 +00:00
|
|
|
* License along with this library; if not, write to the
|
|
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
1997-11-24 22:37:52 +00:00
|
|
|
*/
|
1998-03-17 07:54:57 +00:00
|
|
|
|
1999-02-24 07:37:18 +00:00
|
|
|
/*
|
|
|
|
* Modified by the GTK+ Team and others 1997-1999. See the AUTHORS
|
|
|
|
* file for a list of people on the GTK+ Team. See the ChangeLog
|
|
|
|
* files for a list of changes. These files are distributed with
|
|
|
|
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
|
|
|
*/
|
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
#include <X11/Xlib.h>
|
|
|
|
#include <X11/Xutil.h>
|
|
|
|
#include <X11/Xatom.h>
|
|
|
|
#include <netinet/in.h>
|
|
|
|
#include "gdk.h"
|
Removed DEFS "+=" mess that breaks recent automakes. INCLUDES is the
* gdk/Makefile.am, gtk/Makefile.am:
Removed DEFS "+=" mess that breaks recent automakes.
INCLUDES is the correct way to add to CFLAGS from Makefile.am.
* gdk/gdk.c, gdk/gdkglobals.c, gdk/gdkimage.c, gdk/gdkinput.c,
gdk/gdkpixmap.c, gdk/gdkthreads.c, gdk/gdkwindow.c,
gdk/gxid_lib.c, gtk/fnmatch.c, gtk/gtkclist.c, gtk/gtkmain.c,
gtk/testthreads.c:
Include "config.h" instead of "../config.h".
Now that DEFS works again, automake will automatically pass us
the location of config.h in -I.
1998-11-24 05:58:53 +00:00
|
|
|
#include "config.h"
|
1999-10-01 23:18:30 +00:00
|
|
|
|
|
|
|
#include "gdkwindow.h"
|
|
|
|
#include "gdkinputprivate.h"
|
1999-11-08 20:14:59 +00:00
|
|
|
#include "gdkprivate-x11.h"
|
1999-10-03 22:12:41 +00:00
|
|
|
#include "gdkx.h"
|
1998-02-27 03:55:33 +00:00
|
|
|
#include "MwmUtil.h"
|
1998-12-24 19:39:00 +00:00
|
|
|
|
[ Merges from gtk-1-2 ]
Wed Sep 8 07:13:29 1999 Tim Janik <timj@gtk.org>
* configure.in: fixed "GNU Make" check to pass with new make version
3.77.95.
Fri Sep 3 16:04:41 1999 Tim Janik <timj@gtk.org>
* gtk-config.in (--version): don't echo @GTK_VERSION@, but
@GTK_MAJOR_VERSION@.@GTK_MINOR_VERSION@.@GTK_MICRO_VERSION@, so the
AM_PATH_GTK() macros don't get confused by the -pre1.
Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (REBUILD): Change check for perl5
to check explicitely for v >= 5.002. (5.001
does not work with our scripts.)
Wed Aug 25 15:45:46 1999 Tim Janik <timj@gtk.org>
* configure.in: evaluate $PERL for the perl version check. added
--disable-rebuilds to give the user an option to completely disable
any source autogeneration rules.
Mon Aug 23 23:16:14 1999 Tim Janik <timj@gtk.org>
* configure.in: evaluate $ac_make when checking for GNU Make.
Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
* docs/Makefile.am: added generation.txt.
* Makefile.am: require automake 1.4, build README from README.in and
INSTALL from INSTALL.in in dist-hook.
* README.in:
* INSTALL.in: new files to autogenerate README and INSTALL from.
* configure.in: figure whether we have GNU Make
* docs/generation.txt: minor additions/corrections.
Wed Aug 11 13:38:26 BST 1999 Tony Gale <gale@gtk.org>
* docs/gtkfaq.sgml: FAQ Update
July 30, 1999 Elliot Lee <sopwith@redhat.com>
* configure.in: Fix autoconf warnings about cross compilation by
trying to provide sane defaults for AC_TRY_RUN.
Fri Jul 16 22:20:21 PDT 1999 Manish Singh <yosh@gimp.org>
* ltconfig
* ltmain.sh: upgrade to libtool 1.3.3
Thu Jul 8 11:30:18 1999 Owen Taylor <otaylor@redhat.com>
* INSTALL: Indicate that the --with-glib= configure
time flag is unsupported.
Mon Jul 5 20:36:03 1999 Owen Taylor <otaylor@redhat.com>
* docs/generation.txt: Added a file that gives
documenation about the autogeneration process for
various autogenerated files.
Tue Jun 29 15:59:25 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (LIBS): Look for libgmodule in the
right location.
Thu Jun 17 13:57:31 1999 Owen Taylor <otaylor@redhat.com>
* docs/gtk_tut.sgml: Removed references to
code examples in my directory on gtk.org as
they should all be in the tutorial now.
* docs/gtk_tut.sgml: Added sources for dial-test
and scribble-xinput programs that were previously
missing.
Fri Jun 4 00:08:59 1999 Owen Taylor <otaylor@redhat.com>
* TODO: Added entry about menu keyboard navigation, removed
some finished items.
Mon May 31 00:11:24 1999 Owen Taylor <otaylor@redhat.com>
* acinclude.m4: Standardize on func_dgettext
not func_gettext, so that the checks for dgettext
actually are paid attention to.
Wed May 5 10:47:54 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (LIBS): Add $INTLLIBS into $LIBS
directly, rather than repeating the checks for
gettext.
* INSTALL: Added information about gettext and
NLS support.
* acinclude.m4 (LIBM): Check for dgettext, not
just gettext. This should hopefully fix things wrt
systems with old versions of GNU gettext installed.
Tue Jun 29 15:59:25 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (LIBS): Look for libgmodule in the
right location.
Thu Apr 1 16:58:10 PST 1999 Manish Singh <yosh@gimp.org>
* autogen.sh: add --enable-maintainer-mode
* configure.in: set ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
Wed Mar 24 23:03:49 CST 1999 Shawn T. Amundson <amundson@gtk.org>
* docs/gtk-config.1.in:
docs/Makefile.am:
configure.in: gtk-config is now generated.
* docs/gtk-config.1: Removed, now generated.
Thu Sep 23 17:59:59 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): grr, even if Gdk doesn't
handle CreateNotify itself, still put out a debuging message for
--gdk-debug=events. made the ReparentNotify debugging message more
verbose.
wrap xcoords translation for ConfigureEvents into an error trap,
a destroy event may already be pending, and in that case, the
actuall coordinate values are not at all critical.
Sat Sep 18 22:24:15 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkcc.c: Stop leaking the color_hash all over
the place. Simplify and improve the logic.
Fri Sep 17 09:57:15 1999 Tim Janik <timj@gtk.org>
* gdk/gdk.h, gdk/gdkcolor.c: make return types (gint or gboolean)
for prototypes and function implementations consistent (reported
by Tomas Ogren).
Tue Sep 14 18:23:01 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): tell if expose events have
send_event set in debugging output.
(gdk_compress_exposures): default initialize the event so we don't
operate on bogus values (namely send_event).
Thu Sep 2 16:33:59 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c: When we receive an unexpected
destroy notify on one of our windows, don't just
warn about it, also mark our windows as destroyed.
Sun Sep 5 08:10:53 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkfont.c (gdk_font_hash_insert): Add
name => font and name => fontset hashes. The
name => fontset hash is a _big_ win since we
weren't previously caching fontsets at all and loading
fontsets is expensive. The name => font hash
is less of a win, but it does save us from doing
repeated XQueryFont calls on the same font.
* gdk/gdkprivate.h (struct _GdkFontPrivate): Add a names
list so we can remove font/fontset from hash.
Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_atom_intern): Remove useless
and slightly confusing test. [ XInternAtom (,,TRUE)
will never return None ].
Sat Sep 4 08:39:26 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_set_geometry_hints)
gdk/gdkwindow.c (gdk_window_set_hints):
Don't omit setting the properties if flags == 0 -
there may be an existing set of properties there
already. (Very old bug. Would it be better to
delete the property instead?)
* gdk/gdkselection.c (gdk_selection_property_get): Fix
spelling error in comment.
Wed Sep 1 14:05:30 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkimage.c (gdk_image_new): Use gdk_error_trap_push()
to avoid stomping over gdk_error_warnings.
* gdk/gdkimage.c (gdk_image_new): compute image->bpp
as (bits_per_pixel + 7) / 8. This gives the same
result as before for multiples of 8, but actually
a "reasonable" value for 1bit or 4bit displays.
Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
* gdk/Makefile.am: minor cleanups, strip spaces on build rules for
GNU Make.
Tue Aug 17 07:43:04 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): give a debugging note when
discarding configure events.
1999-08-18 Federico Mena Quintero <federico@redhat.com>
* gdk/gdkpixmap.c (gdk_pixmap_unref): g_return_if_fail() the
refcount is greater than zero.
* gdk/gdkwindow.c (gdk_window_unref): Likewise.
* gdk/gdkfont.c (gdk_font_unref): Likewise.
* gdk/gdkgc.c (gdk_gc_unref): Likewise.
* gdk/gdkdnd.c (gdk_drag_context_unref): Likewise.
Wed Aug 11 01:04:57 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_property_get): Fix assumption
that format 32 => sizeof(item) == 4. It really is
sizeof(long).
Tue Jun 29 23:02:42 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c (gdk_x_error / gdk_x_io_error): Don't
core dump at all on X IO errors, only core dump
if --enable-debug for X errors.
Thu Jun 24 17:06:23 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): removed old ""Got event for
unknown window:" message. disabled ConfigureNotify discarding code,
because it led to events being processed out of order.
Thu Jun 24 12:22:02 1999 Tim Janik <timj@gtk.org>
* gdk/gdkglobals.c: preinitialize gdk_error_code to 0.
* gdk/gdkevents.c (gdk_event_send_client_message_to_all_recurse): since
we export this function, supress error warnings and don't reset the
error code in the first half of this function.
* gdk/gdk.c (gdk_x_error): set gdk_error_code to the actuall X error
code (instead of just -1) so gdk_error_trap_pop() reveals something
actually informative about the error that happened.
* gdk/*.c:
don't rely on gdk_error_code being -1 if an error occoured, but just
gdk_error_code != 0.
Thu Jun 24 11:50:07 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_apply_filters): advance the filter list
pointer *before* invoking the filter function, so we at least don't
crash if a filter is removed that is currently executed. window filters
*really* need to be made truely reentrant at some point.
Mon Jun 14 11:10:15 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): print the atom name in the
PropertyNotify debug messages.
Wed May 5 22:51:06 1999 Owen Taylor <otaylor@redhat.com>
Patch from Sung-Hyun Nam <namsh@lgic.co.kr>
* gdk/gdkim.c: Fix cut-and-paste errors for
x/y and PreeditAttributes/StatusAttributes.
Wed May 5 22:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_set_geometry_hints): Change
G_MAXINT to 2^16 to alleviate overflow problems in
various window managers.
Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkfont.c (gdk_text_measure): Fix the return value
for fontsets.
Wed May 5 12:42:01 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_set_geometry_hints):
Initialize size_hints.x and size_hints.y because kwm
brokenly pays attention to them.
(Bug #1181 - Lars Heete <hel@admin.de>)
Wed May 5 11:38:56 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkrgb.c (gdk_rgb_choose_visual): Free the
return value of gdk_list_visuals().
(Bug #1193 - Morten Welinder <terra@diku.dk>)
Tue May 4 11:12:56 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkim.c (gdk_im_real_open): cast the return value of
XSetIMValues to (void *) when comparing to NULL, to workaround
the problem of some compilers barfing since older X headers don't
have the prototype for it.
Mon Apr 19 10:11:12 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkcolor.c (gdk_colormap_new): Fix memory leak
for pseudocolor where colormap->colors was double
allocated.
* gdk/gdkcolor.c (gdk_colormap_alloc1): Store the
color value in the hash table with the pixel filled
in so when we do later hash table lookups, the color
value is correct.
Sun May 2 15:29:45 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkdraw.c (gdk_draw_lines): check private->destroyed before
making the call
Tue Apr 27 11:17:35 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.c (xdnd_set_{targets,actions}): Fix leak
pointed out by Morten Welinder <terra@diku.dk>.
Wed Apr 21 14:20:22 1999 George Lebl <jirka@5z.com>
* gdk/gdkwindow.c: (gdk_window_remove_filter) correctly remove the
default filter from the list
Wed Apr 21 14:20:22 1999 George Lebl <jirka@5z.com>
* gdk/gdkwindow.c: (gdk_window_remove_filter) correctly remove the
default filter from the list
Fri Apr 16 20:41:43 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdk.c: #include "gdkkeysyms.h" for gdk_XConvertCase #defines
* gtk/gtkfontsel.c (gtk_font_selection_create_xlfd): use
g_strdup_printf instead of calcing the length separately
Tue Apr 13 02:49:33 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c: removed some silly #ifdef HAVE_CONFIG
that we don't do in many other places. (Fixing duplicate
#include of config.h)
* gdk/gdkevents.c: include gdkinput.h _after_ config.h.
Otherwise, #ifndef XINPUT_NONE check in the latter
doesn't work. (Bug #546)
Sun Apr 11 14:38:03 1999 Tim Janik <timj@gtk.org>
* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): check for color
"None" case insensitive.
Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkselection.c:
Add error traps so if the other end of the connection
dies, we survive.
Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.c (gdk_drag_motion): Separate out the
dest_xid field into two fields - one for the window
to send in messages, one to indicate the last looked
up window for caching purposes. This is needed, so
that Leave messages get the correct window.
Mon Apr 5 13:21:30 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkevents.c (gdk_event_check, gdk_event_prepare):
Fix warning created by people mucking around
with the gsource API.
* gdk/gdkevents.c (gdk_io_invoke, gdk_input_add_full):
Change mapping between GIOCondition and GdkInputCondition
to match the way the Linux kernel does it. This should
fix problems where closed pipes were no longer signalling
GDK_INPUT_READ on systems with a native poll().
Mon Apr 5 17:11:57 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): Check
explicitly for the string "None" - it is in the XPM
spec and some servers treat unknown colors in odd ways
(like asking the user!)
Thu Apr 1 16:58:10 PST 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkevents.c: made "->" into a "." of previous change so
it compiles
Thu Apr 1 18:41:25 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkevents.c (gdk_compress_exposures): Set the
window field of the event structure before calling
user filters.
1999-03-31 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gdk/gdk.c (gdk_init_check): Use False as the last argument to
XInternAtom() here. This is a particularly Old And Nasty(tm) bug.
Mon Mar 29 17:31:52 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkim.c (gdk_mbstowcs): Free the value of the
intermediate text property - prevents major memory
leak when gdk_use_mb.
gtk-d3august-990311-0: Bj|rn Augustsson <d3august@dtek.chalmers.se>
Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com>
Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
gtk-a-higuti-990322-[0-3]
* gdk/gdkfont.c (gdk_text_extents_wc): Make work when
sizeof(wchar_t) != sizeof (GdkWChar)
* configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS
that was causing -DX_LOCALE not to work.
* gtk/gtkrc.c (gtk_rc_init):
X_LOCALE will never have LC_MESSAGES defined
* gdk/gdk.c (gdk_init_check):
Remove --xim-preedit and --xim-status from argv properly.
* gdk/gdkim.c (gdk_ic_real_new): Add a gdk_flush() so
that the client window is present on the X server
before we pass it to the input method.
Tue Mar 9 10:46:49 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.c (motif_find_drag_window): Fix bug where
if --display is specified on the command line, than
the drag window will not be created on that display.
Tue Mar 9 10:38:24 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_atom_intern): Fixed bug where
lookups with only_if_exists == TRUE were inserting
bogus values into the atom cache.
Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org>
* gdk/gdkselection.c (gdk_selection_property_get): first XFree(t),
then reset it to NULL.
* gdk/gdkcolor.c:
(gdk_colors_free):
(gdk_colormap_free_colors): use colormap->colors[in_pixels[i]] as the
key for g_hash_table_remove() in both functions, this prevents us
from accessing possibly uninitialized portions of a GdkColor structure
where we are only interested in its pixel value.
Tue Mar 9 01:01:28 1999 Tim Janik <timj@gtk.org>
* gdk/gdkfont.c (gdk_font_load): first lookup the xfont ID in our
font hash table, if we have a GdkFontPrivate entry for this font
already, simply increment its reference count, provided by Olaf Dietsche
<olaf.dietsche+list.gtk@netcologne.de>.
1999-09-21 Tor Lillqvist <tml@iki.fi>
1999-09-28 20:19:13 +00:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <string.h>
|
1998-12-24 19:39:00 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
|
1998-05-03 22:41:32 +00:00
|
|
|
#ifdef HAVE_SHAPE_EXT
|
|
|
|
#include <X11/extensions/shape.h>
|
|
|
|
#endif
|
|
|
|
|
1998-12-15 07:32:11 +00:00
|
|
|
const int gdk_event_mask_table[20] =
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
|
|
|
ExposureMask,
|
|
|
|
PointerMotionMask,
|
|
|
|
PointerMotionHintMask,
|
|
|
|
ButtonMotionMask,
|
|
|
|
Button1MotionMask,
|
|
|
|
Button2MotionMask,
|
|
|
|
Button3MotionMask,
|
|
|
|
ButtonPressMask | OwnerGrabButtonMask,
|
|
|
|
ButtonReleaseMask | OwnerGrabButtonMask,
|
|
|
|
KeyPressMask,
|
|
|
|
KeyReleaseMask,
|
|
|
|
EnterWindowMask,
|
|
|
|
LeaveWindowMask,
|
|
|
|
FocusChangeMask,
|
|
|
|
StructureNotifyMask,
|
|
|
|
PropertyChangeMask,
|
1998-01-06 01:17:10 +00:00
|
|
|
VisibilityChangeMask,
|
1997-11-24 22:37:52 +00:00
|
|
|
0, /* PROXIMITY_IN */
|
1998-05-19 22:33:24 +00:00
|
|
|
0, /* PROXIMTY_OUT */
|
|
|
|
SubstructureNotifyMask
|
1997-11-24 22:37:52 +00:00
|
|
|
};
|
1999-02-10 08:06:30 +00:00
|
|
|
const int gdk_nevent_masks = sizeof (gdk_event_mask_table) / sizeof (int);
|
1997-11-24 22:37:52 +00:00
|
|
|
|
1999-01-27 18:21:20 +00:00
|
|
|
/* Forward declarations */
|
|
|
|
static gboolean gdk_window_gravity_works (void);
|
|
|
|
static void gdk_window_set_static_win_gravity (GdkWindow *window,
|
|
|
|
gboolean on);
|
1998-11-06 22:05:02 +00:00
|
|
|
static gboolean gdk_window_have_shape_ext (void);
|
1997-11-24 22:37:52 +00:00
|
|
|
|
1999-11-08 20:14:59 +00:00
|
|
|
static void
|
|
|
|
gdk_x11_window_destroy (GdkDrawable *drawable)
|
1998-03-07 18:38:18 +00:00
|
|
|
{
|
1999-11-08 20:14:59 +00:00
|
|
|
if (!GDK_DRAWABLE_DESTROYED (drawable))
|
1999-02-10 08:06:30 +00:00
|
|
|
{
|
1999-11-08 20:14:59 +00:00
|
|
|
if (GDK_DRAWABLE_TYPE (drawable) == GDK_WINDOW_FOREIGN)
|
|
|
|
gdk_xid_table_remove (GDK_DRAWABLE_XID (drawable));
|
|
|
|
else
|
|
|
|
g_warning ("losing last reference to undestroyed window\n");
|
1999-02-10 08:06:30 +00:00
|
|
|
}
|
1999-11-08 20:14:59 +00:00
|
|
|
|
|
|
|
g_free (GDK_DRAWABLE_XDATA (drawable));
|
1998-03-07 18:38:18 +00:00
|
|
|
}
|
|
|
|
|
1999-11-08 20:14:59 +00:00
|
|
|
static GdkWindow *
|
|
|
|
gdk_x11_window_alloc (void)
|
1998-03-07 18:38:18 +00:00
|
|
|
{
|
1999-02-10 08:06:30 +00:00
|
|
|
GdkWindow *window;
|
1999-11-08 20:14:59 +00:00
|
|
|
GdkWindowPrivate *private;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1999-11-08 20:14:59 +00:00
|
|
|
static GdkDrawableClass klass;
|
|
|
|
static gboolean initialized = FALSE;
|
|
|
|
|
|
|
|
if (!initialized)
|
1999-02-10 08:06:30 +00:00
|
|
|
{
|
1999-11-08 20:14:59 +00:00
|
|
|
initialized = TRUE;
|
|
|
|
|
|
|
|
klass = _gdk_x11_drawable_class;
|
|
|
|
klass.destroy = gdk_x11_window_destroy;
|
1999-02-10 08:06:30 +00:00
|
|
|
}
|
1999-11-08 20:14:59 +00:00
|
|
|
|
|
|
|
window = _gdk_window_alloc ();
|
|
|
|
private = (GdkWindowPrivate *)window;
|
|
|
|
|
|
|
|
private->drawable.klass = &klass;
|
|
|
|
private->drawable.klass_data = g_new (GdkDrawableXData, 1);
|
|
|
|
|
|
|
|
return window;
|
1998-03-07 18:38:18 +00:00
|
|
|
}
|
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
void
|
1998-05-03 22:41:32 +00:00
|
|
|
gdk_window_init (void)
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
1999-11-08 20:14:59 +00:00
|
|
|
GdkWindowPrivate *private;
|
1997-11-24 22:37:52 +00:00
|
|
|
XWindowAttributes xattributes;
|
|
|
|
unsigned int width;
|
|
|
|
unsigned int height;
|
|
|
|
unsigned int border_width;
|
|
|
|
unsigned int depth;
|
|
|
|
int x, y;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
XGetGeometry (gdk_display, gdk_root_window, &gdk_root_window,
|
|
|
|
&x, &y, &width, &height, &border_width, &depth);
|
|
|
|
XGetWindowAttributes (gdk_display, gdk_root_window, &xattributes);
|
1999-11-08 20:14:59 +00:00
|
|
|
|
|
|
|
gdk_parent_root = gdk_x11_window_alloc ();
|
|
|
|
private = (GdkWindowPrivate *)gdk_parent_root;
|
|
|
|
|
|
|
|
GDK_DRAWABLE_XDATA (gdk_parent_root)->xdisplay = gdk_display;
|
|
|
|
GDK_DRAWABLE_XDATA (gdk_parent_root)->xid = gdk_root_window;
|
|
|
|
|
|
|
|
private->drawable.window_type = GDK_WINDOW_ROOT;
|
|
|
|
private->drawable.width = width;
|
|
|
|
private->drawable.height = height;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1999-11-08 20:14:59 +00:00
|
|
|
gdk_xid_table_insert (&gdk_root_window, gdk_parent_root);
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
|
|
|
|
1999-01-17 22:58:59 +00:00
|
|
|
static GdkAtom wm_client_leader_atom = GDK_NONE;
|
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
GdkWindow*
|
|
|
|
gdk_window_new (GdkWindow *parent,
|
|
|
|
GdkWindowAttr *attributes,
|
|
|
|
gint attributes_mask)
|
|
|
|
{
|
|
|
|
GdkWindow *window;
|
|
|
|
GdkWindowPrivate *private;
|
|
|
|
GdkWindowPrivate *parent_private;
|
1999-11-08 20:14:59 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
GdkVisual *visual;
|
|
|
|
Window xparent;
|
|
|
|
Visual *xvisual;
|
1999-11-08 20:14:59 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
XSetWindowAttributes xattributes;
|
|
|
|
long xattributes_mask;
|
|
|
|
XSizeHints size_hints;
|
|
|
|
XWMHints wm_hints;
|
|
|
|
XClassHint *class_hint;
|
|
|
|
int x, y, depth;
|
1999-11-08 20:14:59 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
unsigned int class;
|
|
|
|
char *title;
|
|
|
|
int i;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
g_return_val_if_fail (attributes != NULL, NULL);
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
if (!parent)
|
1999-11-08 20:14:59 +00:00
|
|
|
parent = gdk_parent_root;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
parent_private = (GdkWindowPrivate*) parent;
|
1999-10-03 22:12:41 +00:00
|
|
|
if (GDK_DRAWABLE_DESTROYED (parent))
|
1998-01-26 01:20:14 +00:00
|
|
|
return NULL;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1999-11-08 20:14:59 +00:00
|
|
|
xparent = GDK_DRAWABLE_XID (parent);
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1999-11-08 20:14:59 +00:00
|
|
|
window = gdk_x11_window_alloc ();
|
|
|
|
private = (GdkWindowPrivate *)window;
|
|
|
|
|
|
|
|
GDK_DRAWABLE_XDATA (window)->xdisplay = GDK_DRAWABLE_XDISPLAY (parent);
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
private->parent = parent;
|
1999-11-08 20:14:59 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
xattributes_mask = 0;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
if (attributes_mask & GDK_WA_X)
|
|
|
|
x = attributes->x;
|
|
|
|
else
|
|
|
|
x = 0;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
if (attributes_mask & GDK_WA_Y)
|
|
|
|
y = attributes->y;
|
|
|
|
else
|
|
|
|
y = 0;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
private->x = x;
|
|
|
|
private->y = y;
|
1999-10-03 22:12:41 +00:00
|
|
|
private->drawable.width = (attributes->width > 1) ? (attributes->width) : (1);
|
|
|
|
private->drawable.height = (attributes->height > 1) ? (attributes->height) : (1);
|
|
|
|
private->drawable.window_type = attributes->window_type;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
if (attributes_mask & GDK_WA_VISUAL)
|
|
|
|
visual = attributes->visual;
|
|
|
|
else
|
|
|
|
visual = gdk_visual_get_system ();
|
|
|
|
xvisual = ((GdkVisualPrivate*) visual)->xvisual;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
xattributes.event_mask = StructureNotifyMask;
|
1998-12-15 07:32:11 +00:00
|
|
|
for (i = 0; i < gdk_nevent_masks; i++)
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
|
|
|
if (attributes->event_mask & (1 << (i + 1)))
|
1998-12-15 07:32:11 +00:00
|
|
|
xattributes.event_mask |= gdk_event_mask_table[i];
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
if (xattributes.event_mask)
|
|
|
|
xattributes_mask |= CWEventMask;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1999-01-27 18:21:20 +00:00
|
|
|
if (attributes_mask & GDK_WA_NOREDIR)
|
|
|
|
{
|
|
|
|
xattributes.override_redirect =
|
1999-02-10 08:06:30 +00:00
|
|
|
(attributes->override_redirect == FALSE)?False:True;
|
1999-01-27 18:21:20 +00:00
|
|
|
xattributes_mask |= CWOverrideRedirect;
|
|
|
|
}
|
|
|
|
else
|
1997-12-16 22:10:43 +00:00
|
|
|
xattributes.override_redirect = False;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1999-01-27 18:21:20 +00:00
|
|
|
if (parent_private && parent_private->guffaw_gravity)
|
|
|
|
{
|
|
|
|
xattributes.win_gravity = StaticGravity;
|
|
|
|
xattributes_mask |= CWWinGravity;
|
|
|
|
}
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
if (attributes->wclass == GDK_INPUT_OUTPUT)
|
|
|
|
{
|
|
|
|
class = InputOutput;
|
|
|
|
depth = visual->depth;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
if (attributes_mask & GDK_WA_COLORMAP)
|
1999-10-03 22:12:41 +00:00
|
|
|
private->drawable.colormap = attributes->colormap;
|
1997-11-24 22:37:52 +00:00
|
|
|
else
|
Destroy widgets _after_ propagating unrealize signals through the widget
Mon Dec 7 10:27:09 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c: Destroy widgets _after_ propagating unrealize
signals through the widget heirarchy. This is unpleasant, as it
causes more X traffic, but is necessary, because we have to clean
up our Input Contexts before destroying the X windows.
(from matsu-981109-0.patch)
Mon Dec 7 10:18:18 1998 Owen Taylor <otaylor@redhat.com>
Applied gtk-a-higuti-981202-0 :
[ a-higuti@math.sci.hokudai.ac.jp (Akira Higuchi) ]
* gdk/gdk.h gdk/gdk.c
(gdk_mbstowcs): New function. Nearly equals to mbstowcs, but
implemented by a combination of Xlib functions, so
it works even with X_LOCALE.
(gdk_wcstombs): New function.
(g_mbtowc): Removed. No longer needed.
* gdk/gdk.h gdk/gdkfont.c gdk/gdkdraw.c:
Added _wc() variants to gdk_text_width(),
gdk_char_width(), gdk_draw_text(),
* gdk/gdki18n.h
(mblen, mbtowc, wctomb, mbstowcs, wcstombs,
wcslen, wcscpy, wcsncpy):
Removed. No longer needed.
(iswalnum): Removed.
(gdk_iswalnum): New macro.
(gdk_iswspace): New macro.
* gdk/gdktype.h
(GdkWChar): New typedef.
* gtk/gtkentry.h, gtk/gtkentry.c
There are many changes according to the change of the
internal representation of text, from multibyte string
to wide characters.
* gtk/gtkprivate.h, gtk/gtkmain.c
Removed the variable gtk_use_mb and related codes.
* gtk/gtkspinbutton.c
Some changes according to the change of type of entry->text.
* gtk/gtktext.h, gtk/gtktext.c
Changed the internal representation of text. We use GdkWchar
if a fontset is supplied. If not, we use guchar to save
memory.
1998-12-09 06:36:57 +00:00
|
|
|
{
|
1999-02-10 08:06:30 +00:00
|
|
|
if ((((GdkVisualPrivate*)gdk_visual_get_system ())->xvisual) == xvisual)
|
1999-10-03 22:12:41 +00:00
|
|
|
private->drawable.colormap = gdk_colormap_get_system ();
|
Destroy widgets _after_ propagating unrealize signals through the widget
Mon Dec 7 10:27:09 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c: Destroy widgets _after_ propagating unrealize
signals through the widget heirarchy. This is unpleasant, as it
causes more X traffic, but is necessary, because we have to clean
up our Input Contexts before destroying the X windows.
(from matsu-981109-0.patch)
Mon Dec 7 10:18:18 1998 Owen Taylor <otaylor@redhat.com>
Applied gtk-a-higuti-981202-0 :
[ a-higuti@math.sci.hokudai.ac.jp (Akira Higuchi) ]
* gdk/gdk.h gdk/gdk.c
(gdk_mbstowcs): New function. Nearly equals to mbstowcs, but
implemented by a combination of Xlib functions, so
it works even with X_LOCALE.
(gdk_wcstombs): New function.
(g_mbtowc): Removed. No longer needed.
* gdk/gdk.h gdk/gdkfont.c gdk/gdkdraw.c:
Added _wc() variants to gdk_text_width(),
gdk_char_width(), gdk_draw_text(),
* gdk/gdki18n.h
(mblen, mbtowc, wctomb, mbstowcs, wcstombs,
wcslen, wcscpy, wcsncpy):
Removed. No longer needed.
(iswalnum): Removed.
(gdk_iswalnum): New macro.
(gdk_iswspace): New macro.
* gdk/gdktype.h
(GdkWChar): New typedef.
* gtk/gtkentry.h, gtk/gtkentry.c
There are many changes according to the change of the
internal representation of text, from multibyte string
to wide characters.
* gtk/gtkprivate.h, gtk/gtkmain.c
Removed the variable gtk_use_mb and related codes.
* gtk/gtkspinbutton.c
Some changes according to the change of type of entry->text.
* gtk/gtktext.h, gtk/gtktext.c
Changed the internal representation of text. We use GdkWchar
if a fontset is supplied. If not, we use guchar to save
memory.
1998-12-09 06:36:57 +00:00
|
|
|
else
|
1999-10-03 22:12:41 +00:00
|
|
|
private->drawable.colormap = gdk_colormap_new (visual, False);
|
Destroy widgets _after_ propagating unrealize signals through the widget
Mon Dec 7 10:27:09 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c: Destroy widgets _after_ propagating unrealize
signals through the widget heirarchy. This is unpleasant, as it
causes more X traffic, but is necessary, because we have to clean
up our Input Contexts before destroying the X windows.
(from matsu-981109-0.patch)
Mon Dec 7 10:18:18 1998 Owen Taylor <otaylor@redhat.com>
Applied gtk-a-higuti-981202-0 :
[ a-higuti@math.sci.hokudai.ac.jp (Akira Higuchi) ]
* gdk/gdk.h gdk/gdk.c
(gdk_mbstowcs): New function. Nearly equals to mbstowcs, but
implemented by a combination of Xlib functions, so
it works even with X_LOCALE.
(gdk_wcstombs): New function.
(g_mbtowc): Removed. No longer needed.
* gdk/gdk.h gdk/gdkfont.c gdk/gdkdraw.c:
Added _wc() variants to gdk_text_width(),
gdk_char_width(), gdk_draw_text(),
* gdk/gdki18n.h
(mblen, mbtowc, wctomb, mbstowcs, wcstombs,
wcslen, wcscpy, wcsncpy):
Removed. No longer needed.
(iswalnum): Removed.
(gdk_iswalnum): New macro.
(gdk_iswspace): New macro.
* gdk/gdktype.h
(GdkWChar): New typedef.
* gtk/gtkentry.h, gtk/gtkentry.c
There are many changes according to the change of the
internal representation of text, from multibyte string
to wide characters.
* gtk/gtkprivate.h, gtk/gtkmain.c
Removed the variable gtk_use_mb and related codes.
* gtk/gtkspinbutton.c
Some changes according to the change of type of entry->text.
* gtk/gtktext.h, gtk/gtktext.c
Changed the internal representation of text. We use GdkWchar
if a fontset is supplied. If not, we use guchar to save
memory.
1998-12-09 06:36:57 +00:00
|
|
|
}
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
xattributes.background_pixel = BlackPixel (gdk_display, gdk_screen);
|
|
|
|
xattributes.border_pixel = BlackPixel (gdk_display, gdk_screen);
|
|
|
|
xattributes_mask |= CWBorderPixel | CWBackPixel;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1999-10-03 22:12:41 +00:00
|
|
|
switch (private->drawable.window_type)
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
|
|
|
case GDK_WINDOW_TOPLEVEL:
|
1999-11-08 20:14:59 +00:00
|
|
|
xattributes.colormap = GDK_COLORMAP_XCOLORMAP (private->drawable.colormap);
|
1997-11-24 22:37:52 +00:00
|
|
|
xattributes_mask |= CWColormap;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
xparent = gdk_root_window;
|
|
|
|
break;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
case GDK_WINDOW_CHILD:
|
1999-11-08 20:14:59 +00:00
|
|
|
xattributes.colormap = GDK_COLORMAP_XCOLORMAP (private->drawable.colormap);
|
1997-11-24 22:37:52 +00:00
|
|
|
xattributes_mask |= CWColormap;
|
|
|
|
break;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
case GDK_WINDOW_DIALOG:
|
1999-11-08 20:14:59 +00:00
|
|
|
xattributes.colormap = GDK_COLORMAP_XCOLORMAP (private->drawable.colormap);
|
1997-11-24 22:37:52 +00:00
|
|
|
xattributes_mask |= CWColormap;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
xparent = gdk_root_window;
|
|
|
|
break;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
case GDK_WINDOW_TEMP:
|
1999-11-08 20:14:59 +00:00
|
|
|
xattributes.colormap = GDK_COLORMAP_XCOLORMAP (private->drawable.colormap);
|
1997-11-24 22:37:52 +00:00
|
|
|
xattributes_mask |= CWColormap;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
xparent = gdk_root_window;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
xattributes.save_under = True;
|
|
|
|
xattributes.override_redirect = True;
|
|
|
|
xattributes.cursor = None;
|
|
|
|
xattributes_mask |= CWSaveUnder | CWOverrideRedirect;
|
|
|
|
break;
|
|
|
|
case GDK_WINDOW_ROOT:
|
|
|
|
g_error ("cannot make windows of type GDK_WINDOW_ROOT");
|
|
|
|
break;
|
|
|
|
case GDK_WINDOW_PIXMAP:
|
|
|
|
g_error ("cannot make windows of type GDK_WINDOW_PIXMAP (use gdk_pixmap_new)");
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
1998-01-17 23:35:52 +00:00
|
|
|
depth = 0;
|
1997-11-24 22:37:52 +00:00
|
|
|
class = InputOnly;
|
1999-10-03 22:12:41 +00:00
|
|
|
private->drawable.colormap = NULL;
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
1999-11-08 20:14:59 +00:00
|
|
|
|
|
|
|
GDK_DRAWABLE_XDATA (private)->xid = XCreateWindow (GDK_DRAWABLE_XDISPLAY (parent),
|
|
|
|
xparent,
|
|
|
|
x, y, private->drawable.width, private->drawable.height,
|
|
|
|
0, depth, class, xvisual,
|
|
|
|
xattributes_mask, &xattributes);
|
|
|
|
gdk_drawable_ref (window);
|
|
|
|
gdk_xid_table_insert (&GDK_DRAWABLE_XID (window), window);
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1999-10-03 22:12:41 +00:00
|
|
|
if (private->drawable.colormap)
|
|
|
|
gdk_colormap_ref (private->drawable.colormap);
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1998-04-07 23:59:25 +00:00
|
|
|
gdk_window_set_cursor (window, ((attributes_mask & GDK_WA_CURSOR) ?
|
|
|
|
(attributes->cursor) :
|
|
|
|
NULL));
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1999-01-27 18:21:20 +00:00
|
|
|
if (parent_private)
|
|
|
|
parent_private->children = g_list_prepend (parent_private->children, window);
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1999-10-03 22:12:41 +00:00
|
|
|
switch (private->drawable.window_type)
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
|
|
|
case GDK_WINDOW_DIALOG:
|
1999-11-08 20:14:59 +00:00
|
|
|
XSetTransientForHint (GDK_DRAWABLE_XDISPLAY (window),
|
|
|
|
GDK_DRAWABLE_XID (window),
|
|
|
|
xparent);
|
1997-11-24 22:37:52 +00:00
|
|
|
case GDK_WINDOW_TOPLEVEL:
|
|
|
|
case GDK_WINDOW_TEMP:
|
1999-11-08 20:14:59 +00:00
|
|
|
XSetWMProtocols (GDK_DRAWABLE_XDISPLAY (window),
|
|
|
|
GDK_DRAWABLE_XID (window),
|
|
|
|
gdk_wm_window_protocols, 2);
|
1997-11-24 22:37:52 +00:00
|
|
|
break;
|
|
|
|
case GDK_WINDOW_CHILD:
|
|
|
|
if ((attributes->wclass == GDK_INPUT_OUTPUT) &&
|
1999-10-03 22:12:41 +00:00
|
|
|
(private->drawable.colormap != gdk_colormap_get_system ()) &&
|
|
|
|
(private->drawable.colormap != gdk_window_get_colormap (gdk_window_get_toplevel (window))))
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
1998-08-18 03:59:41 +00:00
|
|
|
GDK_NOTE (MISC, g_message ("adding colormap window\n"));
|
1997-11-24 22:37:52 +00:00
|
|
|
gdk_window_add_colormap_windows (window);
|
|
|
|
}
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1998-04-07 23:59:25 +00:00
|
|
|
return window;
|
1997-11-24 22:37:52 +00:00
|
|
|
default:
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1998-04-07 23:59:25 +00:00
|
|
|
return window;
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1998-04-07 23:59:25 +00:00
|
|
|
size_hints.flags = PSize;
|
1999-10-03 22:12:41 +00:00
|
|
|
size_hints.width = private->drawable.width;
|
|
|
|
size_hints.height = private->drawable.height;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
wm_hints.flags = InputHint | StateHint | WindowGroupHint;
|
|
|
|
wm_hints.window_group = gdk_leader_window;
|
|
|
|
wm_hints.input = True;
|
|
|
|
wm_hints.initial_state = NormalState;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1998-04-07 23:59:25 +00:00
|
|
|
/* FIXME: Is there any point in doing this? Do any WM's pay
|
|
|
|
* attention to PSize, and even if they do, is this the
|
|
|
|
* correct value???
|
|
|
|
*/
|
1999-11-08 20:14:59 +00:00
|
|
|
XSetWMNormalHints (GDK_DRAWABLE_XDISPLAY (window),
|
|
|
|
GDK_DRAWABLE_XID (window),
|
|
|
|
&size_hints);
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1999-11-08 20:14:59 +00:00
|
|
|
XSetWMHints (GDK_DRAWABLE_XDISPLAY (window),
|
|
|
|
GDK_DRAWABLE_XID (window),
|
|
|
|
&wm_hints);
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1999-01-17 22:58:59 +00:00
|
|
|
if (!wm_client_leader_atom)
|
1999-02-10 08:06:30 +00:00
|
|
|
wm_client_leader_atom = gdk_atom_intern ("WM_CLIENT_LEADER", FALSE);
|
|
|
|
|
1999-11-08 20:14:59 +00:00
|
|
|
XChangeProperty (GDK_DRAWABLE_XDISPLAY (window),
|
|
|
|
GDK_DRAWABLE_XID (window),
|
1999-01-17 22:58:59 +00:00
|
|
|
wm_client_leader_atom,
|
|
|
|
XA_WINDOW, 32, PropModeReplace,
|
|
|
|
(guchar*) &gdk_leader_window, 1);
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
if (attributes_mask & GDK_WA_TITLE)
|
|
|
|
title = attributes->title;
|
|
|
|
else
|
1998-08-18 16:58:09 +00:00
|
|
|
title = g_get_prgname ();
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1999-11-08 20:14:59 +00:00
|
|
|
XmbSetWMProperties (GDK_DRAWABLE_XDISPLAY (window),
|
|
|
|
GDK_DRAWABLE_XID (window),
|
1997-11-27 04:16:39 +00:00
|
|
|
title, title,
|
|
|
|
NULL, 0,
|
|
|
|
NULL, NULL, NULL);
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
if (attributes_mask & GDK_WA_WMCLASS)
|
|
|
|
{
|
|
|
|
class_hint = XAllocClassHint ();
|
|
|
|
class_hint->res_name = attributes->wmclass_name;
|
|
|
|
class_hint->res_class = attributes->wmclass_class;
|
1999-11-08 20:14:59 +00:00
|
|
|
XSetClassHint (GDK_DRAWABLE_XDISPLAY (window),
|
|
|
|
GDK_DRAWABLE_XID (window),
|
|
|
|
class_hint);
|
1997-11-24 22:37:52 +00:00
|
|
|
XFree (class_hint);
|
|
|
|
}
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
return window;
|
|
|
|
}
|
|
|
|
|
|
|
|
GdkWindow *
|
|
|
|
gdk_window_foreign_new (guint32 anid)
|
|
|
|
{
|
|
|
|
GdkWindow *window;
|
|
|
|
GdkWindowPrivate *private;
|
1998-05-01 04:23:59 +00:00
|
|
|
GdkWindowPrivate *parent_private;
|
1997-11-24 22:37:52 +00:00
|
|
|
XWindowAttributes attrs;
|
1998-03-14 05:15:16 +00:00
|
|
|
Window root, parent;
|
1998-07-16 19:41:12 +00:00
|
|
|
Window *children = NULL;
|
1998-03-14 05:15:16 +00:00
|
|
|
guint nchildren;
|
1999-02-21 19:25:53 +00:00
|
|
|
gboolean result;
|
|
|
|
|
|
|
|
gdk_error_trap_push ();
|
|
|
|
result = XGetWindowAttributes (gdk_display, anid, &attrs);
|
|
|
|
if (gdk_error_trap_pop () || !result)
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
/* FIXME: This is pretty expensive. Maybe the caller should supply
|
|
|
|
* the parent */
|
|
|
|
gdk_error_trap_push ();
|
|
|
|
result = XQueryTree (gdk_display, anid, &root, &parent, &children, &nchildren);
|
|
|
|
if (gdk_error_trap_pop () || !result)
|
1998-07-16 19:41:12 +00:00
|
|
|
return NULL;
|
1999-11-08 20:14:59 +00:00
|
|
|
|
1998-07-04 15:31:30 +00:00
|
|
|
if (children)
|
|
|
|
XFree (children);
|
1999-11-08 20:14:59 +00:00
|
|
|
|
|
|
|
window = gdk_x11_window_alloc ();
|
|
|
|
private = (GdkWindowPrivate *)window;
|
|
|
|
|
1998-03-14 05:15:16 +00:00
|
|
|
private->parent = gdk_xid_table_lookup (parent);
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1998-05-01 04:23:59 +00:00
|
|
|
parent_private = (GdkWindowPrivate *)private->parent;
|
|
|
|
|
|
|
|
if (parent_private)
|
|
|
|
parent_private->children = g_list_prepend (parent_private->children, window);
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1999-11-08 20:14:59 +00:00
|
|
|
GDK_DRAWABLE_XDATA (window)->xid = anid;
|
|
|
|
GDK_DRAWABLE_XDATA (window)->xdisplay = GDK_DRAWABLE_XDISPLAY (parent);
|
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
private->x = attrs.x;
|
|
|
|
private->y = attrs.y;
|
1999-10-03 22:12:41 +00:00
|
|
|
private->drawable.width = attrs.width;
|
|
|
|
private->drawable.height = attrs.height;
|
|
|
|
private->drawable.window_type = GDK_WINDOW_FOREIGN;
|
|
|
|
private->drawable.destroyed = FALSE;
|
1999-01-15 16:00:39 +00:00
|
|
|
private->mapped = (attrs.map_state != IsUnmapped);
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1999-11-08 20:14:59 +00:00
|
|
|
gdk_drawable_ref (window);
|
|
|
|
gdk_xid_table_insert (&GDK_DRAWABLE_XID (window), window);
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
return window;
|
|
|
|
}
|
|
|
|
|
1997-12-18 02:17:14 +00:00
|
|
|
/* Call this function when you want a window and all its children to
|
1999-01-15 18:41:43 +00:00
|
|
|
* disappear. When xdestroy is true, a request to destroy the XWindow
|
|
|
|
* is sent out. When it is false, it is assumed that the XWindow has
|
|
|
|
* been or will be destroyed by destroying some ancestor of this
|
|
|
|
* window.
|
|
|
|
*/
|
1997-12-18 02:17:14 +00:00
|
|
|
static void
|
1999-01-15 18:41:43 +00:00
|
|
|
gdk_window_internal_destroy (GdkWindow *window,
|
|
|
|
gboolean xdestroy,
|
|
|
|
gboolean our_destroy)
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
|
|
|
GdkWindowPrivate *private;
|
|
|
|
GdkWindowPrivate *temp_private;
|
|
|
|
GdkWindow *temp_window;
|
|
|
|
GList *children;
|
|
|
|
GList *tmp;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
g_return_if_fail (window != NULL);
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
private = (GdkWindowPrivate*) window;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1999-10-03 22:12:41 +00:00
|
|
|
switch (private->drawable.window_type)
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
|
|
|
case GDK_WINDOW_TOPLEVEL:
|
|
|
|
case GDK_WINDOW_CHILD:
|
|
|
|
case GDK_WINDOW_DIALOG:
|
|
|
|
case GDK_WINDOW_TEMP:
|
1998-03-14 05:15:16 +00:00
|
|
|
case GDK_WINDOW_FOREIGN:
|
1999-10-03 22:12:41 +00:00
|
|
|
if (!private->drawable.destroyed)
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
1998-05-01 04:23:59 +00:00
|
|
|
if (private->parent)
|
|
|
|
{
|
|
|
|
GdkWindowPrivate *parent_private = (GdkWindowPrivate *)private->parent;
|
|
|
|
if (parent_private->children)
|
|
|
|
parent_private->children = g_list_remove (parent_private->children, window);
|
|
|
|
}
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1999-10-03 22:12:41 +00:00
|
|
|
if (GDK_DRAWABLE_TYPE (window) != GDK_WINDOW_FOREIGN)
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
1998-05-01 04:23:59 +00:00
|
|
|
children = tmp = private->children;
|
|
|
|
private->children = NULL;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1998-03-14 05:15:16 +00:00
|
|
|
while (tmp)
|
|
|
|
{
|
|
|
|
temp_window = tmp->data;
|
|
|
|
tmp = tmp->next;
|
|
|
|
|
|
|
|
temp_private = (GdkWindowPrivate*) temp_window;
|
|
|
|
if (temp_private)
|
|
|
|
gdk_window_internal_destroy (temp_window, FALSE,
|
|
|
|
our_destroy);
|
|
|
|
}
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1998-03-14 05:15:16 +00:00
|
|
|
g_list_free (children);
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1998-02-03 20:57:40 +00:00
|
|
|
if (private->extension_events != 0)
|
|
|
|
gdk_input_window_destroy (window);
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1998-03-14 05:15:16 +00:00
|
|
|
if (private->filters)
|
|
|
|
{
|
|
|
|
tmp = private->filters;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1998-03-14 05:15:16 +00:00
|
|
|
while (tmp)
|
|
|
|
{
|
|
|
|
g_free (tmp->data);
|
|
|
|
tmp = tmp->next;
|
|
|
|
}
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1998-03-14 05:15:16 +00:00
|
|
|
g_list_free (private->filters);
|
|
|
|
private->filters = NULL;
|
|
|
|
}
|
|
|
|
|
1999-10-03 22:12:41 +00:00
|
|
|
if (private->drawable.window_type == GDK_WINDOW_FOREIGN)
|
1998-03-14 05:15:16 +00:00
|
|
|
{
|
|
|
|
if (our_destroy && (private->parent != NULL))
|
|
|
|
{
|
|
|
|
/* It's somebody elses window, but in our heirarchy,
|
|
|
|
* so reparent it to the root window, and then send
|
|
|
|
* it a delete event, as if we were a WM
|
|
|
|
*/
|
|
|
|
XClientMessageEvent xevent;
|
1999-02-21 19:25:53 +00:00
|
|
|
|
|
|
|
gdk_error_trap_push ();
|
1998-03-14 05:15:16 +00:00
|
|
|
gdk_window_hide (window);
|
|
|
|
gdk_window_reparent (window, NULL, 0, 0);
|
|
|
|
|
|
|
|
xevent.type = ClientMessage;
|
1999-11-08 20:14:59 +00:00
|
|
|
xevent.window = GDK_DRAWABLE_XID (window);
|
1998-03-14 05:15:16 +00:00
|
|
|
xevent.message_type = gdk_wm_protocols;
|
|
|
|
xevent.format = 32;
|
|
|
|
xevent.data.l[0] = gdk_wm_delete_window;
|
|
|
|
xevent.data.l[1] = CurrentTime;
|
1999-02-21 19:25:53 +00:00
|
|
|
|
1999-11-08 20:14:59 +00:00
|
|
|
XSendEvent (GDK_DRAWABLE_XDISPLAY (window),
|
|
|
|
GDK_DRAWABLE_XID (window),
|
1998-03-14 05:15:16 +00:00
|
|
|
False, 0, (XEvent *)&xevent);
|
1999-02-21 19:25:53 +00:00
|
|
|
gdk_flush ();
|
|
|
|
gdk_error_trap_pop ();
|
1998-03-14 05:15:16 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (xdestroy)
|
1999-11-08 20:14:59 +00:00
|
|
|
XDestroyWindow (GDK_DRAWABLE_XDISPLAY (window),
|
|
|
|
GDK_DRAWABLE_XID (window));
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1999-10-03 22:12:41 +00:00
|
|
|
if (private->drawable.colormap)
|
|
|
|
gdk_colormap_unref (private->drawable.colormap);
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1999-01-15 18:41:43 +00:00
|
|
|
private->mapped = FALSE;
|
1999-10-03 22:12:41 +00:00
|
|
|
private->drawable.destroyed = TRUE;
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
|
|
|
break;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
case GDK_WINDOW_ROOT:
|
|
|
|
g_error ("attempted to destroy root window");
|
|
|
|
break;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
case GDK_WINDOW_PIXMAP:
|
1997-12-18 02:17:14 +00:00
|
|
|
g_error ("called gdk_window_destroy on a pixmap (use gdk_pixmap_unref)");
|
1997-11-24 22:37:52 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
1997-12-18 02:17:14 +00:00
|
|
|
/* Like internal_destroy, but also destroys the reference created by
|
|
|
|
gdk_window_new. */
|
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
void
|
1997-12-18 02:17:14 +00:00
|
|
|
gdk_window_destroy (GdkWindow *window)
|
|
|
|
{
|
1998-03-14 05:15:16 +00:00
|
|
|
gdk_window_internal_destroy (window, TRUE, TRUE);
|
1999-11-08 20:14:59 +00:00
|
|
|
gdk_drawable_unref (window);
|
1997-12-18 02:17:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* This function is called when the XWindow is really gone. */
|
|
|
|
|
|
|
|
void
|
|
|
|
gdk_window_destroy_notify (GdkWindow *window)
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
|
|
|
g_return_if_fail (window != NULL);
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1999-10-03 22:12:41 +00:00
|
|
|
if (!GDK_DRAWABLE_DESTROYED (window))
|
1998-03-14 05:15:16 +00:00
|
|
|
{
|
1999-10-03 22:12:41 +00:00
|
|
|
if (GDK_DRAWABLE_TYPE(window) != GDK_WINDOW_FOREIGN)
|
|
|
|
g_warning ("GdkWindow %#lx unexpectedly destroyed", GDK_DRAWABLE_XID (window));
|
[ Merges from gtk-1-2 ]
Wed Sep 8 07:13:29 1999 Tim Janik <timj@gtk.org>
* configure.in: fixed "GNU Make" check to pass with new make version
3.77.95.
Fri Sep 3 16:04:41 1999 Tim Janik <timj@gtk.org>
* gtk-config.in (--version): don't echo @GTK_VERSION@, but
@GTK_MAJOR_VERSION@.@GTK_MINOR_VERSION@.@GTK_MICRO_VERSION@, so the
AM_PATH_GTK() macros don't get confused by the -pre1.
Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (REBUILD): Change check for perl5
to check explicitely for v >= 5.002. (5.001
does not work with our scripts.)
Wed Aug 25 15:45:46 1999 Tim Janik <timj@gtk.org>
* configure.in: evaluate $PERL for the perl version check. added
--disable-rebuilds to give the user an option to completely disable
any source autogeneration rules.
Mon Aug 23 23:16:14 1999 Tim Janik <timj@gtk.org>
* configure.in: evaluate $ac_make when checking for GNU Make.
Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
* docs/Makefile.am: added generation.txt.
* Makefile.am: require automake 1.4, build README from README.in and
INSTALL from INSTALL.in in dist-hook.
* README.in:
* INSTALL.in: new files to autogenerate README and INSTALL from.
* configure.in: figure whether we have GNU Make
* docs/generation.txt: minor additions/corrections.
Wed Aug 11 13:38:26 BST 1999 Tony Gale <gale@gtk.org>
* docs/gtkfaq.sgml: FAQ Update
July 30, 1999 Elliot Lee <sopwith@redhat.com>
* configure.in: Fix autoconf warnings about cross compilation by
trying to provide sane defaults for AC_TRY_RUN.
Fri Jul 16 22:20:21 PDT 1999 Manish Singh <yosh@gimp.org>
* ltconfig
* ltmain.sh: upgrade to libtool 1.3.3
Thu Jul 8 11:30:18 1999 Owen Taylor <otaylor@redhat.com>
* INSTALL: Indicate that the --with-glib= configure
time flag is unsupported.
Mon Jul 5 20:36:03 1999 Owen Taylor <otaylor@redhat.com>
* docs/generation.txt: Added a file that gives
documenation about the autogeneration process for
various autogenerated files.
Tue Jun 29 15:59:25 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (LIBS): Look for libgmodule in the
right location.
Thu Jun 17 13:57:31 1999 Owen Taylor <otaylor@redhat.com>
* docs/gtk_tut.sgml: Removed references to
code examples in my directory on gtk.org as
they should all be in the tutorial now.
* docs/gtk_tut.sgml: Added sources for dial-test
and scribble-xinput programs that were previously
missing.
Fri Jun 4 00:08:59 1999 Owen Taylor <otaylor@redhat.com>
* TODO: Added entry about menu keyboard navigation, removed
some finished items.
Mon May 31 00:11:24 1999 Owen Taylor <otaylor@redhat.com>
* acinclude.m4: Standardize on func_dgettext
not func_gettext, so that the checks for dgettext
actually are paid attention to.
Wed May 5 10:47:54 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (LIBS): Add $INTLLIBS into $LIBS
directly, rather than repeating the checks for
gettext.
* INSTALL: Added information about gettext and
NLS support.
* acinclude.m4 (LIBM): Check for dgettext, not
just gettext. This should hopefully fix things wrt
systems with old versions of GNU gettext installed.
Tue Jun 29 15:59:25 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (LIBS): Look for libgmodule in the
right location.
Thu Apr 1 16:58:10 PST 1999 Manish Singh <yosh@gimp.org>
* autogen.sh: add --enable-maintainer-mode
* configure.in: set ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
Wed Mar 24 23:03:49 CST 1999 Shawn T. Amundson <amundson@gtk.org>
* docs/gtk-config.1.in:
docs/Makefile.am:
configure.in: gtk-config is now generated.
* docs/gtk-config.1: Removed, now generated.
Thu Sep 23 17:59:59 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): grr, even if Gdk doesn't
handle CreateNotify itself, still put out a debuging message for
--gdk-debug=events. made the ReparentNotify debugging message more
verbose.
wrap xcoords translation for ConfigureEvents into an error trap,
a destroy event may already be pending, and in that case, the
actuall coordinate values are not at all critical.
Sat Sep 18 22:24:15 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkcc.c: Stop leaking the color_hash all over
the place. Simplify and improve the logic.
Fri Sep 17 09:57:15 1999 Tim Janik <timj@gtk.org>
* gdk/gdk.h, gdk/gdkcolor.c: make return types (gint or gboolean)
for prototypes and function implementations consistent (reported
by Tomas Ogren).
Tue Sep 14 18:23:01 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): tell if expose events have
send_event set in debugging output.
(gdk_compress_exposures): default initialize the event so we don't
operate on bogus values (namely send_event).
Thu Sep 2 16:33:59 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c: When we receive an unexpected
destroy notify on one of our windows, don't just
warn about it, also mark our windows as destroyed.
Sun Sep 5 08:10:53 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkfont.c (gdk_font_hash_insert): Add
name => font and name => fontset hashes. The
name => fontset hash is a _big_ win since we
weren't previously caching fontsets at all and loading
fontsets is expensive. The name => font hash
is less of a win, but it does save us from doing
repeated XQueryFont calls on the same font.
* gdk/gdkprivate.h (struct _GdkFontPrivate): Add a names
list so we can remove font/fontset from hash.
Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_atom_intern): Remove useless
and slightly confusing test. [ XInternAtom (,,TRUE)
will never return None ].
Sat Sep 4 08:39:26 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_set_geometry_hints)
gdk/gdkwindow.c (gdk_window_set_hints):
Don't omit setting the properties if flags == 0 -
there may be an existing set of properties there
already. (Very old bug. Would it be better to
delete the property instead?)
* gdk/gdkselection.c (gdk_selection_property_get): Fix
spelling error in comment.
Wed Sep 1 14:05:30 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkimage.c (gdk_image_new): Use gdk_error_trap_push()
to avoid stomping over gdk_error_warnings.
* gdk/gdkimage.c (gdk_image_new): compute image->bpp
as (bits_per_pixel + 7) / 8. This gives the same
result as before for multiples of 8, but actually
a "reasonable" value for 1bit or 4bit displays.
Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
* gdk/Makefile.am: minor cleanups, strip spaces on build rules for
GNU Make.
Tue Aug 17 07:43:04 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): give a debugging note when
discarding configure events.
1999-08-18 Federico Mena Quintero <federico@redhat.com>
* gdk/gdkpixmap.c (gdk_pixmap_unref): g_return_if_fail() the
refcount is greater than zero.
* gdk/gdkwindow.c (gdk_window_unref): Likewise.
* gdk/gdkfont.c (gdk_font_unref): Likewise.
* gdk/gdkgc.c (gdk_gc_unref): Likewise.
* gdk/gdkdnd.c (gdk_drag_context_unref): Likewise.
Wed Aug 11 01:04:57 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_property_get): Fix assumption
that format 32 => sizeof(item) == 4. It really is
sizeof(long).
Tue Jun 29 23:02:42 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c (gdk_x_error / gdk_x_io_error): Don't
core dump at all on X IO errors, only core dump
if --enable-debug for X errors.
Thu Jun 24 17:06:23 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): removed old ""Got event for
unknown window:" message. disabled ConfigureNotify discarding code,
because it led to events being processed out of order.
Thu Jun 24 12:22:02 1999 Tim Janik <timj@gtk.org>
* gdk/gdkglobals.c: preinitialize gdk_error_code to 0.
* gdk/gdkevents.c (gdk_event_send_client_message_to_all_recurse): since
we export this function, supress error warnings and don't reset the
error code in the first half of this function.
* gdk/gdk.c (gdk_x_error): set gdk_error_code to the actuall X error
code (instead of just -1) so gdk_error_trap_pop() reveals something
actually informative about the error that happened.
* gdk/*.c:
don't rely on gdk_error_code being -1 if an error occoured, but just
gdk_error_code != 0.
Thu Jun 24 11:50:07 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_apply_filters): advance the filter list
pointer *before* invoking the filter function, so we at least don't
crash if a filter is removed that is currently executed. window filters
*really* need to be made truely reentrant at some point.
Mon Jun 14 11:10:15 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): print the atom name in the
PropertyNotify debug messages.
Wed May 5 22:51:06 1999 Owen Taylor <otaylor@redhat.com>
Patch from Sung-Hyun Nam <namsh@lgic.co.kr>
* gdk/gdkim.c: Fix cut-and-paste errors for
x/y and PreeditAttributes/StatusAttributes.
Wed May 5 22:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_set_geometry_hints): Change
G_MAXINT to 2^16 to alleviate overflow problems in
various window managers.
Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkfont.c (gdk_text_measure): Fix the return value
for fontsets.
Wed May 5 12:42:01 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_set_geometry_hints):
Initialize size_hints.x and size_hints.y because kwm
brokenly pays attention to them.
(Bug #1181 - Lars Heete <hel@admin.de>)
Wed May 5 11:38:56 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkrgb.c (gdk_rgb_choose_visual): Free the
return value of gdk_list_visuals().
(Bug #1193 - Morten Welinder <terra@diku.dk>)
Tue May 4 11:12:56 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkim.c (gdk_im_real_open): cast the return value of
XSetIMValues to (void *) when comparing to NULL, to workaround
the problem of some compilers barfing since older X headers don't
have the prototype for it.
Mon Apr 19 10:11:12 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkcolor.c (gdk_colormap_new): Fix memory leak
for pseudocolor where colormap->colors was double
allocated.
* gdk/gdkcolor.c (gdk_colormap_alloc1): Store the
color value in the hash table with the pixel filled
in so when we do later hash table lookups, the color
value is correct.
Sun May 2 15:29:45 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkdraw.c (gdk_draw_lines): check private->destroyed before
making the call
Tue Apr 27 11:17:35 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.c (xdnd_set_{targets,actions}): Fix leak
pointed out by Morten Welinder <terra@diku.dk>.
Wed Apr 21 14:20:22 1999 George Lebl <jirka@5z.com>
* gdk/gdkwindow.c: (gdk_window_remove_filter) correctly remove the
default filter from the list
Wed Apr 21 14:20:22 1999 George Lebl <jirka@5z.com>
* gdk/gdkwindow.c: (gdk_window_remove_filter) correctly remove the
default filter from the list
Fri Apr 16 20:41:43 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdk.c: #include "gdkkeysyms.h" for gdk_XConvertCase #defines
* gtk/gtkfontsel.c (gtk_font_selection_create_xlfd): use
g_strdup_printf instead of calcing the length separately
Tue Apr 13 02:49:33 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c: removed some silly #ifdef HAVE_CONFIG
that we don't do in many other places. (Fixing duplicate
#include of config.h)
* gdk/gdkevents.c: include gdkinput.h _after_ config.h.
Otherwise, #ifndef XINPUT_NONE check in the latter
doesn't work. (Bug #546)
Sun Apr 11 14:38:03 1999 Tim Janik <timj@gtk.org>
* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): check for color
"None" case insensitive.
Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkselection.c:
Add error traps so if the other end of the connection
dies, we survive.
Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.c (gdk_drag_motion): Separate out the
dest_xid field into two fields - one for the window
to send in messages, one to indicate the last looked
up window for caching purposes. This is needed, so
that Leave messages get the correct window.
Mon Apr 5 13:21:30 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkevents.c (gdk_event_check, gdk_event_prepare):
Fix warning created by people mucking around
with the gsource API.
* gdk/gdkevents.c (gdk_io_invoke, gdk_input_add_full):
Change mapping between GIOCondition and GdkInputCondition
to match the way the Linux kernel does it. This should
fix problems where closed pipes were no longer signalling
GDK_INPUT_READ on systems with a native poll().
Mon Apr 5 17:11:57 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): Check
explicitly for the string "None" - it is in the XPM
spec and some servers treat unknown colors in odd ways
(like asking the user!)
Thu Apr 1 16:58:10 PST 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkevents.c: made "->" into a "." of previous change so
it compiles
Thu Apr 1 18:41:25 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkevents.c (gdk_compress_exposures): Set the
window field of the event structure before calling
user filters.
1999-03-31 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gdk/gdk.c (gdk_init_check): Use False as the last argument to
XInternAtom() here. This is a particularly Old And Nasty(tm) bug.
Mon Mar 29 17:31:52 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkim.c (gdk_mbstowcs): Free the value of the
intermediate text property - prevents major memory
leak when gdk_use_mb.
gtk-d3august-990311-0: Bj|rn Augustsson <d3august@dtek.chalmers.se>
Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com>
Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
gtk-a-higuti-990322-[0-3]
* gdk/gdkfont.c (gdk_text_extents_wc): Make work when
sizeof(wchar_t) != sizeof (GdkWChar)
* configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS
that was causing -DX_LOCALE not to work.
* gtk/gtkrc.c (gtk_rc_init):
X_LOCALE will never have LC_MESSAGES defined
* gdk/gdk.c (gdk_init_check):
Remove --xim-preedit and --xim-status from argv properly.
* gdk/gdkim.c (gdk_ic_real_new): Add a gdk_flush() so
that the client window is present on the X server
before we pass it to the input method.
Tue Mar 9 10:46:49 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.c (motif_find_drag_window): Fix bug where
if --display is specified on the command line, than
the drag window will not be created on that display.
Tue Mar 9 10:38:24 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_atom_intern): Fixed bug where
lookups with only_if_exists == TRUE were inserting
bogus values into the atom cache.
Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org>
* gdk/gdkselection.c (gdk_selection_property_get): first XFree(t),
then reset it to NULL.
* gdk/gdkcolor.c:
(gdk_colors_free):
(gdk_colormap_free_colors): use colormap->colors[in_pixels[i]] as the
key for g_hash_table_remove() in both functions, this prevents us
from accessing possibly uninitialized portions of a GdkColor structure
where we are only interested in its pixel value.
Tue Mar 9 01:01:28 1999 Tim Janik <timj@gtk.org>
* gdk/gdkfont.c (gdk_font_load): first lookup the xfont ID in our
font hash table, if we have a GdkFontPrivate entry for this font
already, simply increment its reference count, provided by Olaf Dietsche
<olaf.dietsche+list.gtk@netcologne.de>.
1999-09-21 Tor Lillqvist <tml@iki.fi>
1999-09-28 20:19:13 +00:00
|
|
|
|
|
|
|
gdk_window_internal_destroy (window, FALSE, FALSE);
|
1998-03-14 05:15:16 +00:00
|
|
|
}
|
|
|
|
|
1999-10-03 22:12:41 +00:00
|
|
|
gdk_xid_table_remove (GDK_DRAWABLE_XID (window));
|
1999-11-08 20:14:59 +00:00
|
|
|
gdk_drawable_unref (window);
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
gdk_window_show (GdkWindow *window)
|
|
|
|
{
|
|
|
|
GdkWindowPrivate *private;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
g_return_if_fail (window != NULL);
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
private = (GdkWindowPrivate*) window;
|
1999-10-03 22:12:41 +00:00
|
|
|
if (!private->drawable.destroyed)
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
1999-01-15 16:00:39 +00:00
|
|
|
private->mapped = TRUE;
|
1999-11-08 20:14:59 +00:00
|
|
|
XRaiseWindow (GDK_DRAWABLE_XDISPLAY (window),
|
|
|
|
GDK_DRAWABLE_XID (window));
|
|
|
|
XMapWindow (GDK_DRAWABLE_XDISPLAY (window),
|
|
|
|
GDK_DRAWABLE_XID (window));
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
gdk_window_hide (GdkWindow *window)
|
|
|
|
{
|
|
|
|
GdkWindowPrivate *private;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
g_return_if_fail (window != NULL);
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
private = (GdkWindowPrivate*) window;
|
1999-10-03 22:12:41 +00:00
|
|
|
if (!private->drawable.destroyed)
|
1999-01-15 16:00:39 +00:00
|
|
|
{
|
|
|
|
private->mapped = FALSE;
|
1999-11-08 20:14:59 +00:00
|
|
|
XUnmapWindow (GDK_DRAWABLE_XDISPLAY (window),
|
|
|
|
GDK_DRAWABLE_XID (window));
|
1999-01-15 16:00:39 +00:00
|
|
|
}
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
|
|
|
|
1998-01-01 20:38:21 +00:00
|
|
|
void
|
|
|
|
gdk_window_withdraw (GdkWindow *window)
|
|
|
|
{
|
|
|
|
GdkWindowPrivate *private;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1998-01-01 20:38:21 +00:00
|
|
|
g_return_if_fail (window != NULL);
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1998-01-01 20:38:21 +00:00
|
|
|
private = (GdkWindowPrivate*) window;
|
1999-10-03 22:12:41 +00:00
|
|
|
if (!private->drawable.destroyed)
|
1999-11-08 20:14:59 +00:00
|
|
|
XWithdrawWindow (GDK_DRAWABLE_XDISPLAY (window),
|
|
|
|
GDK_DRAWABLE_XID (window), 0);
|
1998-01-01 20:38:21 +00:00
|
|
|
}
|
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
void
|
|
|
|
gdk_window_move (GdkWindow *window,
|
|
|
|
gint x,
|
|
|
|
gint y)
|
|
|
|
{
|
|
|
|
GdkWindowPrivate *private;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
g_return_if_fail (window != NULL);
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
private = (GdkWindowPrivate*) window;
|
1999-10-03 22:12:41 +00:00
|
|
|
if (!private->drawable.destroyed)
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
1999-11-08 20:14:59 +00:00
|
|
|
XMoveWindow (GDK_DRAWABLE_XDISPLAY (window),
|
|
|
|
GDK_DRAWABLE_XID (window),
|
|
|
|
x, y);
|
1998-01-26 01:20:14 +00:00
|
|
|
|
1999-10-03 22:12:41 +00:00
|
|
|
if (private->drawable.window_type == GDK_WINDOW_CHILD)
|
1998-01-26 01:20:14 +00:00
|
|
|
{
|
|
|
|
private->x = x;
|
|
|
|
private->y = y;
|
|
|
|
}
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
gdk_window_resize (GdkWindow *window,
|
|
|
|
gint width,
|
|
|
|
gint height)
|
|
|
|
{
|
|
|
|
GdkWindowPrivate *private;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
g_return_if_fail (window != NULL);
|
1999-10-03 22:12:41 +00:00
|
|
|
g_return_if_fail (GDK_IS_WINDOW (window));
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
if (width < 1)
|
|
|
|
width = 1;
|
|
|
|
if (height < 1)
|
|
|
|
height = 1;
|
1999-10-03 22:12:41 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
private = (GdkWindowPrivate*) window;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1999-10-03 22:12:41 +00:00
|
|
|
if (!private->drawable.destroyed &&
|
1997-11-24 22:37:52 +00:00
|
|
|
((private->resize_count > 0) ||
|
1999-10-03 22:12:41 +00:00
|
|
|
(private->drawable.width != (guint16) width) ||
|
|
|
|
(private->drawable.height != (guint16) height)))
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
1999-10-03 22:12:41 +00:00
|
|
|
XResizeWindow (GDK_DRAWABLE_XDISPLAY (private),
|
|
|
|
GDK_DRAWABLE_XID (private),
|
|
|
|
width, height);
|
1997-11-24 22:37:52 +00:00
|
|
|
private->resize_count += 1;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1999-10-03 22:12:41 +00:00
|
|
|
if (GDK_DRAWABLE_TYPE (private) == GDK_WINDOW_CHILD)
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
1999-10-03 22:12:41 +00:00
|
|
|
private->drawable.width = width;
|
|
|
|
private->drawable.height = height;
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
gdk_window_move_resize (GdkWindow *window,
|
|
|
|
gint x,
|
|
|
|
gint y,
|
|
|
|
gint width,
|
|
|
|
gint height)
|
|
|
|
{
|
|
|
|
GdkWindowPrivate *private;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
g_return_if_fail (window != NULL);
|
1999-10-03 22:12:41 +00:00
|
|
|
g_return_if_fail (GDK_IS_WINDOW (window));
|
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
if (width < 1)
|
|
|
|
width = 1;
|
|
|
|
if (height < 1)
|
|
|
|
height = 1;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
private = (GdkWindowPrivate*) window;
|
1999-10-03 22:12:41 +00:00
|
|
|
|
|
|
|
if (!GDK_DRAWABLE_DESTROYED (window))
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
1999-10-03 22:12:41 +00:00
|
|
|
XMoveResizeWindow (GDK_DRAWABLE_XDISPLAY (window),
|
|
|
|
GDK_DRAWABLE_XID (window),
|
|
|
|
x, y, width, height);
|
1998-01-26 01:20:14 +00:00
|
|
|
|
1999-02-05 18:40:14 +00:00
|
|
|
if (private->guffaw_gravity)
|
|
|
|
{
|
|
|
|
GList *tmp_list = private->children;
|
|
|
|
while (tmp_list)
|
|
|
|
{
|
|
|
|
GdkWindowPrivate *child_private = tmp_list->data;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1999-02-05 18:40:14 +00:00
|
|
|
child_private->x -= x - private->x;
|
|
|
|
child_private->y -= y - private->y;
|
|
|
|
|
|
|
|
tmp_list = tmp_list->next;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
1999-10-03 22:12:41 +00:00
|
|
|
if (GDK_DRAWABLE_TYPE (private) == GDK_WINDOW_CHILD)
|
1998-01-26 01:20:14 +00:00
|
|
|
{
|
|
|
|
private->x = x;
|
|
|
|
private->y = y;
|
1999-10-03 22:12:41 +00:00
|
|
|
private->drawable.width = width;
|
|
|
|
private->drawable.height = height;
|
1998-01-26 01:20:14 +00:00
|
|
|
}
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
gdk_window_reparent (GdkWindow *window,
|
|
|
|
GdkWindow *new_parent,
|
|
|
|
gint x,
|
|
|
|
gint y)
|
|
|
|
{
|
|
|
|
GdkWindowPrivate *window_private;
|
|
|
|
GdkWindowPrivate *parent_private;
|
1998-06-13 01:36:28 +00:00
|
|
|
GdkWindowPrivate *old_parent_private;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
g_return_if_fail (window != NULL);
|
1999-10-03 22:12:41 +00:00
|
|
|
g_return_if_fail (GDK_IS_WINDOW (window));
|
|
|
|
g_return_if_fail (new_parent != NULL);
|
|
|
|
g_return_if_fail (GDK_IS_WINDOW (new_parent));
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
if (!new_parent)
|
1999-11-08 20:14:59 +00:00
|
|
|
new_parent = gdk_parent_root;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
window_private = (GdkWindowPrivate*) window;
|
1998-06-13 01:36:28 +00:00
|
|
|
old_parent_private = (GdkWindowPrivate*)window_private->parent;
|
1997-11-24 22:37:52 +00:00
|
|
|
parent_private = (GdkWindowPrivate*) new_parent;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1999-10-03 22:12:41 +00:00
|
|
|
if (!GDK_DRAWABLE_DESTROYED (window) && !GDK_DRAWABLE_DESTROYED (new_parent))
|
|
|
|
XReparentWindow (GDK_DRAWABLE_XDISPLAY (window),
|
|
|
|
GDK_DRAWABLE_XID (window),
|
|
|
|
GDK_DRAWABLE_XID (new_parent),
|
1998-01-26 01:20:14 +00:00
|
|
|
x, y);
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1998-08-02 07:15:00 +00:00
|
|
|
window_private->parent = new_parent;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1998-07-13 19:43:33 +00:00
|
|
|
if (old_parent_private)
|
|
|
|
old_parent_private->children = g_list_remove (old_parent_private->children, window);
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1999-01-27 18:21:20 +00:00
|
|
|
if ((old_parent_private &&
|
|
|
|
(!old_parent_private->guffaw_gravity != !parent_private->guffaw_gravity)) ||
|
|
|
|
(!old_parent_private && parent_private->guffaw_gravity))
|
|
|
|
gdk_window_set_static_win_gravity (window, parent_private->guffaw_gravity);
|
1998-06-13 01:36:28 +00:00
|
|
|
|
1999-01-27 18:21:20 +00:00
|
|
|
parent_private->children = g_list_prepend (parent_private->children, window);
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
gdk_window_clear (GdkWindow *window)
|
|
|
|
{
|
|
|
|
g_return_if_fail (window != NULL);
|
1999-10-03 22:12:41 +00:00
|
|
|
g_return_if_fail (GDK_IS_WINDOW (window));
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1999-10-03 22:12:41 +00:00
|
|
|
if (!GDK_DRAWABLE_DESTROYED (window))
|
|
|
|
XClearWindow (GDK_DRAWABLE_XDISPLAY (window), GDK_DRAWABLE_XID (window));
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
gdk_window_clear_area (GdkWindow *window,
|
|
|
|
gint x,
|
|
|
|
gint y,
|
|
|
|
gint width,
|
|
|
|
gint height)
|
|
|
|
{
|
|
|
|
g_return_if_fail (window != NULL);
|
1999-10-03 22:12:41 +00:00
|
|
|
g_return_if_fail (GDK_IS_WINDOW (window));
|
1998-01-26 01:20:14 +00:00
|
|
|
|
1999-10-03 22:12:41 +00:00
|
|
|
if (!GDK_DRAWABLE_DESTROYED (window))
|
|
|
|
XClearArea (GDK_DRAWABLE_XDISPLAY (window), GDK_DRAWABLE_XID (window),
|
1997-11-24 22:37:52 +00:00
|
|
|
x, y, width, height, False);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
gdk_window_clear_area_e (GdkWindow *window,
|
|
|
|
gint x,
|
|
|
|
gint y,
|
|
|
|
gint width,
|
|
|
|
gint height)
|
|
|
|
{
|
|
|
|
g_return_if_fail (window != NULL);
|
1999-10-03 22:12:41 +00:00
|
|
|
g_return_if_fail (GDK_IS_WINDOW (window));
|
1998-01-26 01:20:14 +00:00
|
|
|
|
1999-10-03 22:12:41 +00:00
|
|
|
if (!GDK_DRAWABLE_DESTROYED (window))
|
|
|
|
XClearArea (GDK_DRAWABLE_XDISPLAY (window), GDK_DRAWABLE_XID (window),
|
1997-11-24 22:37:52 +00:00
|
|
|
x, y, width, height, True);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
gdk_window_raise (GdkWindow *window)
|
|
|
|
{
|
|
|
|
g_return_if_fail (window != NULL);
|
1999-10-03 22:12:41 +00:00
|
|
|
g_return_if_fail (GDK_IS_WINDOW (window));
|
1998-03-08 03:32:05 +00:00
|
|
|
|
1999-10-03 22:12:41 +00:00
|
|
|
if (!GDK_DRAWABLE_DESTROYED (window))
|
|
|
|
XRaiseWindow (GDK_DRAWABLE_XDISPLAY (window), GDK_DRAWABLE_XID (window));
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
gdk_window_lower (GdkWindow *window)
|
|
|
|
{
|
|
|
|
g_return_if_fail (window != NULL);
|
1999-10-03 22:12:41 +00:00
|
|
|
g_return_if_fail (GDK_IS_WINDOW (window));
|
1998-03-08 03:32:05 +00:00
|
|
|
|
1999-10-03 22:12:41 +00:00
|
|
|
if (!GDK_DRAWABLE_DESTROYED (window))
|
|
|
|
XLowerWindow (GDK_DRAWABLE_XDISPLAY (window), GDK_DRAWABLE_XID (window));
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
gdk_window_set_hints (GdkWindow *window,
|
|
|
|
gint x,
|
|
|
|
gint y,
|
|
|
|
gint min_width,
|
|
|
|
gint min_height,
|
|
|
|
gint max_width,
|
|
|
|
gint max_height,
|
|
|
|
gint flags)
|
|
|
|
{
|
|
|
|
XSizeHints size_hints;
|
1998-03-08 03:32:05 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
g_return_if_fail (window != NULL);
|
1999-10-03 22:12:41 +00:00
|
|
|
g_return_if_fail (GDK_IS_WINDOW (window));
|
1998-03-08 03:32:05 +00:00
|
|
|
|
1999-10-03 22:12:41 +00:00
|
|
|
if (GDK_DRAWABLE_DESTROYED (window))
|
1998-01-26 01:20:14 +00:00
|
|
|
return;
|
1998-03-08 03:32:05 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
size_hints.flags = 0;
|
1998-03-08 03:32:05 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
if (flags & GDK_HINT_POS)
|
|
|
|
{
|
|
|
|
size_hints.flags |= PPosition;
|
|
|
|
size_hints.x = x;
|
|
|
|
size_hints.y = y;
|
|
|
|
}
|
1998-03-08 03:32:05 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
if (flags & GDK_HINT_MIN_SIZE)
|
|
|
|
{
|
|
|
|
size_hints.flags |= PMinSize;
|
|
|
|
size_hints.min_width = min_width;
|
|
|
|
size_hints.min_height = min_height;
|
|
|
|
}
|
1998-03-08 03:32:05 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
if (flags & GDK_HINT_MAX_SIZE)
|
|
|
|
{
|
|
|
|
size_hints.flags |= PMaxSize;
|
|
|
|
size_hints.max_width = max_width;
|
|
|
|
size_hints.max_height = max_height;
|
|
|
|
}
|
1998-03-08 03:32:05 +00:00
|
|
|
|
[ Merges from gtk-1-2 ]
Wed Sep 8 07:13:29 1999 Tim Janik <timj@gtk.org>
* configure.in: fixed "GNU Make" check to pass with new make version
3.77.95.
Fri Sep 3 16:04:41 1999 Tim Janik <timj@gtk.org>
* gtk-config.in (--version): don't echo @GTK_VERSION@, but
@GTK_MAJOR_VERSION@.@GTK_MINOR_VERSION@.@GTK_MICRO_VERSION@, so the
AM_PATH_GTK() macros don't get confused by the -pre1.
Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (REBUILD): Change check for perl5
to check explicitely for v >= 5.002. (5.001
does not work with our scripts.)
Wed Aug 25 15:45:46 1999 Tim Janik <timj@gtk.org>
* configure.in: evaluate $PERL for the perl version check. added
--disable-rebuilds to give the user an option to completely disable
any source autogeneration rules.
Mon Aug 23 23:16:14 1999 Tim Janik <timj@gtk.org>
* configure.in: evaluate $ac_make when checking for GNU Make.
Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
* docs/Makefile.am: added generation.txt.
* Makefile.am: require automake 1.4, build README from README.in and
INSTALL from INSTALL.in in dist-hook.
* README.in:
* INSTALL.in: new files to autogenerate README and INSTALL from.
* configure.in: figure whether we have GNU Make
* docs/generation.txt: minor additions/corrections.
Wed Aug 11 13:38:26 BST 1999 Tony Gale <gale@gtk.org>
* docs/gtkfaq.sgml: FAQ Update
July 30, 1999 Elliot Lee <sopwith@redhat.com>
* configure.in: Fix autoconf warnings about cross compilation by
trying to provide sane defaults for AC_TRY_RUN.
Fri Jul 16 22:20:21 PDT 1999 Manish Singh <yosh@gimp.org>
* ltconfig
* ltmain.sh: upgrade to libtool 1.3.3
Thu Jul 8 11:30:18 1999 Owen Taylor <otaylor@redhat.com>
* INSTALL: Indicate that the --with-glib= configure
time flag is unsupported.
Mon Jul 5 20:36:03 1999 Owen Taylor <otaylor@redhat.com>
* docs/generation.txt: Added a file that gives
documenation about the autogeneration process for
various autogenerated files.
Tue Jun 29 15:59:25 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (LIBS): Look for libgmodule in the
right location.
Thu Jun 17 13:57:31 1999 Owen Taylor <otaylor@redhat.com>
* docs/gtk_tut.sgml: Removed references to
code examples in my directory on gtk.org as
they should all be in the tutorial now.
* docs/gtk_tut.sgml: Added sources for dial-test
and scribble-xinput programs that were previously
missing.
Fri Jun 4 00:08:59 1999 Owen Taylor <otaylor@redhat.com>
* TODO: Added entry about menu keyboard navigation, removed
some finished items.
Mon May 31 00:11:24 1999 Owen Taylor <otaylor@redhat.com>
* acinclude.m4: Standardize on func_dgettext
not func_gettext, so that the checks for dgettext
actually are paid attention to.
Wed May 5 10:47:54 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (LIBS): Add $INTLLIBS into $LIBS
directly, rather than repeating the checks for
gettext.
* INSTALL: Added information about gettext and
NLS support.
* acinclude.m4 (LIBM): Check for dgettext, not
just gettext. This should hopefully fix things wrt
systems with old versions of GNU gettext installed.
Tue Jun 29 15:59:25 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (LIBS): Look for libgmodule in the
right location.
Thu Apr 1 16:58:10 PST 1999 Manish Singh <yosh@gimp.org>
* autogen.sh: add --enable-maintainer-mode
* configure.in: set ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
Wed Mar 24 23:03:49 CST 1999 Shawn T. Amundson <amundson@gtk.org>
* docs/gtk-config.1.in:
docs/Makefile.am:
configure.in: gtk-config is now generated.
* docs/gtk-config.1: Removed, now generated.
Thu Sep 23 17:59:59 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): grr, even if Gdk doesn't
handle CreateNotify itself, still put out a debuging message for
--gdk-debug=events. made the ReparentNotify debugging message more
verbose.
wrap xcoords translation for ConfigureEvents into an error trap,
a destroy event may already be pending, and in that case, the
actuall coordinate values are not at all critical.
Sat Sep 18 22:24:15 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkcc.c: Stop leaking the color_hash all over
the place. Simplify and improve the logic.
Fri Sep 17 09:57:15 1999 Tim Janik <timj@gtk.org>
* gdk/gdk.h, gdk/gdkcolor.c: make return types (gint or gboolean)
for prototypes and function implementations consistent (reported
by Tomas Ogren).
Tue Sep 14 18:23:01 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): tell if expose events have
send_event set in debugging output.
(gdk_compress_exposures): default initialize the event so we don't
operate on bogus values (namely send_event).
Thu Sep 2 16:33:59 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c: When we receive an unexpected
destroy notify on one of our windows, don't just
warn about it, also mark our windows as destroyed.
Sun Sep 5 08:10:53 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkfont.c (gdk_font_hash_insert): Add
name => font and name => fontset hashes. The
name => fontset hash is a _big_ win since we
weren't previously caching fontsets at all and loading
fontsets is expensive. The name => font hash
is less of a win, but it does save us from doing
repeated XQueryFont calls on the same font.
* gdk/gdkprivate.h (struct _GdkFontPrivate): Add a names
list so we can remove font/fontset from hash.
Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_atom_intern): Remove useless
and slightly confusing test. [ XInternAtom (,,TRUE)
will never return None ].
Sat Sep 4 08:39:26 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_set_geometry_hints)
gdk/gdkwindow.c (gdk_window_set_hints):
Don't omit setting the properties if flags == 0 -
there may be an existing set of properties there
already. (Very old bug. Would it be better to
delete the property instead?)
* gdk/gdkselection.c (gdk_selection_property_get): Fix
spelling error in comment.
Wed Sep 1 14:05:30 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkimage.c (gdk_image_new): Use gdk_error_trap_push()
to avoid stomping over gdk_error_warnings.
* gdk/gdkimage.c (gdk_image_new): compute image->bpp
as (bits_per_pixel + 7) / 8. This gives the same
result as before for multiples of 8, but actually
a "reasonable" value for 1bit or 4bit displays.
Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
* gdk/Makefile.am: minor cleanups, strip spaces on build rules for
GNU Make.
Tue Aug 17 07:43:04 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): give a debugging note when
discarding configure events.
1999-08-18 Federico Mena Quintero <federico@redhat.com>
* gdk/gdkpixmap.c (gdk_pixmap_unref): g_return_if_fail() the
refcount is greater than zero.
* gdk/gdkwindow.c (gdk_window_unref): Likewise.
* gdk/gdkfont.c (gdk_font_unref): Likewise.
* gdk/gdkgc.c (gdk_gc_unref): Likewise.
* gdk/gdkdnd.c (gdk_drag_context_unref): Likewise.
Wed Aug 11 01:04:57 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_property_get): Fix assumption
that format 32 => sizeof(item) == 4. It really is
sizeof(long).
Tue Jun 29 23:02:42 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c (gdk_x_error / gdk_x_io_error): Don't
core dump at all on X IO errors, only core dump
if --enable-debug for X errors.
Thu Jun 24 17:06:23 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): removed old ""Got event for
unknown window:" message. disabled ConfigureNotify discarding code,
because it led to events being processed out of order.
Thu Jun 24 12:22:02 1999 Tim Janik <timj@gtk.org>
* gdk/gdkglobals.c: preinitialize gdk_error_code to 0.
* gdk/gdkevents.c (gdk_event_send_client_message_to_all_recurse): since
we export this function, supress error warnings and don't reset the
error code in the first half of this function.
* gdk/gdk.c (gdk_x_error): set gdk_error_code to the actuall X error
code (instead of just -1) so gdk_error_trap_pop() reveals something
actually informative about the error that happened.
* gdk/*.c:
don't rely on gdk_error_code being -1 if an error occoured, but just
gdk_error_code != 0.
Thu Jun 24 11:50:07 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_apply_filters): advance the filter list
pointer *before* invoking the filter function, so we at least don't
crash if a filter is removed that is currently executed. window filters
*really* need to be made truely reentrant at some point.
Mon Jun 14 11:10:15 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): print the atom name in the
PropertyNotify debug messages.
Wed May 5 22:51:06 1999 Owen Taylor <otaylor@redhat.com>
Patch from Sung-Hyun Nam <namsh@lgic.co.kr>
* gdk/gdkim.c: Fix cut-and-paste errors for
x/y and PreeditAttributes/StatusAttributes.
Wed May 5 22:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_set_geometry_hints): Change
G_MAXINT to 2^16 to alleviate overflow problems in
various window managers.
Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkfont.c (gdk_text_measure): Fix the return value
for fontsets.
Wed May 5 12:42:01 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_set_geometry_hints):
Initialize size_hints.x and size_hints.y because kwm
brokenly pays attention to them.
(Bug #1181 - Lars Heete <hel@admin.de>)
Wed May 5 11:38:56 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkrgb.c (gdk_rgb_choose_visual): Free the
return value of gdk_list_visuals().
(Bug #1193 - Morten Welinder <terra@diku.dk>)
Tue May 4 11:12:56 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkim.c (gdk_im_real_open): cast the return value of
XSetIMValues to (void *) when comparing to NULL, to workaround
the problem of some compilers barfing since older X headers don't
have the prototype for it.
Mon Apr 19 10:11:12 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkcolor.c (gdk_colormap_new): Fix memory leak
for pseudocolor where colormap->colors was double
allocated.
* gdk/gdkcolor.c (gdk_colormap_alloc1): Store the
color value in the hash table with the pixel filled
in so when we do later hash table lookups, the color
value is correct.
Sun May 2 15:29:45 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkdraw.c (gdk_draw_lines): check private->destroyed before
making the call
Tue Apr 27 11:17:35 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.c (xdnd_set_{targets,actions}): Fix leak
pointed out by Morten Welinder <terra@diku.dk>.
Wed Apr 21 14:20:22 1999 George Lebl <jirka@5z.com>
* gdk/gdkwindow.c: (gdk_window_remove_filter) correctly remove the
default filter from the list
Wed Apr 21 14:20:22 1999 George Lebl <jirka@5z.com>
* gdk/gdkwindow.c: (gdk_window_remove_filter) correctly remove the
default filter from the list
Fri Apr 16 20:41:43 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdk.c: #include "gdkkeysyms.h" for gdk_XConvertCase #defines
* gtk/gtkfontsel.c (gtk_font_selection_create_xlfd): use
g_strdup_printf instead of calcing the length separately
Tue Apr 13 02:49:33 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c: removed some silly #ifdef HAVE_CONFIG
that we don't do in many other places. (Fixing duplicate
#include of config.h)
* gdk/gdkevents.c: include gdkinput.h _after_ config.h.
Otherwise, #ifndef XINPUT_NONE check in the latter
doesn't work. (Bug #546)
Sun Apr 11 14:38:03 1999 Tim Janik <timj@gtk.org>
* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): check for color
"None" case insensitive.
Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkselection.c:
Add error traps so if the other end of the connection
dies, we survive.
Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.c (gdk_drag_motion): Separate out the
dest_xid field into two fields - one for the window
to send in messages, one to indicate the last looked
up window for caching purposes. This is needed, so
that Leave messages get the correct window.
Mon Apr 5 13:21:30 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkevents.c (gdk_event_check, gdk_event_prepare):
Fix warning created by people mucking around
with the gsource API.
* gdk/gdkevents.c (gdk_io_invoke, gdk_input_add_full):
Change mapping between GIOCondition and GdkInputCondition
to match the way the Linux kernel does it. This should
fix problems where closed pipes were no longer signalling
GDK_INPUT_READ on systems with a native poll().
Mon Apr 5 17:11:57 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): Check
explicitly for the string "None" - it is in the XPM
spec and some servers treat unknown colors in odd ways
(like asking the user!)
Thu Apr 1 16:58:10 PST 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkevents.c: made "->" into a "." of previous change so
it compiles
Thu Apr 1 18:41:25 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkevents.c (gdk_compress_exposures): Set the
window field of the event structure before calling
user filters.
1999-03-31 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gdk/gdk.c (gdk_init_check): Use False as the last argument to
XInternAtom() here. This is a particularly Old And Nasty(tm) bug.
Mon Mar 29 17:31:52 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkim.c (gdk_mbstowcs): Free the value of the
intermediate text property - prevents major memory
leak when gdk_use_mb.
gtk-d3august-990311-0: Bj|rn Augustsson <d3august@dtek.chalmers.se>
Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com>
Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
gtk-a-higuti-990322-[0-3]
* gdk/gdkfont.c (gdk_text_extents_wc): Make work when
sizeof(wchar_t) != sizeof (GdkWChar)
* configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS
that was causing -DX_LOCALE not to work.
* gtk/gtkrc.c (gtk_rc_init):
X_LOCALE will never have LC_MESSAGES defined
* gdk/gdk.c (gdk_init_check):
Remove --xim-preedit and --xim-status from argv properly.
* gdk/gdkim.c (gdk_ic_real_new): Add a gdk_flush() so
that the client window is present on the X server
before we pass it to the input method.
Tue Mar 9 10:46:49 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.c (motif_find_drag_window): Fix bug where
if --display is specified on the command line, than
the drag window will not be created on that display.
Tue Mar 9 10:38:24 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_atom_intern): Fixed bug where
lookups with only_if_exists == TRUE were inserting
bogus values into the atom cache.
Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org>
* gdk/gdkselection.c (gdk_selection_property_get): first XFree(t),
then reset it to NULL.
* gdk/gdkcolor.c:
(gdk_colors_free):
(gdk_colormap_free_colors): use colormap->colors[in_pixels[i]] as the
key for g_hash_table_remove() in both functions, this prevents us
from accessing possibly uninitialized portions of a GdkColor structure
where we are only interested in its pixel value.
Tue Mar 9 01:01:28 1999 Tim Janik <timj@gtk.org>
* gdk/gdkfont.c (gdk_font_load): first lookup the xfont ID in our
font hash table, if we have a GdkFontPrivate entry for this font
already, simply increment its reference count, provided by Olaf Dietsche
<olaf.dietsche+list.gtk@netcologne.de>.
1999-09-21 Tor Lillqvist <tml@iki.fi>
1999-09-28 20:19:13 +00:00
|
|
|
/* FIXME: Would it be better to delete this property of
|
|
|
|
* flags == 0? It would save space on the server
|
|
|
|
*/
|
1999-10-03 22:12:41 +00:00
|
|
|
XSetWMNormalHints (GDK_DRAWABLE_XDISPLAY (window),
|
|
|
|
GDK_DRAWABLE_XID (window),
|
|
|
|
&size_hints);
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
|
|
|
|
1998-12-07 06:37:27 +00:00
|
|
|
void
|
|
|
|
gdk_window_set_geometry_hints (GdkWindow *window,
|
|
|
|
GdkGeometry *geometry,
|
|
|
|
GdkWindowHints geom_mask)
|
|
|
|
{
|
|
|
|
XSizeHints size_hints;
|
|
|
|
|
|
|
|
g_return_if_fail (window != NULL);
|
1999-10-03 22:12:41 +00:00
|
|
|
g_return_if_fail (GDK_IS_WINDOW (window));
|
1998-12-07 06:37:27 +00:00
|
|
|
|
1999-10-03 22:12:41 +00:00
|
|
|
if (GDK_DRAWABLE_DESTROYED (window))
|
1998-12-07 06:37:27 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
size_hints.flags = 0;
|
|
|
|
|
|
|
|
if (geom_mask & GDK_HINT_POS)
|
[ Merges from gtk-1-2 ]
Wed Sep 8 07:13:29 1999 Tim Janik <timj@gtk.org>
* configure.in: fixed "GNU Make" check to pass with new make version
3.77.95.
Fri Sep 3 16:04:41 1999 Tim Janik <timj@gtk.org>
* gtk-config.in (--version): don't echo @GTK_VERSION@, but
@GTK_MAJOR_VERSION@.@GTK_MINOR_VERSION@.@GTK_MICRO_VERSION@, so the
AM_PATH_GTK() macros don't get confused by the -pre1.
Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (REBUILD): Change check for perl5
to check explicitely for v >= 5.002. (5.001
does not work with our scripts.)
Wed Aug 25 15:45:46 1999 Tim Janik <timj@gtk.org>
* configure.in: evaluate $PERL for the perl version check. added
--disable-rebuilds to give the user an option to completely disable
any source autogeneration rules.
Mon Aug 23 23:16:14 1999 Tim Janik <timj@gtk.org>
* configure.in: evaluate $ac_make when checking for GNU Make.
Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
* docs/Makefile.am: added generation.txt.
* Makefile.am: require automake 1.4, build README from README.in and
INSTALL from INSTALL.in in dist-hook.
* README.in:
* INSTALL.in: new files to autogenerate README and INSTALL from.
* configure.in: figure whether we have GNU Make
* docs/generation.txt: minor additions/corrections.
Wed Aug 11 13:38:26 BST 1999 Tony Gale <gale@gtk.org>
* docs/gtkfaq.sgml: FAQ Update
July 30, 1999 Elliot Lee <sopwith@redhat.com>
* configure.in: Fix autoconf warnings about cross compilation by
trying to provide sane defaults for AC_TRY_RUN.
Fri Jul 16 22:20:21 PDT 1999 Manish Singh <yosh@gimp.org>
* ltconfig
* ltmain.sh: upgrade to libtool 1.3.3
Thu Jul 8 11:30:18 1999 Owen Taylor <otaylor@redhat.com>
* INSTALL: Indicate that the --with-glib= configure
time flag is unsupported.
Mon Jul 5 20:36:03 1999 Owen Taylor <otaylor@redhat.com>
* docs/generation.txt: Added a file that gives
documenation about the autogeneration process for
various autogenerated files.
Tue Jun 29 15:59:25 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (LIBS): Look for libgmodule in the
right location.
Thu Jun 17 13:57:31 1999 Owen Taylor <otaylor@redhat.com>
* docs/gtk_tut.sgml: Removed references to
code examples in my directory on gtk.org as
they should all be in the tutorial now.
* docs/gtk_tut.sgml: Added sources for dial-test
and scribble-xinput programs that were previously
missing.
Fri Jun 4 00:08:59 1999 Owen Taylor <otaylor@redhat.com>
* TODO: Added entry about menu keyboard navigation, removed
some finished items.
Mon May 31 00:11:24 1999 Owen Taylor <otaylor@redhat.com>
* acinclude.m4: Standardize on func_dgettext
not func_gettext, so that the checks for dgettext
actually are paid attention to.
Wed May 5 10:47:54 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (LIBS): Add $INTLLIBS into $LIBS
directly, rather than repeating the checks for
gettext.
* INSTALL: Added information about gettext and
NLS support.
* acinclude.m4 (LIBM): Check for dgettext, not
just gettext. This should hopefully fix things wrt
systems with old versions of GNU gettext installed.
Tue Jun 29 15:59:25 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (LIBS): Look for libgmodule in the
right location.
Thu Apr 1 16:58:10 PST 1999 Manish Singh <yosh@gimp.org>
* autogen.sh: add --enable-maintainer-mode
* configure.in: set ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
Wed Mar 24 23:03:49 CST 1999 Shawn T. Amundson <amundson@gtk.org>
* docs/gtk-config.1.in:
docs/Makefile.am:
configure.in: gtk-config is now generated.
* docs/gtk-config.1: Removed, now generated.
Thu Sep 23 17:59:59 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): grr, even if Gdk doesn't
handle CreateNotify itself, still put out a debuging message for
--gdk-debug=events. made the ReparentNotify debugging message more
verbose.
wrap xcoords translation for ConfigureEvents into an error trap,
a destroy event may already be pending, and in that case, the
actuall coordinate values are not at all critical.
Sat Sep 18 22:24:15 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkcc.c: Stop leaking the color_hash all over
the place. Simplify and improve the logic.
Fri Sep 17 09:57:15 1999 Tim Janik <timj@gtk.org>
* gdk/gdk.h, gdk/gdkcolor.c: make return types (gint or gboolean)
for prototypes and function implementations consistent (reported
by Tomas Ogren).
Tue Sep 14 18:23:01 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): tell if expose events have
send_event set in debugging output.
(gdk_compress_exposures): default initialize the event so we don't
operate on bogus values (namely send_event).
Thu Sep 2 16:33:59 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c: When we receive an unexpected
destroy notify on one of our windows, don't just
warn about it, also mark our windows as destroyed.
Sun Sep 5 08:10:53 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkfont.c (gdk_font_hash_insert): Add
name => font and name => fontset hashes. The
name => fontset hash is a _big_ win since we
weren't previously caching fontsets at all and loading
fontsets is expensive. The name => font hash
is less of a win, but it does save us from doing
repeated XQueryFont calls on the same font.
* gdk/gdkprivate.h (struct _GdkFontPrivate): Add a names
list so we can remove font/fontset from hash.
Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_atom_intern): Remove useless
and slightly confusing test. [ XInternAtom (,,TRUE)
will never return None ].
Sat Sep 4 08:39:26 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_set_geometry_hints)
gdk/gdkwindow.c (gdk_window_set_hints):
Don't omit setting the properties if flags == 0 -
there may be an existing set of properties there
already. (Very old bug. Would it be better to
delete the property instead?)
* gdk/gdkselection.c (gdk_selection_property_get): Fix
spelling error in comment.
Wed Sep 1 14:05:30 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkimage.c (gdk_image_new): Use gdk_error_trap_push()
to avoid stomping over gdk_error_warnings.
* gdk/gdkimage.c (gdk_image_new): compute image->bpp
as (bits_per_pixel + 7) / 8. This gives the same
result as before for multiples of 8, but actually
a "reasonable" value for 1bit or 4bit displays.
Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
* gdk/Makefile.am: minor cleanups, strip spaces on build rules for
GNU Make.
Tue Aug 17 07:43:04 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): give a debugging note when
discarding configure events.
1999-08-18 Federico Mena Quintero <federico@redhat.com>
* gdk/gdkpixmap.c (gdk_pixmap_unref): g_return_if_fail() the
refcount is greater than zero.
* gdk/gdkwindow.c (gdk_window_unref): Likewise.
* gdk/gdkfont.c (gdk_font_unref): Likewise.
* gdk/gdkgc.c (gdk_gc_unref): Likewise.
* gdk/gdkdnd.c (gdk_drag_context_unref): Likewise.
Wed Aug 11 01:04:57 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_property_get): Fix assumption
that format 32 => sizeof(item) == 4. It really is
sizeof(long).
Tue Jun 29 23:02:42 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c (gdk_x_error / gdk_x_io_error): Don't
core dump at all on X IO errors, only core dump
if --enable-debug for X errors.
Thu Jun 24 17:06:23 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): removed old ""Got event for
unknown window:" message. disabled ConfigureNotify discarding code,
because it led to events being processed out of order.
Thu Jun 24 12:22:02 1999 Tim Janik <timj@gtk.org>
* gdk/gdkglobals.c: preinitialize gdk_error_code to 0.
* gdk/gdkevents.c (gdk_event_send_client_message_to_all_recurse): since
we export this function, supress error warnings and don't reset the
error code in the first half of this function.
* gdk/gdk.c (gdk_x_error): set gdk_error_code to the actuall X error
code (instead of just -1) so gdk_error_trap_pop() reveals something
actually informative about the error that happened.
* gdk/*.c:
don't rely on gdk_error_code being -1 if an error occoured, but just
gdk_error_code != 0.
Thu Jun 24 11:50:07 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_apply_filters): advance the filter list
pointer *before* invoking the filter function, so we at least don't
crash if a filter is removed that is currently executed. window filters
*really* need to be made truely reentrant at some point.
Mon Jun 14 11:10:15 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): print the atom name in the
PropertyNotify debug messages.
Wed May 5 22:51:06 1999 Owen Taylor <otaylor@redhat.com>
Patch from Sung-Hyun Nam <namsh@lgic.co.kr>
* gdk/gdkim.c: Fix cut-and-paste errors for
x/y and PreeditAttributes/StatusAttributes.
Wed May 5 22:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_set_geometry_hints): Change
G_MAXINT to 2^16 to alleviate overflow problems in
various window managers.
Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkfont.c (gdk_text_measure): Fix the return value
for fontsets.
Wed May 5 12:42:01 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_set_geometry_hints):
Initialize size_hints.x and size_hints.y because kwm
brokenly pays attention to them.
(Bug #1181 - Lars Heete <hel@admin.de>)
Wed May 5 11:38:56 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkrgb.c (gdk_rgb_choose_visual): Free the
return value of gdk_list_visuals().
(Bug #1193 - Morten Welinder <terra@diku.dk>)
Tue May 4 11:12:56 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkim.c (gdk_im_real_open): cast the return value of
XSetIMValues to (void *) when comparing to NULL, to workaround
the problem of some compilers barfing since older X headers don't
have the prototype for it.
Mon Apr 19 10:11:12 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkcolor.c (gdk_colormap_new): Fix memory leak
for pseudocolor where colormap->colors was double
allocated.
* gdk/gdkcolor.c (gdk_colormap_alloc1): Store the
color value in the hash table with the pixel filled
in so when we do later hash table lookups, the color
value is correct.
Sun May 2 15:29:45 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkdraw.c (gdk_draw_lines): check private->destroyed before
making the call
Tue Apr 27 11:17:35 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.c (xdnd_set_{targets,actions}): Fix leak
pointed out by Morten Welinder <terra@diku.dk>.
Wed Apr 21 14:20:22 1999 George Lebl <jirka@5z.com>
* gdk/gdkwindow.c: (gdk_window_remove_filter) correctly remove the
default filter from the list
Wed Apr 21 14:20:22 1999 George Lebl <jirka@5z.com>
* gdk/gdkwindow.c: (gdk_window_remove_filter) correctly remove the
default filter from the list
Fri Apr 16 20:41:43 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdk.c: #include "gdkkeysyms.h" for gdk_XConvertCase #defines
* gtk/gtkfontsel.c (gtk_font_selection_create_xlfd): use
g_strdup_printf instead of calcing the length separately
Tue Apr 13 02:49:33 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c: removed some silly #ifdef HAVE_CONFIG
that we don't do in many other places. (Fixing duplicate
#include of config.h)
* gdk/gdkevents.c: include gdkinput.h _after_ config.h.
Otherwise, #ifndef XINPUT_NONE check in the latter
doesn't work. (Bug #546)
Sun Apr 11 14:38:03 1999 Tim Janik <timj@gtk.org>
* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): check for color
"None" case insensitive.
Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkselection.c:
Add error traps so if the other end of the connection
dies, we survive.
Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.c (gdk_drag_motion): Separate out the
dest_xid field into two fields - one for the window
to send in messages, one to indicate the last looked
up window for caching purposes. This is needed, so
that Leave messages get the correct window.
Mon Apr 5 13:21:30 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkevents.c (gdk_event_check, gdk_event_prepare):
Fix warning created by people mucking around
with the gsource API.
* gdk/gdkevents.c (gdk_io_invoke, gdk_input_add_full):
Change mapping between GIOCondition and GdkInputCondition
to match the way the Linux kernel does it. This should
fix problems where closed pipes were no longer signalling
GDK_INPUT_READ on systems with a native poll().
Mon Apr 5 17:11:57 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): Check
explicitly for the string "None" - it is in the XPM
spec and some servers treat unknown colors in odd ways
(like asking the user!)
Thu Apr 1 16:58:10 PST 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkevents.c: made "->" into a "." of previous change so
it compiles
Thu Apr 1 18:41:25 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkevents.c (gdk_compress_exposures): Set the
window field of the event structure before calling
user filters.
1999-03-31 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gdk/gdk.c (gdk_init_check): Use False as the last argument to
XInternAtom() here. This is a particularly Old And Nasty(tm) bug.
Mon Mar 29 17:31:52 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkim.c (gdk_mbstowcs): Free the value of the
intermediate text property - prevents major memory
leak when gdk_use_mb.
gtk-d3august-990311-0: Bj|rn Augustsson <d3august@dtek.chalmers.se>
Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com>
Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
gtk-a-higuti-990322-[0-3]
* gdk/gdkfont.c (gdk_text_extents_wc): Make work when
sizeof(wchar_t) != sizeof (GdkWChar)
* configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS
that was causing -DX_LOCALE not to work.
* gtk/gtkrc.c (gtk_rc_init):
X_LOCALE will never have LC_MESSAGES defined
* gdk/gdk.c (gdk_init_check):
Remove --xim-preedit and --xim-status from argv properly.
* gdk/gdkim.c (gdk_ic_real_new): Add a gdk_flush() so
that the client window is present on the X server
before we pass it to the input method.
Tue Mar 9 10:46:49 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.c (motif_find_drag_window): Fix bug where
if --display is specified on the command line, than
the drag window will not be created on that display.
Tue Mar 9 10:38:24 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_atom_intern): Fixed bug where
lookups with only_if_exists == TRUE were inserting
bogus values into the atom cache.
Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org>
* gdk/gdkselection.c (gdk_selection_property_get): first XFree(t),
then reset it to NULL.
* gdk/gdkcolor.c:
(gdk_colors_free):
(gdk_colormap_free_colors): use colormap->colors[in_pixels[i]] as the
key for g_hash_table_remove() in both functions, this prevents us
from accessing possibly uninitialized portions of a GdkColor structure
where we are only interested in its pixel value.
Tue Mar 9 01:01:28 1999 Tim Janik <timj@gtk.org>
* gdk/gdkfont.c (gdk_font_load): first lookup the xfont ID in our
font hash table, if we have a GdkFontPrivate entry for this font
already, simply increment its reference count, provided by Olaf Dietsche
<olaf.dietsche+list.gtk@netcologne.de>.
1999-09-21 Tor Lillqvist <tml@iki.fi>
1999-09-28 20:19:13 +00:00
|
|
|
{
|
|
|
|
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;
|
|
|
|
}
|
1998-12-07 06:37:27 +00:00
|
|
|
|
|
|
|
if (geom_mask & GDK_HINT_MIN_SIZE)
|
|
|
|
{
|
|
|
|
size_hints.flags |= PMinSize;
|
|
|
|
size_hints.min_width = geometry->min_width;
|
|
|
|
size_hints.min_height = geometry->min_height;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (geom_mask & GDK_HINT_MAX_SIZE)
|
|
|
|
{
|
|
|
|
size_hints.flags |= PMaxSize;
|
1999-02-21 22:12:00 +00:00
|
|
|
size_hints.max_width = MAX (geometry->max_width, 1);
|
|
|
|
size_hints.max_height = MAX (geometry->max_height, 1);
|
1998-12-07 06:37:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (geom_mask & GDK_HINT_BASE_SIZE)
|
|
|
|
{
|
|
|
|
size_hints.flags |= PBaseSize;
|
|
|
|
size_hints.base_width = geometry->base_width;
|
|
|
|
size_hints.base_height = geometry->base_height;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (geom_mask & GDK_HINT_RESIZE_INC)
|
|
|
|
{
|
|
|
|
size_hints.flags |= PResizeInc;
|
|
|
|
size_hints.width_inc = geometry->width_inc;
|
|
|
|
size_hints.height_inc = geometry->height_inc;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (geom_mask & GDK_HINT_ASPECT)
|
|
|
|
{
|
|
|
|
size_hints.flags |= PAspect;
|
|
|
|
if (geometry->min_aspect <= 1)
|
|
|
|
{
|
[ Merges from gtk-1-2 ]
Wed Sep 8 07:13:29 1999 Tim Janik <timj@gtk.org>
* configure.in: fixed "GNU Make" check to pass with new make version
3.77.95.
Fri Sep 3 16:04:41 1999 Tim Janik <timj@gtk.org>
* gtk-config.in (--version): don't echo @GTK_VERSION@, but
@GTK_MAJOR_VERSION@.@GTK_MINOR_VERSION@.@GTK_MICRO_VERSION@, so the
AM_PATH_GTK() macros don't get confused by the -pre1.
Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (REBUILD): Change check for perl5
to check explicitely for v >= 5.002. (5.001
does not work with our scripts.)
Wed Aug 25 15:45:46 1999 Tim Janik <timj@gtk.org>
* configure.in: evaluate $PERL for the perl version check. added
--disable-rebuilds to give the user an option to completely disable
any source autogeneration rules.
Mon Aug 23 23:16:14 1999 Tim Janik <timj@gtk.org>
* configure.in: evaluate $ac_make when checking for GNU Make.
Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
* docs/Makefile.am: added generation.txt.
* Makefile.am: require automake 1.4, build README from README.in and
INSTALL from INSTALL.in in dist-hook.
* README.in:
* INSTALL.in: new files to autogenerate README and INSTALL from.
* configure.in: figure whether we have GNU Make
* docs/generation.txt: minor additions/corrections.
Wed Aug 11 13:38:26 BST 1999 Tony Gale <gale@gtk.org>
* docs/gtkfaq.sgml: FAQ Update
July 30, 1999 Elliot Lee <sopwith@redhat.com>
* configure.in: Fix autoconf warnings about cross compilation by
trying to provide sane defaults for AC_TRY_RUN.
Fri Jul 16 22:20:21 PDT 1999 Manish Singh <yosh@gimp.org>
* ltconfig
* ltmain.sh: upgrade to libtool 1.3.3
Thu Jul 8 11:30:18 1999 Owen Taylor <otaylor@redhat.com>
* INSTALL: Indicate that the --with-glib= configure
time flag is unsupported.
Mon Jul 5 20:36:03 1999 Owen Taylor <otaylor@redhat.com>
* docs/generation.txt: Added a file that gives
documenation about the autogeneration process for
various autogenerated files.
Tue Jun 29 15:59:25 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (LIBS): Look for libgmodule in the
right location.
Thu Jun 17 13:57:31 1999 Owen Taylor <otaylor@redhat.com>
* docs/gtk_tut.sgml: Removed references to
code examples in my directory on gtk.org as
they should all be in the tutorial now.
* docs/gtk_tut.sgml: Added sources for dial-test
and scribble-xinput programs that were previously
missing.
Fri Jun 4 00:08:59 1999 Owen Taylor <otaylor@redhat.com>
* TODO: Added entry about menu keyboard navigation, removed
some finished items.
Mon May 31 00:11:24 1999 Owen Taylor <otaylor@redhat.com>
* acinclude.m4: Standardize on func_dgettext
not func_gettext, so that the checks for dgettext
actually are paid attention to.
Wed May 5 10:47:54 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (LIBS): Add $INTLLIBS into $LIBS
directly, rather than repeating the checks for
gettext.
* INSTALL: Added information about gettext and
NLS support.
* acinclude.m4 (LIBM): Check for dgettext, not
just gettext. This should hopefully fix things wrt
systems with old versions of GNU gettext installed.
Tue Jun 29 15:59:25 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (LIBS): Look for libgmodule in the
right location.
Thu Apr 1 16:58:10 PST 1999 Manish Singh <yosh@gimp.org>
* autogen.sh: add --enable-maintainer-mode
* configure.in: set ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
Wed Mar 24 23:03:49 CST 1999 Shawn T. Amundson <amundson@gtk.org>
* docs/gtk-config.1.in:
docs/Makefile.am:
configure.in: gtk-config is now generated.
* docs/gtk-config.1: Removed, now generated.
Thu Sep 23 17:59:59 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): grr, even if Gdk doesn't
handle CreateNotify itself, still put out a debuging message for
--gdk-debug=events. made the ReparentNotify debugging message more
verbose.
wrap xcoords translation for ConfigureEvents into an error trap,
a destroy event may already be pending, and in that case, the
actuall coordinate values are not at all critical.
Sat Sep 18 22:24:15 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkcc.c: Stop leaking the color_hash all over
the place. Simplify and improve the logic.
Fri Sep 17 09:57:15 1999 Tim Janik <timj@gtk.org>
* gdk/gdk.h, gdk/gdkcolor.c: make return types (gint or gboolean)
for prototypes and function implementations consistent (reported
by Tomas Ogren).
Tue Sep 14 18:23:01 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): tell if expose events have
send_event set in debugging output.
(gdk_compress_exposures): default initialize the event so we don't
operate on bogus values (namely send_event).
Thu Sep 2 16:33:59 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c: When we receive an unexpected
destroy notify on one of our windows, don't just
warn about it, also mark our windows as destroyed.
Sun Sep 5 08:10:53 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkfont.c (gdk_font_hash_insert): Add
name => font and name => fontset hashes. The
name => fontset hash is a _big_ win since we
weren't previously caching fontsets at all and loading
fontsets is expensive. The name => font hash
is less of a win, but it does save us from doing
repeated XQueryFont calls on the same font.
* gdk/gdkprivate.h (struct _GdkFontPrivate): Add a names
list so we can remove font/fontset from hash.
Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_atom_intern): Remove useless
and slightly confusing test. [ XInternAtom (,,TRUE)
will never return None ].
Sat Sep 4 08:39:26 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_set_geometry_hints)
gdk/gdkwindow.c (gdk_window_set_hints):
Don't omit setting the properties if flags == 0 -
there may be an existing set of properties there
already. (Very old bug. Would it be better to
delete the property instead?)
* gdk/gdkselection.c (gdk_selection_property_get): Fix
spelling error in comment.
Wed Sep 1 14:05:30 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkimage.c (gdk_image_new): Use gdk_error_trap_push()
to avoid stomping over gdk_error_warnings.
* gdk/gdkimage.c (gdk_image_new): compute image->bpp
as (bits_per_pixel + 7) / 8. This gives the same
result as before for multiples of 8, but actually
a "reasonable" value for 1bit or 4bit displays.
Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
* gdk/Makefile.am: minor cleanups, strip spaces on build rules for
GNU Make.
Tue Aug 17 07:43:04 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): give a debugging note when
discarding configure events.
1999-08-18 Federico Mena Quintero <federico@redhat.com>
* gdk/gdkpixmap.c (gdk_pixmap_unref): g_return_if_fail() the
refcount is greater than zero.
* gdk/gdkwindow.c (gdk_window_unref): Likewise.
* gdk/gdkfont.c (gdk_font_unref): Likewise.
* gdk/gdkgc.c (gdk_gc_unref): Likewise.
* gdk/gdkdnd.c (gdk_drag_context_unref): Likewise.
Wed Aug 11 01:04:57 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_property_get): Fix assumption
that format 32 => sizeof(item) == 4. It really is
sizeof(long).
Tue Jun 29 23:02:42 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c (gdk_x_error / gdk_x_io_error): Don't
core dump at all on X IO errors, only core dump
if --enable-debug for X errors.
Thu Jun 24 17:06:23 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): removed old ""Got event for
unknown window:" message. disabled ConfigureNotify discarding code,
because it led to events being processed out of order.
Thu Jun 24 12:22:02 1999 Tim Janik <timj@gtk.org>
* gdk/gdkglobals.c: preinitialize gdk_error_code to 0.
* gdk/gdkevents.c (gdk_event_send_client_message_to_all_recurse): since
we export this function, supress error warnings and don't reset the
error code in the first half of this function.
* gdk/gdk.c (gdk_x_error): set gdk_error_code to the actuall X error
code (instead of just -1) so gdk_error_trap_pop() reveals something
actually informative about the error that happened.
* gdk/*.c:
don't rely on gdk_error_code being -1 if an error occoured, but just
gdk_error_code != 0.
Thu Jun 24 11:50:07 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_apply_filters): advance the filter list
pointer *before* invoking the filter function, so we at least don't
crash if a filter is removed that is currently executed. window filters
*really* need to be made truely reentrant at some point.
Mon Jun 14 11:10:15 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): print the atom name in the
PropertyNotify debug messages.
Wed May 5 22:51:06 1999 Owen Taylor <otaylor@redhat.com>
Patch from Sung-Hyun Nam <namsh@lgic.co.kr>
* gdk/gdkim.c: Fix cut-and-paste errors for
x/y and PreeditAttributes/StatusAttributes.
Wed May 5 22:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_set_geometry_hints): Change
G_MAXINT to 2^16 to alleviate overflow problems in
various window managers.
Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkfont.c (gdk_text_measure): Fix the return value
for fontsets.
Wed May 5 12:42:01 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_set_geometry_hints):
Initialize size_hints.x and size_hints.y because kwm
brokenly pays attention to them.
(Bug #1181 - Lars Heete <hel@admin.de>)
Wed May 5 11:38:56 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkrgb.c (gdk_rgb_choose_visual): Free the
return value of gdk_list_visuals().
(Bug #1193 - Morten Welinder <terra@diku.dk>)
Tue May 4 11:12:56 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkim.c (gdk_im_real_open): cast the return value of
XSetIMValues to (void *) when comparing to NULL, to workaround
the problem of some compilers barfing since older X headers don't
have the prototype for it.
Mon Apr 19 10:11:12 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkcolor.c (gdk_colormap_new): Fix memory leak
for pseudocolor where colormap->colors was double
allocated.
* gdk/gdkcolor.c (gdk_colormap_alloc1): Store the
color value in the hash table with the pixel filled
in so when we do later hash table lookups, the color
value is correct.
Sun May 2 15:29:45 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkdraw.c (gdk_draw_lines): check private->destroyed before
making the call
Tue Apr 27 11:17:35 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.c (xdnd_set_{targets,actions}): Fix leak
pointed out by Morten Welinder <terra@diku.dk>.
Wed Apr 21 14:20:22 1999 George Lebl <jirka@5z.com>
* gdk/gdkwindow.c: (gdk_window_remove_filter) correctly remove the
default filter from the list
Wed Apr 21 14:20:22 1999 George Lebl <jirka@5z.com>
* gdk/gdkwindow.c: (gdk_window_remove_filter) correctly remove the
default filter from the list
Fri Apr 16 20:41:43 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdk.c: #include "gdkkeysyms.h" for gdk_XConvertCase #defines
* gtk/gtkfontsel.c (gtk_font_selection_create_xlfd): use
g_strdup_printf instead of calcing the length separately
Tue Apr 13 02:49:33 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c: removed some silly #ifdef HAVE_CONFIG
that we don't do in many other places. (Fixing duplicate
#include of config.h)
* gdk/gdkevents.c: include gdkinput.h _after_ config.h.
Otherwise, #ifndef XINPUT_NONE check in the latter
doesn't work. (Bug #546)
Sun Apr 11 14:38:03 1999 Tim Janik <timj@gtk.org>
* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): check for color
"None" case insensitive.
Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkselection.c:
Add error traps so if the other end of the connection
dies, we survive.
Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.c (gdk_drag_motion): Separate out the
dest_xid field into two fields - one for the window
to send in messages, one to indicate the last looked
up window for caching purposes. This is needed, so
that Leave messages get the correct window.
Mon Apr 5 13:21:30 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkevents.c (gdk_event_check, gdk_event_prepare):
Fix warning created by people mucking around
with the gsource API.
* gdk/gdkevents.c (gdk_io_invoke, gdk_input_add_full):
Change mapping between GIOCondition and GdkInputCondition
to match the way the Linux kernel does it. This should
fix problems where closed pipes were no longer signalling
GDK_INPUT_READ on systems with a native poll().
Mon Apr 5 17:11:57 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): Check
explicitly for the string "None" - it is in the XPM
spec and some servers treat unknown colors in odd ways
(like asking the user!)
Thu Apr 1 16:58:10 PST 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkevents.c: made "->" into a "." of previous change so
it compiles
Thu Apr 1 18:41:25 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkevents.c (gdk_compress_exposures): Set the
window field of the event structure before calling
user filters.
1999-03-31 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gdk/gdk.c (gdk_init_check): Use False as the last argument to
XInternAtom() here. This is a particularly Old And Nasty(tm) bug.
Mon Mar 29 17:31:52 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkim.c (gdk_mbstowcs): Free the value of the
intermediate text property - prevents major memory
leak when gdk_use_mb.
gtk-d3august-990311-0: Bj|rn Augustsson <d3august@dtek.chalmers.se>
Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com>
Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
gtk-a-higuti-990322-[0-3]
* gdk/gdkfont.c (gdk_text_extents_wc): Make work when
sizeof(wchar_t) != sizeof (GdkWChar)
* configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS
that was causing -DX_LOCALE not to work.
* gtk/gtkrc.c (gtk_rc_init):
X_LOCALE will never have LC_MESSAGES defined
* gdk/gdk.c (gdk_init_check):
Remove --xim-preedit and --xim-status from argv properly.
* gdk/gdkim.c (gdk_ic_real_new): Add a gdk_flush() so
that the client window is present on the X server
before we pass it to the input method.
Tue Mar 9 10:46:49 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.c (motif_find_drag_window): Fix bug where
if --display is specified on the command line, than
the drag window will not be created on that display.
Tue Mar 9 10:38:24 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_atom_intern): Fixed bug where
lookups with only_if_exists == TRUE were inserting
bogus values into the atom cache.
Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org>
* gdk/gdkselection.c (gdk_selection_property_get): first XFree(t),
then reset it to NULL.
* gdk/gdkcolor.c:
(gdk_colors_free):
(gdk_colormap_free_colors): use colormap->colors[in_pixels[i]] as the
key for g_hash_table_remove() in both functions, this prevents us
from accessing possibly uninitialized portions of a GdkColor structure
where we are only interested in its pixel value.
Tue Mar 9 01:01:28 1999 Tim Janik <timj@gtk.org>
* gdk/gdkfont.c (gdk_font_load): first lookup the xfont ID in our
font hash table, if we have a GdkFontPrivate entry for this font
already, simply increment its reference count, provided by Olaf Dietsche
<olaf.dietsche+list.gtk@netcologne.de>.
1999-09-21 Tor Lillqvist <tml@iki.fi>
1999-09-28 20:19:13 +00:00
|
|
|
size_hints.min_aspect.x = 65536 * geometry->min_aspect;
|
|
|
|
size_hints.min_aspect.y = 65536;
|
1998-12-07 06:37:27 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
[ Merges from gtk-1-2 ]
Wed Sep 8 07:13:29 1999 Tim Janik <timj@gtk.org>
* configure.in: fixed "GNU Make" check to pass with new make version
3.77.95.
Fri Sep 3 16:04:41 1999 Tim Janik <timj@gtk.org>
* gtk-config.in (--version): don't echo @GTK_VERSION@, but
@GTK_MAJOR_VERSION@.@GTK_MINOR_VERSION@.@GTK_MICRO_VERSION@, so the
AM_PATH_GTK() macros don't get confused by the -pre1.
Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (REBUILD): Change check for perl5
to check explicitely for v >= 5.002. (5.001
does not work with our scripts.)
Wed Aug 25 15:45:46 1999 Tim Janik <timj@gtk.org>
* configure.in: evaluate $PERL for the perl version check. added
--disable-rebuilds to give the user an option to completely disable
any source autogeneration rules.
Mon Aug 23 23:16:14 1999 Tim Janik <timj@gtk.org>
* configure.in: evaluate $ac_make when checking for GNU Make.
Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
* docs/Makefile.am: added generation.txt.
* Makefile.am: require automake 1.4, build README from README.in and
INSTALL from INSTALL.in in dist-hook.
* README.in:
* INSTALL.in: new files to autogenerate README and INSTALL from.
* configure.in: figure whether we have GNU Make
* docs/generation.txt: minor additions/corrections.
Wed Aug 11 13:38:26 BST 1999 Tony Gale <gale@gtk.org>
* docs/gtkfaq.sgml: FAQ Update
July 30, 1999 Elliot Lee <sopwith@redhat.com>
* configure.in: Fix autoconf warnings about cross compilation by
trying to provide sane defaults for AC_TRY_RUN.
Fri Jul 16 22:20:21 PDT 1999 Manish Singh <yosh@gimp.org>
* ltconfig
* ltmain.sh: upgrade to libtool 1.3.3
Thu Jul 8 11:30:18 1999 Owen Taylor <otaylor@redhat.com>
* INSTALL: Indicate that the --with-glib= configure
time flag is unsupported.
Mon Jul 5 20:36:03 1999 Owen Taylor <otaylor@redhat.com>
* docs/generation.txt: Added a file that gives
documenation about the autogeneration process for
various autogenerated files.
Tue Jun 29 15:59:25 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (LIBS): Look for libgmodule in the
right location.
Thu Jun 17 13:57:31 1999 Owen Taylor <otaylor@redhat.com>
* docs/gtk_tut.sgml: Removed references to
code examples in my directory on gtk.org as
they should all be in the tutorial now.
* docs/gtk_tut.sgml: Added sources for dial-test
and scribble-xinput programs that were previously
missing.
Fri Jun 4 00:08:59 1999 Owen Taylor <otaylor@redhat.com>
* TODO: Added entry about menu keyboard navigation, removed
some finished items.
Mon May 31 00:11:24 1999 Owen Taylor <otaylor@redhat.com>
* acinclude.m4: Standardize on func_dgettext
not func_gettext, so that the checks for dgettext
actually are paid attention to.
Wed May 5 10:47:54 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (LIBS): Add $INTLLIBS into $LIBS
directly, rather than repeating the checks for
gettext.
* INSTALL: Added information about gettext and
NLS support.
* acinclude.m4 (LIBM): Check for dgettext, not
just gettext. This should hopefully fix things wrt
systems with old versions of GNU gettext installed.
Tue Jun 29 15:59:25 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (LIBS): Look for libgmodule in the
right location.
Thu Apr 1 16:58:10 PST 1999 Manish Singh <yosh@gimp.org>
* autogen.sh: add --enable-maintainer-mode
* configure.in: set ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
Wed Mar 24 23:03:49 CST 1999 Shawn T. Amundson <amundson@gtk.org>
* docs/gtk-config.1.in:
docs/Makefile.am:
configure.in: gtk-config is now generated.
* docs/gtk-config.1: Removed, now generated.
Thu Sep 23 17:59:59 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): grr, even if Gdk doesn't
handle CreateNotify itself, still put out a debuging message for
--gdk-debug=events. made the ReparentNotify debugging message more
verbose.
wrap xcoords translation for ConfigureEvents into an error trap,
a destroy event may already be pending, and in that case, the
actuall coordinate values are not at all critical.
Sat Sep 18 22:24:15 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkcc.c: Stop leaking the color_hash all over
the place. Simplify and improve the logic.
Fri Sep 17 09:57:15 1999 Tim Janik <timj@gtk.org>
* gdk/gdk.h, gdk/gdkcolor.c: make return types (gint or gboolean)
for prototypes and function implementations consistent (reported
by Tomas Ogren).
Tue Sep 14 18:23:01 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): tell if expose events have
send_event set in debugging output.
(gdk_compress_exposures): default initialize the event so we don't
operate on bogus values (namely send_event).
Thu Sep 2 16:33:59 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c: When we receive an unexpected
destroy notify on one of our windows, don't just
warn about it, also mark our windows as destroyed.
Sun Sep 5 08:10:53 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkfont.c (gdk_font_hash_insert): Add
name => font and name => fontset hashes. The
name => fontset hash is a _big_ win since we
weren't previously caching fontsets at all and loading
fontsets is expensive. The name => font hash
is less of a win, but it does save us from doing
repeated XQueryFont calls on the same font.
* gdk/gdkprivate.h (struct _GdkFontPrivate): Add a names
list so we can remove font/fontset from hash.
Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_atom_intern): Remove useless
and slightly confusing test. [ XInternAtom (,,TRUE)
will never return None ].
Sat Sep 4 08:39:26 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_set_geometry_hints)
gdk/gdkwindow.c (gdk_window_set_hints):
Don't omit setting the properties if flags == 0 -
there may be an existing set of properties there
already. (Very old bug. Would it be better to
delete the property instead?)
* gdk/gdkselection.c (gdk_selection_property_get): Fix
spelling error in comment.
Wed Sep 1 14:05:30 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkimage.c (gdk_image_new): Use gdk_error_trap_push()
to avoid stomping over gdk_error_warnings.
* gdk/gdkimage.c (gdk_image_new): compute image->bpp
as (bits_per_pixel + 7) / 8. This gives the same
result as before for multiples of 8, but actually
a "reasonable" value for 1bit or 4bit displays.
Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
* gdk/Makefile.am: minor cleanups, strip spaces on build rules for
GNU Make.
Tue Aug 17 07:43:04 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): give a debugging note when
discarding configure events.
1999-08-18 Federico Mena Quintero <federico@redhat.com>
* gdk/gdkpixmap.c (gdk_pixmap_unref): g_return_if_fail() the
refcount is greater than zero.
* gdk/gdkwindow.c (gdk_window_unref): Likewise.
* gdk/gdkfont.c (gdk_font_unref): Likewise.
* gdk/gdkgc.c (gdk_gc_unref): Likewise.
* gdk/gdkdnd.c (gdk_drag_context_unref): Likewise.
Wed Aug 11 01:04:57 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_property_get): Fix assumption
that format 32 => sizeof(item) == 4. It really is
sizeof(long).
Tue Jun 29 23:02:42 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c (gdk_x_error / gdk_x_io_error): Don't
core dump at all on X IO errors, only core dump
if --enable-debug for X errors.
Thu Jun 24 17:06:23 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): removed old ""Got event for
unknown window:" message. disabled ConfigureNotify discarding code,
because it led to events being processed out of order.
Thu Jun 24 12:22:02 1999 Tim Janik <timj@gtk.org>
* gdk/gdkglobals.c: preinitialize gdk_error_code to 0.
* gdk/gdkevents.c (gdk_event_send_client_message_to_all_recurse): since
we export this function, supress error warnings and don't reset the
error code in the first half of this function.
* gdk/gdk.c (gdk_x_error): set gdk_error_code to the actuall X error
code (instead of just -1) so gdk_error_trap_pop() reveals something
actually informative about the error that happened.
* gdk/*.c:
don't rely on gdk_error_code being -1 if an error occoured, but just
gdk_error_code != 0.
Thu Jun 24 11:50:07 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_apply_filters): advance the filter list
pointer *before* invoking the filter function, so we at least don't
crash if a filter is removed that is currently executed. window filters
*really* need to be made truely reentrant at some point.
Mon Jun 14 11:10:15 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): print the atom name in the
PropertyNotify debug messages.
Wed May 5 22:51:06 1999 Owen Taylor <otaylor@redhat.com>
Patch from Sung-Hyun Nam <namsh@lgic.co.kr>
* gdk/gdkim.c: Fix cut-and-paste errors for
x/y and PreeditAttributes/StatusAttributes.
Wed May 5 22:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_set_geometry_hints): Change
G_MAXINT to 2^16 to alleviate overflow problems in
various window managers.
Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkfont.c (gdk_text_measure): Fix the return value
for fontsets.
Wed May 5 12:42:01 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_set_geometry_hints):
Initialize size_hints.x and size_hints.y because kwm
brokenly pays attention to them.
(Bug #1181 - Lars Heete <hel@admin.de>)
Wed May 5 11:38:56 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkrgb.c (gdk_rgb_choose_visual): Free the
return value of gdk_list_visuals().
(Bug #1193 - Morten Welinder <terra@diku.dk>)
Tue May 4 11:12:56 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkim.c (gdk_im_real_open): cast the return value of
XSetIMValues to (void *) when comparing to NULL, to workaround
the problem of some compilers barfing since older X headers don't
have the prototype for it.
Mon Apr 19 10:11:12 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkcolor.c (gdk_colormap_new): Fix memory leak
for pseudocolor where colormap->colors was double
allocated.
* gdk/gdkcolor.c (gdk_colormap_alloc1): Store the
color value in the hash table with the pixel filled
in so when we do later hash table lookups, the color
value is correct.
Sun May 2 15:29:45 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkdraw.c (gdk_draw_lines): check private->destroyed before
making the call
Tue Apr 27 11:17:35 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.c (xdnd_set_{targets,actions}): Fix leak
pointed out by Morten Welinder <terra@diku.dk>.
Wed Apr 21 14:20:22 1999 George Lebl <jirka@5z.com>
* gdk/gdkwindow.c: (gdk_window_remove_filter) correctly remove the
default filter from the list
Wed Apr 21 14:20:22 1999 George Lebl <jirka@5z.com>
* gdk/gdkwindow.c: (gdk_window_remove_filter) correctly remove the
default filter from the list
Fri Apr 16 20:41:43 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdk.c: #include "gdkkeysyms.h" for gdk_XConvertCase #defines
* gtk/gtkfontsel.c (gtk_font_selection_create_xlfd): use
g_strdup_printf instead of calcing the length separately
Tue Apr 13 02:49:33 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c: removed some silly #ifdef HAVE_CONFIG
that we don't do in many other places. (Fixing duplicate
#include of config.h)
* gdk/gdkevents.c: include gdkinput.h _after_ config.h.
Otherwise, #ifndef XINPUT_NONE check in the latter
doesn't work. (Bug #546)
Sun Apr 11 14:38:03 1999 Tim Janik <timj@gtk.org>
* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): check for color
"None" case insensitive.
Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkselection.c:
Add error traps so if the other end of the connection
dies, we survive.
Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.c (gdk_drag_motion): Separate out the
dest_xid field into two fields - one for the window
to send in messages, one to indicate the last looked
up window for caching purposes. This is needed, so
that Leave messages get the correct window.
Mon Apr 5 13:21:30 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkevents.c (gdk_event_check, gdk_event_prepare):
Fix warning created by people mucking around
with the gsource API.
* gdk/gdkevents.c (gdk_io_invoke, gdk_input_add_full):
Change mapping between GIOCondition and GdkInputCondition
to match the way the Linux kernel does it. This should
fix problems where closed pipes were no longer signalling
GDK_INPUT_READ on systems with a native poll().
Mon Apr 5 17:11:57 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): Check
explicitly for the string "None" - it is in the XPM
spec and some servers treat unknown colors in odd ways
(like asking the user!)
Thu Apr 1 16:58:10 PST 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkevents.c: made "->" into a "." of previous change so
it compiles
Thu Apr 1 18:41:25 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkevents.c (gdk_compress_exposures): Set the
window field of the event structure before calling
user filters.
1999-03-31 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gdk/gdk.c (gdk_init_check): Use False as the last argument to
XInternAtom() here. This is a particularly Old And Nasty(tm) bug.
Mon Mar 29 17:31:52 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkim.c (gdk_mbstowcs): Free the value of the
intermediate text property - prevents major memory
leak when gdk_use_mb.
gtk-d3august-990311-0: Bj|rn Augustsson <d3august@dtek.chalmers.se>
Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com>
Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
gtk-a-higuti-990322-[0-3]
* gdk/gdkfont.c (gdk_text_extents_wc): Make work when
sizeof(wchar_t) != sizeof (GdkWChar)
* configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS
that was causing -DX_LOCALE not to work.
* gtk/gtkrc.c (gtk_rc_init):
X_LOCALE will never have LC_MESSAGES defined
* gdk/gdk.c (gdk_init_check):
Remove --xim-preedit and --xim-status from argv properly.
* gdk/gdkim.c (gdk_ic_real_new): Add a gdk_flush() so
that the client window is present on the X server
before we pass it to the input method.
Tue Mar 9 10:46:49 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.c (motif_find_drag_window): Fix bug where
if --display is specified on the command line, than
the drag window will not be created on that display.
Tue Mar 9 10:38:24 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_atom_intern): Fixed bug where
lookups with only_if_exists == TRUE were inserting
bogus values into the atom cache.
Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org>
* gdk/gdkselection.c (gdk_selection_property_get): first XFree(t),
then reset it to NULL.
* gdk/gdkcolor.c:
(gdk_colors_free):
(gdk_colormap_free_colors): use colormap->colors[in_pixels[i]] as the
key for g_hash_table_remove() in both functions, this prevents us
from accessing possibly uninitialized portions of a GdkColor structure
where we are only interested in its pixel value.
Tue Mar 9 01:01:28 1999 Tim Janik <timj@gtk.org>
* gdk/gdkfont.c (gdk_font_load): first lookup the xfont ID in our
font hash table, if we have a GdkFontPrivate entry for this font
already, simply increment its reference count, provided by Olaf Dietsche
<olaf.dietsche+list.gtk@netcologne.de>.
1999-09-21 Tor Lillqvist <tml@iki.fi>
1999-09-28 20:19:13 +00:00
|
|
|
size_hints.min_aspect.x = 65536;
|
|
|
|
size_hints.min_aspect.y = 65536 / geometry->min_aspect;;
|
1998-12-07 06:37:27 +00:00
|
|
|
}
|
|
|
|
if (geometry->max_aspect <= 1)
|
|
|
|
{
|
[ Merges from gtk-1-2 ]
Wed Sep 8 07:13:29 1999 Tim Janik <timj@gtk.org>
* configure.in: fixed "GNU Make" check to pass with new make version
3.77.95.
Fri Sep 3 16:04:41 1999 Tim Janik <timj@gtk.org>
* gtk-config.in (--version): don't echo @GTK_VERSION@, but
@GTK_MAJOR_VERSION@.@GTK_MINOR_VERSION@.@GTK_MICRO_VERSION@, so the
AM_PATH_GTK() macros don't get confused by the -pre1.
Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (REBUILD): Change check for perl5
to check explicitely for v >= 5.002. (5.001
does not work with our scripts.)
Wed Aug 25 15:45:46 1999 Tim Janik <timj@gtk.org>
* configure.in: evaluate $PERL for the perl version check. added
--disable-rebuilds to give the user an option to completely disable
any source autogeneration rules.
Mon Aug 23 23:16:14 1999 Tim Janik <timj@gtk.org>
* configure.in: evaluate $ac_make when checking for GNU Make.
Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
* docs/Makefile.am: added generation.txt.
* Makefile.am: require automake 1.4, build README from README.in and
INSTALL from INSTALL.in in dist-hook.
* README.in:
* INSTALL.in: new files to autogenerate README and INSTALL from.
* configure.in: figure whether we have GNU Make
* docs/generation.txt: minor additions/corrections.
Wed Aug 11 13:38:26 BST 1999 Tony Gale <gale@gtk.org>
* docs/gtkfaq.sgml: FAQ Update
July 30, 1999 Elliot Lee <sopwith@redhat.com>
* configure.in: Fix autoconf warnings about cross compilation by
trying to provide sane defaults for AC_TRY_RUN.
Fri Jul 16 22:20:21 PDT 1999 Manish Singh <yosh@gimp.org>
* ltconfig
* ltmain.sh: upgrade to libtool 1.3.3
Thu Jul 8 11:30:18 1999 Owen Taylor <otaylor@redhat.com>
* INSTALL: Indicate that the --with-glib= configure
time flag is unsupported.
Mon Jul 5 20:36:03 1999 Owen Taylor <otaylor@redhat.com>
* docs/generation.txt: Added a file that gives
documenation about the autogeneration process for
various autogenerated files.
Tue Jun 29 15:59:25 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (LIBS): Look for libgmodule in the
right location.
Thu Jun 17 13:57:31 1999 Owen Taylor <otaylor@redhat.com>
* docs/gtk_tut.sgml: Removed references to
code examples in my directory on gtk.org as
they should all be in the tutorial now.
* docs/gtk_tut.sgml: Added sources for dial-test
and scribble-xinput programs that were previously
missing.
Fri Jun 4 00:08:59 1999 Owen Taylor <otaylor@redhat.com>
* TODO: Added entry about menu keyboard navigation, removed
some finished items.
Mon May 31 00:11:24 1999 Owen Taylor <otaylor@redhat.com>
* acinclude.m4: Standardize on func_dgettext
not func_gettext, so that the checks for dgettext
actually are paid attention to.
Wed May 5 10:47:54 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (LIBS): Add $INTLLIBS into $LIBS
directly, rather than repeating the checks for
gettext.
* INSTALL: Added information about gettext and
NLS support.
* acinclude.m4 (LIBM): Check for dgettext, not
just gettext. This should hopefully fix things wrt
systems with old versions of GNU gettext installed.
Tue Jun 29 15:59:25 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (LIBS): Look for libgmodule in the
right location.
Thu Apr 1 16:58:10 PST 1999 Manish Singh <yosh@gimp.org>
* autogen.sh: add --enable-maintainer-mode
* configure.in: set ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
Wed Mar 24 23:03:49 CST 1999 Shawn T. Amundson <amundson@gtk.org>
* docs/gtk-config.1.in:
docs/Makefile.am:
configure.in: gtk-config is now generated.
* docs/gtk-config.1: Removed, now generated.
Thu Sep 23 17:59:59 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): grr, even if Gdk doesn't
handle CreateNotify itself, still put out a debuging message for
--gdk-debug=events. made the ReparentNotify debugging message more
verbose.
wrap xcoords translation for ConfigureEvents into an error trap,
a destroy event may already be pending, and in that case, the
actuall coordinate values are not at all critical.
Sat Sep 18 22:24:15 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkcc.c: Stop leaking the color_hash all over
the place. Simplify and improve the logic.
Fri Sep 17 09:57:15 1999 Tim Janik <timj@gtk.org>
* gdk/gdk.h, gdk/gdkcolor.c: make return types (gint or gboolean)
for prototypes and function implementations consistent (reported
by Tomas Ogren).
Tue Sep 14 18:23:01 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): tell if expose events have
send_event set in debugging output.
(gdk_compress_exposures): default initialize the event so we don't
operate on bogus values (namely send_event).
Thu Sep 2 16:33:59 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c: When we receive an unexpected
destroy notify on one of our windows, don't just
warn about it, also mark our windows as destroyed.
Sun Sep 5 08:10:53 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkfont.c (gdk_font_hash_insert): Add
name => font and name => fontset hashes. The
name => fontset hash is a _big_ win since we
weren't previously caching fontsets at all and loading
fontsets is expensive. The name => font hash
is less of a win, but it does save us from doing
repeated XQueryFont calls on the same font.
* gdk/gdkprivate.h (struct _GdkFontPrivate): Add a names
list so we can remove font/fontset from hash.
Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_atom_intern): Remove useless
and slightly confusing test. [ XInternAtom (,,TRUE)
will never return None ].
Sat Sep 4 08:39:26 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_set_geometry_hints)
gdk/gdkwindow.c (gdk_window_set_hints):
Don't omit setting the properties if flags == 0 -
there may be an existing set of properties there
already. (Very old bug. Would it be better to
delete the property instead?)
* gdk/gdkselection.c (gdk_selection_property_get): Fix
spelling error in comment.
Wed Sep 1 14:05:30 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkimage.c (gdk_image_new): Use gdk_error_trap_push()
to avoid stomping over gdk_error_warnings.
* gdk/gdkimage.c (gdk_image_new): compute image->bpp
as (bits_per_pixel + 7) / 8. This gives the same
result as before for multiples of 8, but actually
a "reasonable" value for 1bit or 4bit displays.
Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
* gdk/Makefile.am: minor cleanups, strip spaces on build rules for
GNU Make.
Tue Aug 17 07:43:04 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): give a debugging note when
discarding configure events.
1999-08-18 Federico Mena Quintero <federico@redhat.com>
* gdk/gdkpixmap.c (gdk_pixmap_unref): g_return_if_fail() the
refcount is greater than zero.
* gdk/gdkwindow.c (gdk_window_unref): Likewise.
* gdk/gdkfont.c (gdk_font_unref): Likewise.
* gdk/gdkgc.c (gdk_gc_unref): Likewise.
* gdk/gdkdnd.c (gdk_drag_context_unref): Likewise.
Wed Aug 11 01:04:57 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_property_get): Fix assumption
that format 32 => sizeof(item) == 4. It really is
sizeof(long).
Tue Jun 29 23:02:42 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c (gdk_x_error / gdk_x_io_error): Don't
core dump at all on X IO errors, only core dump
if --enable-debug for X errors.
Thu Jun 24 17:06:23 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): removed old ""Got event for
unknown window:" message. disabled ConfigureNotify discarding code,
because it led to events being processed out of order.
Thu Jun 24 12:22:02 1999 Tim Janik <timj@gtk.org>
* gdk/gdkglobals.c: preinitialize gdk_error_code to 0.
* gdk/gdkevents.c (gdk_event_send_client_message_to_all_recurse): since
we export this function, supress error warnings and don't reset the
error code in the first half of this function.
* gdk/gdk.c (gdk_x_error): set gdk_error_code to the actuall X error
code (instead of just -1) so gdk_error_trap_pop() reveals something
actually informative about the error that happened.
* gdk/*.c:
don't rely on gdk_error_code being -1 if an error occoured, but just
gdk_error_code != 0.
Thu Jun 24 11:50:07 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_apply_filters): advance the filter list
pointer *before* invoking the filter function, so we at least don't
crash if a filter is removed that is currently executed. window filters
*really* need to be made truely reentrant at some point.
Mon Jun 14 11:10:15 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): print the atom name in the
PropertyNotify debug messages.
Wed May 5 22:51:06 1999 Owen Taylor <otaylor@redhat.com>
Patch from Sung-Hyun Nam <namsh@lgic.co.kr>
* gdk/gdkim.c: Fix cut-and-paste errors for
x/y and PreeditAttributes/StatusAttributes.
Wed May 5 22:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_set_geometry_hints): Change
G_MAXINT to 2^16 to alleviate overflow problems in
various window managers.
Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkfont.c (gdk_text_measure): Fix the return value
for fontsets.
Wed May 5 12:42:01 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_set_geometry_hints):
Initialize size_hints.x and size_hints.y because kwm
brokenly pays attention to them.
(Bug #1181 - Lars Heete <hel@admin.de>)
Wed May 5 11:38:56 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkrgb.c (gdk_rgb_choose_visual): Free the
return value of gdk_list_visuals().
(Bug #1193 - Morten Welinder <terra@diku.dk>)
Tue May 4 11:12:56 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkim.c (gdk_im_real_open): cast the return value of
XSetIMValues to (void *) when comparing to NULL, to workaround
the problem of some compilers barfing since older X headers don't
have the prototype for it.
Mon Apr 19 10:11:12 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkcolor.c (gdk_colormap_new): Fix memory leak
for pseudocolor where colormap->colors was double
allocated.
* gdk/gdkcolor.c (gdk_colormap_alloc1): Store the
color value in the hash table with the pixel filled
in so when we do later hash table lookups, the color
value is correct.
Sun May 2 15:29:45 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkdraw.c (gdk_draw_lines): check private->destroyed before
making the call
Tue Apr 27 11:17:35 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.c (xdnd_set_{targets,actions}): Fix leak
pointed out by Morten Welinder <terra@diku.dk>.
Wed Apr 21 14:20:22 1999 George Lebl <jirka@5z.com>
* gdk/gdkwindow.c: (gdk_window_remove_filter) correctly remove the
default filter from the list
Wed Apr 21 14:20:22 1999 George Lebl <jirka@5z.com>
* gdk/gdkwindow.c: (gdk_window_remove_filter) correctly remove the
default filter from the list
Fri Apr 16 20:41:43 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdk.c: #include "gdkkeysyms.h" for gdk_XConvertCase #defines
* gtk/gtkfontsel.c (gtk_font_selection_create_xlfd): use
g_strdup_printf instead of calcing the length separately
Tue Apr 13 02:49:33 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c: removed some silly #ifdef HAVE_CONFIG
that we don't do in many other places. (Fixing duplicate
#include of config.h)
* gdk/gdkevents.c: include gdkinput.h _after_ config.h.
Otherwise, #ifndef XINPUT_NONE check in the latter
doesn't work. (Bug #546)
Sun Apr 11 14:38:03 1999 Tim Janik <timj@gtk.org>
* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): check for color
"None" case insensitive.
Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkselection.c:
Add error traps so if the other end of the connection
dies, we survive.
Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.c (gdk_drag_motion): Separate out the
dest_xid field into two fields - one for the window
to send in messages, one to indicate the last looked
up window for caching purposes. This is needed, so
that Leave messages get the correct window.
Mon Apr 5 13:21:30 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkevents.c (gdk_event_check, gdk_event_prepare):
Fix warning created by people mucking around
with the gsource API.
* gdk/gdkevents.c (gdk_io_invoke, gdk_input_add_full):
Change mapping between GIOCondition and GdkInputCondition
to match the way the Linux kernel does it. This should
fix problems where closed pipes were no longer signalling
GDK_INPUT_READ on systems with a native poll().
Mon Apr 5 17:11:57 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): Check
explicitly for the string "None" - it is in the XPM
spec and some servers treat unknown colors in odd ways
(like asking the user!)
Thu Apr 1 16:58:10 PST 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkevents.c: made "->" into a "." of previous change so
it compiles
Thu Apr 1 18:41:25 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkevents.c (gdk_compress_exposures): Set the
window field of the event structure before calling
user filters.
1999-03-31 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gdk/gdk.c (gdk_init_check): Use False as the last argument to
XInternAtom() here. This is a particularly Old And Nasty(tm) bug.
Mon Mar 29 17:31:52 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkim.c (gdk_mbstowcs): Free the value of the
intermediate text property - prevents major memory
leak when gdk_use_mb.
gtk-d3august-990311-0: Bj|rn Augustsson <d3august@dtek.chalmers.se>
Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com>
Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
gtk-a-higuti-990322-[0-3]
* gdk/gdkfont.c (gdk_text_extents_wc): Make work when
sizeof(wchar_t) != sizeof (GdkWChar)
* configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS
that was causing -DX_LOCALE not to work.
* gtk/gtkrc.c (gtk_rc_init):
X_LOCALE will never have LC_MESSAGES defined
* gdk/gdk.c (gdk_init_check):
Remove --xim-preedit and --xim-status from argv properly.
* gdk/gdkim.c (gdk_ic_real_new): Add a gdk_flush() so
that the client window is present on the X server
before we pass it to the input method.
Tue Mar 9 10:46:49 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.c (motif_find_drag_window): Fix bug where
if --display is specified on the command line, than
the drag window will not be created on that display.
Tue Mar 9 10:38:24 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_atom_intern): Fixed bug where
lookups with only_if_exists == TRUE were inserting
bogus values into the atom cache.
Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org>
* gdk/gdkselection.c (gdk_selection_property_get): first XFree(t),
then reset it to NULL.
* gdk/gdkcolor.c:
(gdk_colors_free):
(gdk_colormap_free_colors): use colormap->colors[in_pixels[i]] as the
key for g_hash_table_remove() in both functions, this prevents us
from accessing possibly uninitialized portions of a GdkColor structure
where we are only interested in its pixel value.
Tue Mar 9 01:01:28 1999 Tim Janik <timj@gtk.org>
* gdk/gdkfont.c (gdk_font_load): first lookup the xfont ID in our
font hash table, if we have a GdkFontPrivate entry for this font
already, simply increment its reference count, provided by Olaf Dietsche
<olaf.dietsche+list.gtk@netcologne.de>.
1999-09-21 Tor Lillqvist <tml@iki.fi>
1999-09-28 20:19:13 +00:00
|
|
|
size_hints.max_aspect.x = 65536 * geometry->max_aspect;
|
|
|
|
size_hints.max_aspect.y = 65536;
|
1998-12-07 06:37:27 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
[ Merges from gtk-1-2 ]
Wed Sep 8 07:13:29 1999 Tim Janik <timj@gtk.org>
* configure.in: fixed "GNU Make" check to pass with new make version
3.77.95.
Fri Sep 3 16:04:41 1999 Tim Janik <timj@gtk.org>
* gtk-config.in (--version): don't echo @GTK_VERSION@, but
@GTK_MAJOR_VERSION@.@GTK_MINOR_VERSION@.@GTK_MICRO_VERSION@, so the
AM_PATH_GTK() macros don't get confused by the -pre1.
Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (REBUILD): Change check for perl5
to check explicitely for v >= 5.002. (5.001
does not work with our scripts.)
Wed Aug 25 15:45:46 1999 Tim Janik <timj@gtk.org>
* configure.in: evaluate $PERL for the perl version check. added
--disable-rebuilds to give the user an option to completely disable
any source autogeneration rules.
Mon Aug 23 23:16:14 1999 Tim Janik <timj@gtk.org>
* configure.in: evaluate $ac_make when checking for GNU Make.
Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
* docs/Makefile.am: added generation.txt.
* Makefile.am: require automake 1.4, build README from README.in and
INSTALL from INSTALL.in in dist-hook.
* README.in:
* INSTALL.in: new files to autogenerate README and INSTALL from.
* configure.in: figure whether we have GNU Make
* docs/generation.txt: minor additions/corrections.
Wed Aug 11 13:38:26 BST 1999 Tony Gale <gale@gtk.org>
* docs/gtkfaq.sgml: FAQ Update
July 30, 1999 Elliot Lee <sopwith@redhat.com>
* configure.in: Fix autoconf warnings about cross compilation by
trying to provide sane defaults for AC_TRY_RUN.
Fri Jul 16 22:20:21 PDT 1999 Manish Singh <yosh@gimp.org>
* ltconfig
* ltmain.sh: upgrade to libtool 1.3.3
Thu Jul 8 11:30:18 1999 Owen Taylor <otaylor@redhat.com>
* INSTALL: Indicate that the --with-glib= configure
time flag is unsupported.
Mon Jul 5 20:36:03 1999 Owen Taylor <otaylor@redhat.com>
* docs/generation.txt: Added a file that gives
documenation about the autogeneration process for
various autogenerated files.
Tue Jun 29 15:59:25 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (LIBS): Look for libgmodule in the
right location.
Thu Jun 17 13:57:31 1999 Owen Taylor <otaylor@redhat.com>
* docs/gtk_tut.sgml: Removed references to
code examples in my directory on gtk.org as
they should all be in the tutorial now.
* docs/gtk_tut.sgml: Added sources for dial-test
and scribble-xinput programs that were previously
missing.
Fri Jun 4 00:08:59 1999 Owen Taylor <otaylor@redhat.com>
* TODO: Added entry about menu keyboard navigation, removed
some finished items.
Mon May 31 00:11:24 1999 Owen Taylor <otaylor@redhat.com>
* acinclude.m4: Standardize on func_dgettext
not func_gettext, so that the checks for dgettext
actually are paid attention to.
Wed May 5 10:47:54 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (LIBS): Add $INTLLIBS into $LIBS
directly, rather than repeating the checks for
gettext.
* INSTALL: Added information about gettext and
NLS support.
* acinclude.m4 (LIBM): Check for dgettext, not
just gettext. This should hopefully fix things wrt
systems with old versions of GNU gettext installed.
Tue Jun 29 15:59:25 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (LIBS): Look for libgmodule in the
right location.
Thu Apr 1 16:58:10 PST 1999 Manish Singh <yosh@gimp.org>
* autogen.sh: add --enable-maintainer-mode
* configure.in: set ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
Wed Mar 24 23:03:49 CST 1999 Shawn T. Amundson <amundson@gtk.org>
* docs/gtk-config.1.in:
docs/Makefile.am:
configure.in: gtk-config is now generated.
* docs/gtk-config.1: Removed, now generated.
Thu Sep 23 17:59:59 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): grr, even if Gdk doesn't
handle CreateNotify itself, still put out a debuging message for
--gdk-debug=events. made the ReparentNotify debugging message more
verbose.
wrap xcoords translation for ConfigureEvents into an error trap,
a destroy event may already be pending, and in that case, the
actuall coordinate values are not at all critical.
Sat Sep 18 22:24:15 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkcc.c: Stop leaking the color_hash all over
the place. Simplify and improve the logic.
Fri Sep 17 09:57:15 1999 Tim Janik <timj@gtk.org>
* gdk/gdk.h, gdk/gdkcolor.c: make return types (gint or gboolean)
for prototypes and function implementations consistent (reported
by Tomas Ogren).
Tue Sep 14 18:23:01 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): tell if expose events have
send_event set in debugging output.
(gdk_compress_exposures): default initialize the event so we don't
operate on bogus values (namely send_event).
Thu Sep 2 16:33:59 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c: When we receive an unexpected
destroy notify on one of our windows, don't just
warn about it, also mark our windows as destroyed.
Sun Sep 5 08:10:53 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkfont.c (gdk_font_hash_insert): Add
name => font and name => fontset hashes. The
name => fontset hash is a _big_ win since we
weren't previously caching fontsets at all and loading
fontsets is expensive. The name => font hash
is less of a win, but it does save us from doing
repeated XQueryFont calls on the same font.
* gdk/gdkprivate.h (struct _GdkFontPrivate): Add a names
list so we can remove font/fontset from hash.
Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_atom_intern): Remove useless
and slightly confusing test. [ XInternAtom (,,TRUE)
will never return None ].
Sat Sep 4 08:39:26 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_set_geometry_hints)
gdk/gdkwindow.c (gdk_window_set_hints):
Don't omit setting the properties if flags == 0 -
there may be an existing set of properties there
already. (Very old bug. Would it be better to
delete the property instead?)
* gdk/gdkselection.c (gdk_selection_property_get): Fix
spelling error in comment.
Wed Sep 1 14:05:30 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkimage.c (gdk_image_new): Use gdk_error_trap_push()
to avoid stomping over gdk_error_warnings.
* gdk/gdkimage.c (gdk_image_new): compute image->bpp
as (bits_per_pixel + 7) / 8. This gives the same
result as before for multiples of 8, but actually
a "reasonable" value for 1bit or 4bit displays.
Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
* gdk/Makefile.am: minor cleanups, strip spaces on build rules for
GNU Make.
Tue Aug 17 07:43:04 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): give a debugging note when
discarding configure events.
1999-08-18 Federico Mena Quintero <federico@redhat.com>
* gdk/gdkpixmap.c (gdk_pixmap_unref): g_return_if_fail() the
refcount is greater than zero.
* gdk/gdkwindow.c (gdk_window_unref): Likewise.
* gdk/gdkfont.c (gdk_font_unref): Likewise.
* gdk/gdkgc.c (gdk_gc_unref): Likewise.
* gdk/gdkdnd.c (gdk_drag_context_unref): Likewise.
Wed Aug 11 01:04:57 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_property_get): Fix assumption
that format 32 => sizeof(item) == 4. It really is
sizeof(long).
Tue Jun 29 23:02:42 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c (gdk_x_error / gdk_x_io_error): Don't
core dump at all on X IO errors, only core dump
if --enable-debug for X errors.
Thu Jun 24 17:06:23 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): removed old ""Got event for
unknown window:" message. disabled ConfigureNotify discarding code,
because it led to events being processed out of order.
Thu Jun 24 12:22:02 1999 Tim Janik <timj@gtk.org>
* gdk/gdkglobals.c: preinitialize gdk_error_code to 0.
* gdk/gdkevents.c (gdk_event_send_client_message_to_all_recurse): since
we export this function, supress error warnings and don't reset the
error code in the first half of this function.
* gdk/gdk.c (gdk_x_error): set gdk_error_code to the actuall X error
code (instead of just -1) so gdk_error_trap_pop() reveals something
actually informative about the error that happened.
* gdk/*.c:
don't rely on gdk_error_code being -1 if an error occoured, but just
gdk_error_code != 0.
Thu Jun 24 11:50:07 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_apply_filters): advance the filter list
pointer *before* invoking the filter function, so we at least don't
crash if a filter is removed that is currently executed. window filters
*really* need to be made truely reentrant at some point.
Mon Jun 14 11:10:15 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): print the atom name in the
PropertyNotify debug messages.
Wed May 5 22:51:06 1999 Owen Taylor <otaylor@redhat.com>
Patch from Sung-Hyun Nam <namsh@lgic.co.kr>
* gdk/gdkim.c: Fix cut-and-paste errors for
x/y and PreeditAttributes/StatusAttributes.
Wed May 5 22:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_set_geometry_hints): Change
G_MAXINT to 2^16 to alleviate overflow problems in
various window managers.
Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkfont.c (gdk_text_measure): Fix the return value
for fontsets.
Wed May 5 12:42:01 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_set_geometry_hints):
Initialize size_hints.x and size_hints.y because kwm
brokenly pays attention to them.
(Bug #1181 - Lars Heete <hel@admin.de>)
Wed May 5 11:38:56 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkrgb.c (gdk_rgb_choose_visual): Free the
return value of gdk_list_visuals().
(Bug #1193 - Morten Welinder <terra@diku.dk>)
Tue May 4 11:12:56 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkim.c (gdk_im_real_open): cast the return value of
XSetIMValues to (void *) when comparing to NULL, to workaround
the problem of some compilers barfing since older X headers don't
have the prototype for it.
Mon Apr 19 10:11:12 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkcolor.c (gdk_colormap_new): Fix memory leak
for pseudocolor where colormap->colors was double
allocated.
* gdk/gdkcolor.c (gdk_colormap_alloc1): Store the
color value in the hash table with the pixel filled
in so when we do later hash table lookups, the color
value is correct.
Sun May 2 15:29:45 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkdraw.c (gdk_draw_lines): check private->destroyed before
making the call
Tue Apr 27 11:17:35 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.c (xdnd_set_{targets,actions}): Fix leak
pointed out by Morten Welinder <terra@diku.dk>.
Wed Apr 21 14:20:22 1999 George Lebl <jirka@5z.com>
* gdk/gdkwindow.c: (gdk_window_remove_filter) correctly remove the
default filter from the list
Wed Apr 21 14:20:22 1999 George Lebl <jirka@5z.com>
* gdk/gdkwindow.c: (gdk_window_remove_filter) correctly remove the
default filter from the list
Fri Apr 16 20:41:43 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdk.c: #include "gdkkeysyms.h" for gdk_XConvertCase #defines
* gtk/gtkfontsel.c (gtk_font_selection_create_xlfd): use
g_strdup_printf instead of calcing the length separately
Tue Apr 13 02:49:33 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c: removed some silly #ifdef HAVE_CONFIG
that we don't do in many other places. (Fixing duplicate
#include of config.h)
* gdk/gdkevents.c: include gdkinput.h _after_ config.h.
Otherwise, #ifndef XINPUT_NONE check in the latter
doesn't work. (Bug #546)
Sun Apr 11 14:38:03 1999 Tim Janik <timj@gtk.org>
* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): check for color
"None" case insensitive.
Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkselection.c:
Add error traps so if the other end of the connection
dies, we survive.
Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.c (gdk_drag_motion): Separate out the
dest_xid field into two fields - one for the window
to send in messages, one to indicate the last looked
up window for caching purposes. This is needed, so
that Leave messages get the correct window.
Mon Apr 5 13:21:30 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkevents.c (gdk_event_check, gdk_event_prepare):
Fix warning created by people mucking around
with the gsource API.
* gdk/gdkevents.c (gdk_io_invoke, gdk_input_add_full):
Change mapping between GIOCondition and GdkInputCondition
to match the way the Linux kernel does it. This should
fix problems where closed pipes were no longer signalling
GDK_INPUT_READ on systems with a native poll().
Mon Apr 5 17:11:57 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): Check
explicitly for the string "None" - it is in the XPM
spec and some servers treat unknown colors in odd ways
(like asking the user!)
Thu Apr 1 16:58:10 PST 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkevents.c: made "->" into a "." of previous change so
it compiles
Thu Apr 1 18:41:25 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkevents.c (gdk_compress_exposures): Set the
window field of the event structure before calling
user filters.
1999-03-31 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gdk/gdk.c (gdk_init_check): Use False as the last argument to
XInternAtom() here. This is a particularly Old And Nasty(tm) bug.
Mon Mar 29 17:31:52 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkim.c (gdk_mbstowcs): Free the value of the
intermediate text property - prevents major memory
leak when gdk_use_mb.
gtk-d3august-990311-0: Bj|rn Augustsson <d3august@dtek.chalmers.se>
Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com>
Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
gtk-a-higuti-990322-[0-3]
* gdk/gdkfont.c (gdk_text_extents_wc): Make work when
sizeof(wchar_t) != sizeof (GdkWChar)
* configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS
that was causing -DX_LOCALE not to work.
* gtk/gtkrc.c (gtk_rc_init):
X_LOCALE will never have LC_MESSAGES defined
* gdk/gdk.c (gdk_init_check):
Remove --xim-preedit and --xim-status from argv properly.
* gdk/gdkim.c (gdk_ic_real_new): Add a gdk_flush() so
that the client window is present on the X server
before we pass it to the input method.
Tue Mar 9 10:46:49 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.c (motif_find_drag_window): Fix bug where
if --display is specified on the command line, than
the drag window will not be created on that display.
Tue Mar 9 10:38:24 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_atom_intern): Fixed bug where
lookups with only_if_exists == TRUE were inserting
bogus values into the atom cache.
Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org>
* gdk/gdkselection.c (gdk_selection_property_get): first XFree(t),
then reset it to NULL.
* gdk/gdkcolor.c:
(gdk_colors_free):
(gdk_colormap_free_colors): use colormap->colors[in_pixels[i]] as the
key for g_hash_table_remove() in both functions, this prevents us
from accessing possibly uninitialized portions of a GdkColor structure
where we are only interested in its pixel value.
Tue Mar 9 01:01:28 1999 Tim Janik <timj@gtk.org>
* gdk/gdkfont.c (gdk_font_load): first lookup the xfont ID in our
font hash table, if we have a GdkFontPrivate entry for this font
already, simply increment its reference count, provided by Olaf Dietsche
<olaf.dietsche+list.gtk@netcologne.de>.
1999-09-21 Tor Lillqvist <tml@iki.fi>
1999-09-28 20:19:13 +00:00
|
|
|
size_hints.max_aspect.x = 65536;
|
|
|
|
size_hints.max_aspect.y = 65536 / geometry->max_aspect;;
|
1998-12-07 06:37:27 +00:00
|
|
|
}
|
|
|
|
}
|
[ Merges from gtk-1-2 ]
Wed Sep 8 07:13:29 1999 Tim Janik <timj@gtk.org>
* configure.in: fixed "GNU Make" check to pass with new make version
3.77.95.
Fri Sep 3 16:04:41 1999 Tim Janik <timj@gtk.org>
* gtk-config.in (--version): don't echo @GTK_VERSION@, but
@GTK_MAJOR_VERSION@.@GTK_MINOR_VERSION@.@GTK_MICRO_VERSION@, so the
AM_PATH_GTK() macros don't get confused by the -pre1.
Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (REBUILD): Change check for perl5
to check explicitely for v >= 5.002. (5.001
does not work with our scripts.)
Wed Aug 25 15:45:46 1999 Tim Janik <timj@gtk.org>
* configure.in: evaluate $PERL for the perl version check. added
--disable-rebuilds to give the user an option to completely disable
any source autogeneration rules.
Mon Aug 23 23:16:14 1999 Tim Janik <timj@gtk.org>
* configure.in: evaluate $ac_make when checking for GNU Make.
Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
* docs/Makefile.am: added generation.txt.
* Makefile.am: require automake 1.4, build README from README.in and
INSTALL from INSTALL.in in dist-hook.
* README.in:
* INSTALL.in: new files to autogenerate README and INSTALL from.
* configure.in: figure whether we have GNU Make
* docs/generation.txt: minor additions/corrections.
Wed Aug 11 13:38:26 BST 1999 Tony Gale <gale@gtk.org>
* docs/gtkfaq.sgml: FAQ Update
July 30, 1999 Elliot Lee <sopwith@redhat.com>
* configure.in: Fix autoconf warnings about cross compilation by
trying to provide sane defaults for AC_TRY_RUN.
Fri Jul 16 22:20:21 PDT 1999 Manish Singh <yosh@gimp.org>
* ltconfig
* ltmain.sh: upgrade to libtool 1.3.3
Thu Jul 8 11:30:18 1999 Owen Taylor <otaylor@redhat.com>
* INSTALL: Indicate that the --with-glib= configure
time flag is unsupported.
Mon Jul 5 20:36:03 1999 Owen Taylor <otaylor@redhat.com>
* docs/generation.txt: Added a file that gives
documenation about the autogeneration process for
various autogenerated files.
Tue Jun 29 15:59:25 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (LIBS): Look for libgmodule in the
right location.
Thu Jun 17 13:57:31 1999 Owen Taylor <otaylor@redhat.com>
* docs/gtk_tut.sgml: Removed references to
code examples in my directory on gtk.org as
they should all be in the tutorial now.
* docs/gtk_tut.sgml: Added sources for dial-test
and scribble-xinput programs that were previously
missing.
Fri Jun 4 00:08:59 1999 Owen Taylor <otaylor@redhat.com>
* TODO: Added entry about menu keyboard navigation, removed
some finished items.
Mon May 31 00:11:24 1999 Owen Taylor <otaylor@redhat.com>
* acinclude.m4: Standardize on func_dgettext
not func_gettext, so that the checks for dgettext
actually are paid attention to.
Wed May 5 10:47:54 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (LIBS): Add $INTLLIBS into $LIBS
directly, rather than repeating the checks for
gettext.
* INSTALL: Added information about gettext and
NLS support.
* acinclude.m4 (LIBM): Check for dgettext, not
just gettext. This should hopefully fix things wrt
systems with old versions of GNU gettext installed.
Tue Jun 29 15:59:25 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (LIBS): Look for libgmodule in the
right location.
Thu Apr 1 16:58:10 PST 1999 Manish Singh <yosh@gimp.org>
* autogen.sh: add --enable-maintainer-mode
* configure.in: set ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
Wed Mar 24 23:03:49 CST 1999 Shawn T. Amundson <amundson@gtk.org>
* docs/gtk-config.1.in:
docs/Makefile.am:
configure.in: gtk-config is now generated.
* docs/gtk-config.1: Removed, now generated.
Thu Sep 23 17:59:59 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): grr, even if Gdk doesn't
handle CreateNotify itself, still put out a debuging message for
--gdk-debug=events. made the ReparentNotify debugging message more
verbose.
wrap xcoords translation for ConfigureEvents into an error trap,
a destroy event may already be pending, and in that case, the
actuall coordinate values are not at all critical.
Sat Sep 18 22:24:15 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkcc.c: Stop leaking the color_hash all over
the place. Simplify and improve the logic.
Fri Sep 17 09:57:15 1999 Tim Janik <timj@gtk.org>
* gdk/gdk.h, gdk/gdkcolor.c: make return types (gint or gboolean)
for prototypes and function implementations consistent (reported
by Tomas Ogren).
Tue Sep 14 18:23:01 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): tell if expose events have
send_event set in debugging output.
(gdk_compress_exposures): default initialize the event so we don't
operate on bogus values (namely send_event).
Thu Sep 2 16:33:59 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c: When we receive an unexpected
destroy notify on one of our windows, don't just
warn about it, also mark our windows as destroyed.
Sun Sep 5 08:10:53 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkfont.c (gdk_font_hash_insert): Add
name => font and name => fontset hashes. The
name => fontset hash is a _big_ win since we
weren't previously caching fontsets at all and loading
fontsets is expensive. The name => font hash
is less of a win, but it does save us from doing
repeated XQueryFont calls on the same font.
* gdk/gdkprivate.h (struct _GdkFontPrivate): Add a names
list so we can remove font/fontset from hash.
Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_atom_intern): Remove useless
and slightly confusing test. [ XInternAtom (,,TRUE)
will never return None ].
Sat Sep 4 08:39:26 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_set_geometry_hints)
gdk/gdkwindow.c (gdk_window_set_hints):
Don't omit setting the properties if flags == 0 -
there may be an existing set of properties there
already. (Very old bug. Would it be better to
delete the property instead?)
* gdk/gdkselection.c (gdk_selection_property_get): Fix
spelling error in comment.
Wed Sep 1 14:05:30 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkimage.c (gdk_image_new): Use gdk_error_trap_push()
to avoid stomping over gdk_error_warnings.
* gdk/gdkimage.c (gdk_image_new): compute image->bpp
as (bits_per_pixel + 7) / 8. This gives the same
result as before for multiples of 8, but actually
a "reasonable" value for 1bit or 4bit displays.
Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
* gdk/Makefile.am: minor cleanups, strip spaces on build rules for
GNU Make.
Tue Aug 17 07:43:04 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): give a debugging note when
discarding configure events.
1999-08-18 Federico Mena Quintero <federico@redhat.com>
* gdk/gdkpixmap.c (gdk_pixmap_unref): g_return_if_fail() the
refcount is greater than zero.
* gdk/gdkwindow.c (gdk_window_unref): Likewise.
* gdk/gdkfont.c (gdk_font_unref): Likewise.
* gdk/gdkgc.c (gdk_gc_unref): Likewise.
* gdk/gdkdnd.c (gdk_drag_context_unref): Likewise.
Wed Aug 11 01:04:57 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_property_get): Fix assumption
that format 32 => sizeof(item) == 4. It really is
sizeof(long).
Tue Jun 29 23:02:42 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c (gdk_x_error / gdk_x_io_error): Don't
core dump at all on X IO errors, only core dump
if --enable-debug for X errors.
Thu Jun 24 17:06:23 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): removed old ""Got event for
unknown window:" message. disabled ConfigureNotify discarding code,
because it led to events being processed out of order.
Thu Jun 24 12:22:02 1999 Tim Janik <timj@gtk.org>
* gdk/gdkglobals.c: preinitialize gdk_error_code to 0.
* gdk/gdkevents.c (gdk_event_send_client_message_to_all_recurse): since
we export this function, supress error warnings and don't reset the
error code in the first half of this function.
* gdk/gdk.c (gdk_x_error): set gdk_error_code to the actuall X error
code (instead of just -1) so gdk_error_trap_pop() reveals something
actually informative about the error that happened.
* gdk/*.c:
don't rely on gdk_error_code being -1 if an error occoured, but just
gdk_error_code != 0.
Thu Jun 24 11:50:07 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_apply_filters): advance the filter list
pointer *before* invoking the filter function, so we at least don't
crash if a filter is removed that is currently executed. window filters
*really* need to be made truely reentrant at some point.
Mon Jun 14 11:10:15 1999 Tim Janik <timj@gtk.org>
* gdk/gdkevents.c (gdk_event_translate): print the atom name in the
PropertyNotify debug messages.
Wed May 5 22:51:06 1999 Owen Taylor <otaylor@redhat.com>
Patch from Sung-Hyun Nam <namsh@lgic.co.kr>
* gdk/gdkim.c: Fix cut-and-paste errors for
x/y and PreeditAttributes/StatusAttributes.
Wed May 5 22:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_set_geometry_hints): Change
G_MAXINT to 2^16 to alleviate overflow problems in
various window managers.
Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkfont.c (gdk_text_measure): Fix the return value
for fontsets.
Wed May 5 12:42:01 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_set_geometry_hints):
Initialize size_hints.x and size_hints.y because kwm
brokenly pays attention to them.
(Bug #1181 - Lars Heete <hel@admin.de>)
Wed May 5 11:38:56 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkrgb.c (gdk_rgb_choose_visual): Free the
return value of gdk_list_visuals().
(Bug #1193 - Morten Welinder <terra@diku.dk>)
Tue May 4 11:12:56 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkim.c (gdk_im_real_open): cast the return value of
XSetIMValues to (void *) when comparing to NULL, to workaround
the problem of some compilers barfing since older X headers don't
have the prototype for it.
Mon Apr 19 10:11:12 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkcolor.c (gdk_colormap_new): Fix memory leak
for pseudocolor where colormap->colors was double
allocated.
* gdk/gdkcolor.c (gdk_colormap_alloc1): Store the
color value in the hash table with the pixel filled
in so when we do later hash table lookups, the color
value is correct.
Sun May 2 15:29:45 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkdraw.c (gdk_draw_lines): check private->destroyed before
making the call
Tue Apr 27 11:17:35 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.c (xdnd_set_{targets,actions}): Fix leak
pointed out by Morten Welinder <terra@diku.dk>.
Wed Apr 21 14:20:22 1999 George Lebl <jirka@5z.com>
* gdk/gdkwindow.c: (gdk_window_remove_filter) correctly remove the
default filter from the list
Wed Apr 21 14:20:22 1999 George Lebl <jirka@5z.com>
* gdk/gdkwindow.c: (gdk_window_remove_filter) correctly remove the
default filter from the list
Fri Apr 16 20:41:43 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdk.c: #include "gdkkeysyms.h" for gdk_XConvertCase #defines
* gtk/gtkfontsel.c (gtk_font_selection_create_xlfd): use
g_strdup_printf instead of calcing the length separately
Tue Apr 13 02:49:33 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c: removed some silly #ifdef HAVE_CONFIG
that we don't do in many other places. (Fixing duplicate
#include of config.h)
* gdk/gdkevents.c: include gdkinput.h _after_ config.h.
Otherwise, #ifndef XINPUT_NONE check in the latter
doesn't work. (Bug #546)
Sun Apr 11 14:38:03 1999 Tim Janik <timj@gtk.org>
* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): check for color
"None" case insensitive.
Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkselection.c:
Add error traps so if the other end of the connection
dies, we survive.
Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.c (gdk_drag_motion): Separate out the
dest_xid field into two fields - one for the window
to send in messages, one to indicate the last looked
up window for caching purposes. This is needed, so
that Leave messages get the correct window.
Mon Apr 5 13:21:30 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkevents.c (gdk_event_check, gdk_event_prepare):
Fix warning created by people mucking around
with the gsource API.
* gdk/gdkevents.c (gdk_io_invoke, gdk_input_add_full):
Change mapping between GIOCondition and GdkInputCondition
to match the way the Linux kernel does it. This should
fix problems where closed pipes were no longer signalling
GDK_INPUT_READ on systems with a native poll().
Mon Apr 5 17:11:57 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): Check
explicitly for the string "None" - it is in the XPM
spec and some servers treat unknown colors in odd ways
(like asking the user!)
Thu Apr 1 16:58:10 PST 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkevents.c: made "->" into a "." of previous change so
it compiles
Thu Apr 1 18:41:25 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkevents.c (gdk_compress_exposures): Set the
window field of the event structure before calling
user filters.
1999-03-31 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gdk/gdk.c (gdk_init_check): Use False as the last argument to
XInternAtom() here. This is a particularly Old And Nasty(tm) bug.
Mon Mar 29 17:31:52 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkim.c (gdk_mbstowcs): Free the value of the
intermediate text property - prevents major memory
leak when gdk_use_mb.
gtk-d3august-990311-0: Bj|rn Augustsson <d3august@dtek.chalmers.se>
Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com>
Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
gtk-a-higuti-990322-[0-3]
* gdk/gdkfont.c (gdk_text_extents_wc): Make work when
sizeof(wchar_t) != sizeof (GdkWChar)
* configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS
that was causing -DX_LOCALE not to work.
* gtk/gtkrc.c (gtk_rc_init):
X_LOCALE will never have LC_MESSAGES defined
* gdk/gdk.c (gdk_init_check):
Remove --xim-preedit and --xim-status from argv properly.
* gdk/gdkim.c (gdk_ic_real_new): Add a gdk_flush() so
that the client window is present on the X server
before we pass it to the input method.
Tue Mar 9 10:46:49 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.c (motif_find_drag_window): Fix bug where
if --display is specified on the command line, than
the drag window will not be created on that display.
Tue Mar 9 10:38:24 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_atom_intern): Fixed bug where
lookups with only_if_exists == TRUE were inserting
bogus values into the atom cache.
Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org>
* gdk/gdkselection.c (gdk_selection_property_get): first XFree(t),
then reset it to NULL.
* gdk/gdkcolor.c:
(gdk_colors_free):
(gdk_colormap_free_colors): use colormap->colors[in_pixels[i]] as the
key for g_hash_table_remove() in both functions, this prevents us
from accessing possibly uninitialized portions of a GdkColor structure
where we are only interested in its pixel value.
Tue Mar 9 01:01:28 1999 Tim Janik <timj@gtk.org>
* gdk/gdkfont.c (gdk_font_load): first lookup the xfont ID in our
font hash table, if we have a GdkFontPrivate entry for this font
already, simply increment its reference count, provided by Olaf Dietsche
<olaf.dietsche+list.gtk@netcologne.de>.
1999-09-21 Tor Lillqvist <tml@iki.fi>
1999-09-28 20:19:13 +00:00
|
|
|
|
|
|
|
/* FIXME: Would it be better to delete this property of
|
|
|
|
* geom_mask == 0? It would save space on the server
|
|
|
|
*/
|
1999-10-03 22:12:41 +00:00
|
|
|
XSetWMNormalHints (GDK_DRAWABLE_XDISPLAY (window),
|
|
|
|
GDK_DRAWABLE_XID (window),
|
|
|
|
&size_hints);
|
1998-12-07 06:37:27 +00:00
|
|
|
}
|
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
void
|
|
|
|
gdk_window_set_title (GdkWindow *window,
|
|
|
|
const gchar *title)
|
|
|
|
{
|
|
|
|
g_return_if_fail (window != NULL);
|
1999-10-03 22:12:41 +00:00
|
|
|
g_return_if_fail (GDK_IS_WINDOW (window));
|
1998-03-08 03:32:05 +00:00
|
|
|
|
1999-10-03 22:12:41 +00:00
|
|
|
if (!GDK_DRAWABLE_DESTROYED (window))
|
|
|
|
XmbSetWMProperties (GDK_DRAWABLE_XDISPLAY (window),
|
|
|
|
GDK_DRAWABLE_XID (window),
|
1998-01-26 01:20:14 +00:00
|
|
|
title, title, NULL, 0, NULL, NULL, NULL);
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
|
|
|
|
1998-12-07 06:37:27 +00:00
|
|
|
void
|
|
|
|
gdk_window_set_role (GdkWindow *window,
|
|
|
|
const gchar *role)
|
|
|
|
{
|
|
|
|
g_return_if_fail (window != NULL);
|
1999-10-03 22:12:41 +00:00
|
|
|
g_return_if_fail (GDK_IS_WINDOW (window));
|
|
|
|
|
|
|
|
if (!GDK_DRAWABLE_DESTROYED (window))
|
|
|
|
{
|
|
|
|
if (role)
|
|
|
|
XChangeProperty (GDK_DRAWABLE_XDISPLAY (window), GDK_DRAWABLE_XID (window),
|
|
|
|
gdk_atom_intern ("WM_WINDOW_ROLE", FALSE), XA_STRING,
|
|
|
|
8, PropModeReplace, role, strlen (role));
|
|
|
|
else
|
|
|
|
XDeleteProperty (GDK_DRAWABLE_XDISPLAY (window), GDK_DRAWABLE_XID (window),
|
|
|
|
gdk_atom_intern ("WM_WINDOW_ROLE", FALSE));
|
|
|
|
}
|
1998-12-07 06:37:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
gdk_window_set_transient_for (GdkWindow *window,
|
|
|
|
GdkWindow *parent)
|
|
|
|
{
|
|
|
|
GdkWindowPrivate *private;
|
|
|
|
GdkWindowPrivate *parent_private;
|
|
|
|
|
|
|
|
g_return_if_fail (window != NULL);
|
1999-10-03 22:12:41 +00:00
|
|
|
g_return_if_fail (GDK_IS_WINDOW (window));
|
1998-12-07 06:37:27 +00:00
|
|
|
|
|
|
|
private = (GdkWindowPrivate*) window;
|
|
|
|
parent_private = (GdkWindowPrivate*) parent;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1999-10-03 22:12:41 +00:00
|
|
|
if (!GDK_DRAWABLE_DESTROYED (window) && !GDK_DRAWABLE_DESTROYED (parent))
|
|
|
|
XSetTransientForHint (GDK_DRAWABLE_XDISPLAY (window),
|
|
|
|
GDK_DRAWABLE_XID (window),
|
|
|
|
GDK_DRAWABLE_XID (parent));
|
1998-12-07 06:37:27 +00:00
|
|
|
}
|
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
void
|
|
|
|
gdk_window_set_background (GdkWindow *window,
|
|
|
|
GdkColor *color)
|
|
|
|
{
|
|
|
|
g_return_if_fail (window != NULL);
|
1999-10-03 22:12:41 +00:00
|
|
|
g_return_if_fail (GDK_IS_WINDOW (window));
|
1998-03-08 03:32:05 +00:00
|
|
|
|
1999-10-03 22:12:41 +00:00
|
|
|
if (!GDK_DRAWABLE_DESTROYED (window))
|
|
|
|
XSetWindowBackground (GDK_DRAWABLE_XDISPLAY (window),
|
|
|
|
GDK_DRAWABLE_XID (window), color->pixel);
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
gdk_window_set_back_pixmap (GdkWindow *window,
|
|
|
|
GdkPixmap *pixmap,
|
|
|
|
gint parent_relative)
|
|
|
|
{
|
|
|
|
Pixmap xpixmap;
|
1998-03-08 03:32:05 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
g_return_if_fail (window != NULL);
|
1999-10-03 22:12:41 +00:00
|
|
|
g_return_if_fail (GDK_IS_WINDOW (window));
|
1998-03-08 03:32:05 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
if (pixmap)
|
1999-10-03 22:12:41 +00:00
|
|
|
xpixmap = GDK_DRAWABLE_XID (pixmap);
|
1997-11-24 22:37:52 +00:00
|
|
|
else
|
|
|
|
xpixmap = None;
|
1998-03-08 03:32:05 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
if (parent_relative)
|
|
|
|
xpixmap = ParentRelative;
|
1998-03-08 03:32:05 +00:00
|
|
|
|
1999-10-03 22:12:41 +00:00
|
|
|
if (!GDK_DRAWABLE_DESTROYED (window))
|
|
|
|
XSetWindowBackgroundPixmap (GDK_DRAWABLE_XDISPLAY (window),
|
|
|
|
GDK_DRAWABLE_XID (window), xpixmap);
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
gdk_window_set_cursor (GdkWindow *window,
|
|
|
|
GdkCursor *cursor)
|
|
|
|
{
|
|
|
|
GdkCursorPrivate *cursor_private;
|
|
|
|
Cursor xcursor;
|
1998-03-08 03:32:05 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
g_return_if_fail (window != NULL);
|
1999-10-03 22:12:41 +00:00
|
|
|
g_return_if_fail (GDK_IS_WINDOW (window));
|
1998-03-08 03:32:05 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
cursor_private = (GdkCursorPrivate*) cursor;
|
1998-03-08 03:32:05 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
if (!cursor)
|
|
|
|
xcursor = None;
|
|
|
|
else
|
|
|
|
xcursor = cursor_private->xcursor;
|
1998-03-08 03:32:05 +00:00
|
|
|
|
1999-10-03 22:12:41 +00:00
|
|
|
if (!GDK_DRAWABLE_DESTROYED (window))
|
|
|
|
XDefineCursor (GDK_DRAWABLE_XDISPLAY (window),
|
|
|
|
GDK_DRAWABLE_XID (window),
|
|
|
|
xcursor);
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
gdk_window_get_geometry (GdkWindow *window,
|
|
|
|
gint *x,
|
|
|
|
gint *y,
|
|
|
|
gint *width,
|
|
|
|
gint *height,
|
|
|
|
gint *depth)
|
|
|
|
{
|
|
|
|
Window root;
|
|
|
|
gint tx;
|
|
|
|
gint ty;
|
|
|
|
guint twidth;
|
|
|
|
guint theight;
|
|
|
|
guint tborder_width;
|
|
|
|
guint tdepth;
|
1998-03-08 03:32:05 +00:00
|
|
|
|
1999-10-03 22:12:41 +00:00
|
|
|
g_return_if_fail (window == NULL || GDK_IS_WINDOW (window));
|
1998-03-08 03:32:05 +00:00
|
|
|
|
1999-10-03 22:12:41 +00:00
|
|
|
if (!window)
|
1999-11-08 20:14:59 +00:00
|
|
|
window = gdk_parent_root;
|
1998-03-08 03:32:05 +00:00
|
|
|
|
1999-10-03 22:12:41 +00:00
|
|
|
if (!GDK_DRAWABLE_DESTROYED (window))
|
1998-01-26 01:20:14 +00:00
|
|
|
{
|
1999-10-03 22:12:41 +00:00
|
|
|
XGetGeometry (GDK_DRAWABLE_XDISPLAY (window),
|
|
|
|
GDK_DRAWABLE_XID (window),
|
1998-01-26 01:20:14 +00:00
|
|
|
&root, &tx, &ty, &twidth, &theight, &tborder_width, &tdepth);
|
|
|
|
|
|
|
|
if (x)
|
|
|
|
*x = tx;
|
|
|
|
if (y)
|
|
|
|
*y = ty;
|
|
|
|
if (width)
|
|
|
|
*width = twidth;
|
|
|
|
if (height)
|
|
|
|
*height = theight;
|
|
|
|
if (depth)
|
|
|
|
*depth = tdepth;
|
|
|
|
}
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
gint
|
|
|
|
gdk_window_get_origin (GdkWindow *window,
|
|
|
|
gint *x,
|
|
|
|
gint *y)
|
|
|
|
{
|
|
|
|
gint return_val;
|
|
|
|
Window child;
|
1998-06-24 17:15:05 +00:00
|
|
|
gint tx = 0;
|
|
|
|
gint ty = 0;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
g_return_val_if_fail (window != NULL, 0);
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1999-10-03 22:12:41 +00:00
|
|
|
if (!GDK_DRAWABLE_DESTROYED (window))
|
1998-01-26 01:20:14 +00:00
|
|
|
{
|
1999-10-03 22:12:41 +00:00
|
|
|
return_val = XTranslateCoordinates (GDK_DRAWABLE_XDISPLAY (window),
|
|
|
|
GDK_DRAWABLE_XID (window),
|
1998-01-26 01:20:14 +00:00
|
|
|
gdk_root_window,
|
|
|
|
0, 0, &tx, &ty,
|
|
|
|
&child);
|
|
|
|
|
|
|
|
}
|
|
|
|
else
|
|
|
|
return_val = 0;
|
|
|
|
|
1998-06-24 17:15:05 +00:00
|
|
|
if (x)
|
|
|
|
*x = tx;
|
|
|
|
if (y)
|
|
|
|
*y = ty;
|
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
return return_val;
|
1998-11-18 03:15:14 +00:00
|
|
|
}
|
|
|
|
|
1998-11-22 00:06:57 +00:00
|
|
|
gboolean
|
1998-11-18 03:15:14 +00:00
|
|
|
gdk_window_get_deskrelative_origin (GdkWindow *window,
|
|
|
|
gint *x,
|
|
|
|
gint *y)
|
|
|
|
{
|
1998-11-22 00:06:57 +00:00
|
|
|
gboolean return_val = FALSE;
|
|
|
|
gint num_children, format_return;
|
1998-11-18 03:15:14 +00:00
|
|
|
Window win, *child, parent, root;
|
|
|
|
gint tx = 0;
|
|
|
|
gint ty = 0;
|
|
|
|
Atom type_return;
|
|
|
|
static Atom atom = 0;
|
|
|
|
gulong number_return, bytes_after_return;
|
|
|
|
guchar *data_return;
|
|
|
|
|
|
|
|
g_return_val_if_fail (window != NULL, 0);
|
1999-10-03 22:12:41 +00:00
|
|
|
g_return_val_if_fail (GDK_IS_WINDOW (window), 0);
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1999-10-03 22:12:41 +00:00
|
|
|
if (!GDK_DRAWABLE_DESTROYED (window))
|
1998-11-18 03:15:14 +00:00
|
|
|
{
|
|
|
|
if (!atom)
|
1999-10-03 22:12:41 +00:00
|
|
|
atom = gdk_atom_intern ("ENLIGHTENMENT_DESKTOP", FALSE);
|
|
|
|
win = GDK_DRAWABLE_XID (window);
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1999-10-03 22:12:41 +00:00
|
|
|
while (XQueryTree (GDK_DRAWABLE_XDISPLAY (window), win, &root, &parent,
|
1999-02-10 08:06:30 +00:00
|
|
|
&child, (unsigned int *)&num_children))
|
1998-11-18 03:15:14 +00:00
|
|
|
{
|
|
|
|
if ((child) && (num_children > 0))
|
1999-02-10 08:06:30 +00:00
|
|
|
XFree (child);
|
|
|
|
|
1998-11-22 00:06:57 +00:00
|
|
|
if (!parent)
|
|
|
|
break;
|
|
|
|
else
|
|
|
|
win = parent;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1998-11-22 00:06:57 +00:00
|
|
|
if (win == root)
|
|
|
|
break;
|
|
|
|
|
1998-11-18 03:15:14 +00:00
|
|
|
data_return = NULL;
|
1999-10-03 22:12:41 +00:00
|
|
|
XGetWindowProperty (GDK_DRAWABLE_XDISPLAY (window), win, atom, 0, 0,
|
1999-02-10 08:06:30 +00:00
|
|
|
False, XA_CARDINAL, &type_return, &format_return,
|
|
|
|
&number_return, &bytes_after_return, &data_return);
|
1998-11-22 00:06:57 +00:00
|
|
|
if (type_return == XA_CARDINAL)
|
1998-11-18 03:15:14 +00:00
|
|
|
{
|
1999-02-10 08:06:30 +00:00
|
|
|
XFree (data_return);
|
1998-11-18 03:15:14 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1999-10-03 22:12:41 +00:00
|
|
|
return_val = XTranslateCoordinates (GDK_DRAWABLE_XDISPLAY (window),
|
|
|
|
GDK_DRAWABLE_XID (window),
|
1998-11-22 00:06:57 +00:00
|
|
|
win,
|
|
|
|
0, 0, &tx, &ty,
|
|
|
|
&root);
|
|
|
|
if (x)
|
|
|
|
*x = tx;
|
|
|
|
if (y)
|
|
|
|
*y = ty;
|
1998-11-18 03:15:14 +00:00
|
|
|
}
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1998-11-18 03:15:14 +00:00
|
|
|
|
|
|
|
return return_val;
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
|
|
|
|
new function to get the *real* geometry position of a window, taken
Sat Sep 25 23:33:55 1998 Tim Janik <timj@gtk.org>
* gdk/gdkwindow.c (gdk_window_get_root_origin): new function to get
the *real* geometry position of a window, taken possible window
manager offsets into account.
this has been succesfully tested with fvwm, fvwm-2, bowman, olwm,
olvwm, twm, ctwm, mlvwm, windowmaker and enlightenment.
it does fail though for amiwm which adds windows to a pseudo root
window, and for icewm by a small offset because it defines the
geometry position whithin its border.
* gtk/testgtk.c: added "saved position" test to figure how
gdk_window_get_root_origin() interacts with window managers (repopup
this window to figure ;).
1998-09-25 23:04:32 +00:00
|
|
|
void
|
|
|
|
gdk_window_get_root_origin (GdkWindow *window,
|
|
|
|
gint *x,
|
|
|
|
gint *y)
|
|
|
|
{
|
|
|
|
GdkWindowPrivate *private;
|
|
|
|
Window xwindow;
|
|
|
|
Window xparent;
|
|
|
|
Window root;
|
|
|
|
Window *children;
|
|
|
|
unsigned int nchildren;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
new function to get the *real* geometry position of a window, taken
Sat Sep 25 23:33:55 1998 Tim Janik <timj@gtk.org>
* gdk/gdkwindow.c (gdk_window_get_root_origin): new function to get
the *real* geometry position of a window, taken possible window
manager offsets into account.
this has been succesfully tested with fvwm, fvwm-2, bowman, olwm,
olvwm, twm, ctwm, mlvwm, windowmaker and enlightenment.
it does fail though for amiwm which adds windows to a pseudo root
window, and for icewm by a small offset because it defines the
geometry position whithin its border.
* gtk/testgtk.c: added "saved position" test to figure how
gdk_window_get_root_origin() interacts with window managers (repopup
this window to figure ;).
1998-09-25 23:04:32 +00:00
|
|
|
g_return_if_fail (window != NULL);
|
1999-10-03 22:12:41 +00:00
|
|
|
g_return_if_fail (GDK_IS_WINDOW (window));
|
1999-02-10 08:06:30 +00:00
|
|
|
|
new function to get the *real* geometry position of a window, taken
Sat Sep 25 23:33:55 1998 Tim Janik <timj@gtk.org>
* gdk/gdkwindow.c (gdk_window_get_root_origin): new function to get
the *real* geometry position of a window, taken possible window
manager offsets into account.
this has been succesfully tested with fvwm, fvwm-2, bowman, olwm,
olvwm, twm, ctwm, mlvwm, windowmaker and enlightenment.
it does fail though for amiwm which adds windows to a pseudo root
window, and for icewm by a small offset because it defines the
geometry position whithin its border.
* gtk/testgtk.c: added "saved position" test to figure how
gdk_window_get_root_origin() interacts with window managers (repopup
this window to figure ;).
1998-09-25 23:04:32 +00:00
|
|
|
private = (GdkWindowPrivate*) window;
|
|
|
|
if (x)
|
|
|
|
*x = 0;
|
|
|
|
if (y)
|
|
|
|
*y = 0;
|
1999-10-03 22:12:41 +00:00
|
|
|
|
|
|
|
if (GDK_DRAWABLE_DESTROYED (window))
|
new function to get the *real* geometry position of a window, taken
Sat Sep 25 23:33:55 1998 Tim Janik <timj@gtk.org>
* gdk/gdkwindow.c (gdk_window_get_root_origin): new function to get
the *real* geometry position of a window, taken possible window
manager offsets into account.
this has been succesfully tested with fvwm, fvwm-2, bowman, olwm,
olvwm, twm, ctwm, mlvwm, windowmaker and enlightenment.
it does fail though for amiwm which adds windows to a pseudo root
window, and for icewm by a small offset because it defines the
geometry position whithin its border.
* gtk/testgtk.c: added "saved position" test to figure how
gdk_window_get_root_origin() interacts with window managers (repopup
this window to figure ;).
1998-09-25 23:04:32 +00:00
|
|
|
return;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
new function to get the *real* geometry position of a window, taken
Sat Sep 25 23:33:55 1998 Tim Janik <timj@gtk.org>
* gdk/gdkwindow.c (gdk_window_get_root_origin): new function to get
the *real* geometry position of a window, taken possible window
manager offsets into account.
this has been succesfully tested with fvwm, fvwm-2, bowman, olwm,
olvwm, twm, ctwm, mlvwm, windowmaker and enlightenment.
it does fail though for amiwm which adds windows to a pseudo root
window, and for icewm by a small offset because it defines the
geometry position whithin its border.
* gtk/testgtk.c: added "saved position" test to figure how
gdk_window_get_root_origin() interacts with window managers (repopup
this window to figure ;).
1998-09-25 23:04:32 +00:00
|
|
|
while (private->parent && ((GdkWindowPrivate*) private->parent)->parent)
|
|
|
|
private = (GdkWindowPrivate*) private->parent;
|
1999-10-03 22:12:41 +00:00
|
|
|
if (GDK_DRAWABLE_DESTROYED (window))
|
new function to get the *real* geometry position of a window, taken
Sat Sep 25 23:33:55 1998 Tim Janik <timj@gtk.org>
* gdk/gdkwindow.c (gdk_window_get_root_origin): new function to get
the *real* geometry position of a window, taken possible window
manager offsets into account.
this has been succesfully tested with fvwm, fvwm-2, bowman, olwm,
olvwm, twm, ctwm, mlvwm, windowmaker and enlightenment.
it does fail though for amiwm which adds windows to a pseudo root
window, and for icewm by a small offset because it defines the
geometry position whithin its border.
* gtk/testgtk.c: added "saved position" test to figure how
gdk_window_get_root_origin() interacts with window managers (repopup
this window to figure ;).
1998-09-25 23:04:32 +00:00
|
|
|
return;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1999-10-03 22:12:41 +00:00
|
|
|
xparent = GDK_DRAWABLE_XID (window);
|
new function to get the *real* geometry position of a window, taken
Sat Sep 25 23:33:55 1998 Tim Janik <timj@gtk.org>
* gdk/gdkwindow.c (gdk_window_get_root_origin): new function to get
the *real* geometry position of a window, taken possible window
manager offsets into account.
this has been succesfully tested with fvwm, fvwm-2, bowman, olwm,
olvwm, twm, ctwm, mlvwm, windowmaker and enlightenment.
it does fail though for amiwm which adds windows to a pseudo root
window, and for icewm by a small offset because it defines the
geometry position whithin its border.
* gtk/testgtk.c: added "saved position" test to figure how
gdk_window_get_root_origin() interacts with window managers (repopup
this window to figure ;).
1998-09-25 23:04:32 +00:00
|
|
|
do
|
|
|
|
{
|
|
|
|
xwindow = xparent;
|
1999-10-03 22:12:41 +00:00
|
|
|
if (!XQueryTree (GDK_DRAWABLE_XDISPLAY (window), xwindow,
|
new function to get the *real* geometry position of a window, taken
Sat Sep 25 23:33:55 1998 Tim Janik <timj@gtk.org>
* gdk/gdkwindow.c (gdk_window_get_root_origin): new function to get
the *real* geometry position of a window, taken possible window
manager offsets into account.
this has been succesfully tested with fvwm, fvwm-2, bowman, olwm,
olvwm, twm, ctwm, mlvwm, windowmaker and enlightenment.
it does fail though for amiwm which adds windows to a pseudo root
window, and for icewm by a small offset because it defines the
geometry position whithin its border.
* gtk/testgtk.c: added "saved position" test to figure how
gdk_window_get_root_origin() interacts with window managers (repopup
this window to figure ;).
1998-09-25 23:04:32 +00:00
|
|
|
&root, &xparent,
|
|
|
|
&children, &nchildren))
|
|
|
|
return;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
new function to get the *real* geometry position of a window, taken
Sat Sep 25 23:33:55 1998 Tim Janik <timj@gtk.org>
* gdk/gdkwindow.c (gdk_window_get_root_origin): new function to get
the *real* geometry position of a window, taken possible window
manager offsets into account.
this has been succesfully tested with fvwm, fvwm-2, bowman, olwm,
olvwm, twm, ctwm, mlvwm, windowmaker and enlightenment.
it does fail though for amiwm which adds windows to a pseudo root
window, and for icewm by a small offset because it defines the
geometry position whithin its border.
* gtk/testgtk.c: added "saved position" test to figure how
gdk_window_get_root_origin() interacts with window managers (repopup
this window to figure ;).
1998-09-25 23:04:32 +00:00
|
|
|
if (children)
|
|
|
|
XFree (children);
|
|
|
|
}
|
|
|
|
while (xparent != root);
|
1999-02-10 08:06:30 +00:00
|
|
|
|
new function to get the *real* geometry position of a window, taken
Sat Sep 25 23:33:55 1998 Tim Janik <timj@gtk.org>
* gdk/gdkwindow.c (gdk_window_get_root_origin): new function to get
the *real* geometry position of a window, taken possible window
manager offsets into account.
this has been succesfully tested with fvwm, fvwm-2, bowman, olwm,
olvwm, twm, ctwm, mlvwm, windowmaker and enlightenment.
it does fail though for amiwm which adds windows to a pseudo root
window, and for icewm by a small offset because it defines the
geometry position whithin its border.
* gtk/testgtk.c: added "saved position" test to figure how
gdk_window_get_root_origin() interacts with window managers (repopup
this window to figure ;).
1998-09-25 23:04:32 +00:00
|
|
|
if (xparent == root)
|
|
|
|
{
|
|
|
|
unsigned int ww, wh, wb, wd;
|
|
|
|
int wx, wy;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1999-10-03 22:12:41 +00:00
|
|
|
if (XGetGeometry (GDK_DRAWABLE_XDISPLAY (window), xwindow, &root, &wx, &wy, &ww, &wh, &wb, &wd))
|
new function to get the *real* geometry position of a window, taken
Sat Sep 25 23:33:55 1998 Tim Janik <timj@gtk.org>
* gdk/gdkwindow.c (gdk_window_get_root_origin): new function to get
the *real* geometry position of a window, taken possible window
manager offsets into account.
this has been succesfully tested with fvwm, fvwm-2, bowman, olwm,
olvwm, twm, ctwm, mlvwm, windowmaker and enlightenment.
it does fail though for amiwm which adds windows to a pseudo root
window, and for icewm by a small offset because it defines the
geometry position whithin its border.
* gtk/testgtk.c: added "saved position" test to figure how
gdk_window_get_root_origin() interacts with window managers (repopup
this window to figure ;).
1998-09-25 23:04:32 +00:00
|
|
|
{
|
|
|
|
if (x)
|
|
|
|
*x = wx;
|
|
|
|
if (y)
|
|
|
|
*y = wy;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
GdkWindow*
|
|
|
|
gdk_window_get_pointer (GdkWindow *window,
|
|
|
|
gint *x,
|
|
|
|
gint *y,
|
|
|
|
GdkModifierType *mask)
|
|
|
|
{
|
|
|
|
GdkWindow *return_val;
|
|
|
|
Window root;
|
|
|
|
Window child;
|
|
|
|
int rootx, rooty;
|
1998-06-24 17:15:05 +00:00
|
|
|
int winx = 0;
|
|
|
|
int winy = 0;
|
|
|
|
unsigned int xmask = 0;
|
1999-10-03 22:12:41 +00:00
|
|
|
|
|
|
|
g_return_val_if_fail (window == NULL || GDK_IS_WINDOW (window), NULL);
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
if (!window)
|
1999-11-08 20:14:59 +00:00
|
|
|
window = gdk_parent_root;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
return_val = NULL;
|
1999-10-03 22:12:41 +00:00
|
|
|
if (!GDK_DRAWABLE_DESTROYED (window) &&
|
|
|
|
XQueryPointer (GDK_DRAWABLE_XDISPLAY (window),
|
|
|
|
GDK_DRAWABLE_XID (window),
|
|
|
|
&root, &child, &rootx, &rooty, &winx, &winy, &xmask))
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
|
|
|
if (child)
|
|
|
|
return_val = gdk_window_lookup (child);
|
|
|
|
}
|
1998-01-26 01:20:14 +00:00
|
|
|
|
1998-06-24 17:15:05 +00:00
|
|
|
if (x)
|
|
|
|
*x = winx;
|
|
|
|
if (y)
|
|
|
|
*y = winy;
|
|
|
|
if (mask)
|
|
|
|
*mask = xmask;
|
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
return return_val;
|
|
|
|
}
|
|
|
|
|
1998-06-17 08:48:22 +00:00
|
|
|
GdkWindow*
|
|
|
|
gdk_window_at_pointer (gint *win_x,
|
|
|
|
gint *win_y)
|
|
|
|
{
|
|
|
|
GdkWindow *window;
|
|
|
|
Window root;
|
|
|
|
Window xwindow;
|
|
|
|
Window xwindow_last = 0;
|
1999-11-08 20:14:59 +00:00
|
|
|
Display *xdisplay;
|
1998-06-17 08:48:22 +00:00
|
|
|
int rootx = -1, rooty = -1;
|
|
|
|
int winx, winy;
|
|
|
|
unsigned int xmask;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1999-11-08 20:14:59 +00:00
|
|
|
xwindow = GDK_ROOT_WINDOW ();
|
|
|
|
xdisplay = GDK_DISPLAY ();
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1999-11-08 20:14:59 +00:00
|
|
|
XGrabServer (xdisplay);
|
1998-06-17 08:48:22 +00:00
|
|
|
while (xwindow)
|
|
|
|
{
|
|
|
|
xwindow_last = xwindow;
|
1999-11-08 20:14:59 +00:00
|
|
|
XQueryPointer (xdisplay, xwindow,
|
1998-06-17 08:48:22 +00:00
|
|
|
&root, &xwindow,
|
|
|
|
&rootx, &rooty,
|
|
|
|
&winx, &winy,
|
|
|
|
&xmask);
|
|
|
|
}
|
1999-11-08 20:14:59 +00:00
|
|
|
XUngrabServer (xdisplay);
|
1998-06-17 08:48:22 +00:00
|
|
|
|
|
|
|
window = gdk_window_lookup (xwindow_last);
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1998-06-17 08:48:22 +00:00
|
|
|
if (win_x)
|
|
|
|
*win_x = window ? winx : -1;
|
|
|
|
if (win_y)
|
|
|
|
*win_y = window ? winy : -1;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1998-06-17 08:48:22 +00:00
|
|
|
return window;
|
|
|
|
}
|
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
GList*
|
|
|
|
gdk_window_get_children (GdkWindow *window)
|
|
|
|
{
|
|
|
|
GdkWindow *child;
|
|
|
|
GList *children;
|
|
|
|
Window root;
|
|
|
|
Window parent;
|
|
|
|
Window *xchildren;
|
|
|
|
unsigned int nchildren;
|
|
|
|
unsigned int i;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
g_return_val_if_fail (window != NULL, NULL);
|
1999-10-03 22:12:41 +00:00
|
|
|
g_return_val_if_fail (GDK_IS_WINDOW (window), NULL);
|
|
|
|
|
|
|
|
if (GDK_DRAWABLE_DESTROYED (window))
|
1998-01-26 01:20:14 +00:00
|
|
|
return NULL;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1999-10-03 22:12:41 +00:00
|
|
|
XQueryTree (GDK_DRAWABLE_XDISPLAY (window),
|
|
|
|
GDK_DRAWABLE_XID (window),
|
1997-11-24 22:37:52 +00:00
|
|
|
&root, &parent, &xchildren, &nchildren);
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
children = NULL;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
if (nchildren > 0)
|
|
|
|
{
|
|
|
|
for (i = 0; i < nchildren; i++)
|
|
|
|
{
|
|
|
|
child = gdk_window_lookup (xchildren[i]);
|
|
|
|
if (child)
|
|
|
|
children = g_list_prepend (children, child);
|
|
|
|
}
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1998-07-04 15:31:30 +00:00
|
|
|
if (xchildren)
|
|
|
|
XFree (xchildren);
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
return children;
|
|
|
|
}
|
|
|
|
|
|
|
|
GdkEventMask
|
1999-02-10 08:06:30 +00:00
|
|
|
gdk_window_get_events (GdkWindow *window)
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
|
|
|
XWindowAttributes attrs;
|
|
|
|
GdkEventMask event_mask;
|
|
|
|
int i;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1998-01-26 01:20:14 +00:00
|
|
|
g_return_val_if_fail (window != NULL, 0);
|
1999-10-03 22:12:41 +00:00
|
|
|
g_return_val_if_fail (GDK_IS_WINDOW (window), 0);
|
|
|
|
|
|
|
|
if (GDK_DRAWABLE_DESTROYED (window))
|
1998-01-26 01:20:14 +00:00
|
|
|
return 0;
|
1999-10-03 22:12:41 +00:00
|
|
|
else
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
1999-10-03 22:12:41 +00:00
|
|
|
XGetWindowAttributes (GDK_DRAWABLE_XDISPLAY (window),
|
|
|
|
GDK_DRAWABLE_XID (window),
|
|
|
|
&attrs);
|
|
|
|
|
|
|
|
event_mask = 0;
|
|
|
|
for (i = 0; i < gdk_nevent_masks; i++)
|
|
|
|
{
|
|
|
|
if (attrs.your_event_mask & gdk_event_mask_table[i])
|
|
|
|
event_mask |= 1 << (i + 1);
|
|
|
|
}
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1999-10-03 22:12:41 +00:00
|
|
|
return event_mask;
|
|
|
|
}
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
1999-02-10 08:06:30 +00:00
|
|
|
gdk_window_set_events (GdkWindow *window,
|
|
|
|
GdkEventMask event_mask)
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
|
|
|
long xevent_mask;
|
|
|
|
int i;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1998-01-26 01:20:14 +00:00
|
|
|
g_return_if_fail (window != NULL);
|
1999-10-03 22:12:41 +00:00
|
|
|
g_return_if_fail (GDK_IS_WINDOW (window));
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1999-10-03 22:12:41 +00:00
|
|
|
if (!GDK_DRAWABLE_DESTROYED (window))
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
1999-10-03 22:12:41 +00:00
|
|
|
xevent_mask = StructureNotifyMask;
|
|
|
|
for (i = 0; i < gdk_nevent_masks; i++)
|
|
|
|
{
|
|
|
|
if (event_mask & (1 << (i + 1)))
|
|
|
|
xevent_mask |= gdk_event_mask_table[i];
|
|
|
|
}
|
|
|
|
|
|
|
|
XSelectInput (GDK_DRAWABLE_XDISPLAY (window),
|
|
|
|
GDK_DRAWABLE_XID (window),
|
|
|
|
xevent_mask);
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
gdk_window_add_colormap_windows (GdkWindow *window)
|
|
|
|
{
|
|
|
|
GdkWindow *toplevel;
|
|
|
|
Window *old_windows;
|
|
|
|
Window *new_windows;
|
|
|
|
int i, count;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
g_return_if_fail (window != NULL);
|
1999-10-03 22:12:41 +00:00
|
|
|
g_return_if_fail (GDK_IS_WINDOW (window));
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
toplevel = gdk_window_get_toplevel (window);
|
1999-10-03 22:12:41 +00:00
|
|
|
if (GDK_DRAWABLE_DESTROYED (toplevel))
|
1998-01-26 01:20:14 +00:00
|
|
|
return;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1998-07-04 15:31:30 +00:00
|
|
|
old_windows = NULL;
|
1999-10-03 22:12:41 +00:00
|
|
|
if (!XGetWMColormapWindows (GDK_DRAWABLE_XDISPLAY (toplevel),
|
|
|
|
GDK_DRAWABLE_XID (toplevel),
|
1997-11-24 22:37:52 +00:00
|
|
|
&old_windows, &count))
|
|
|
|
{
|
|
|
|
count = 0;
|
|
|
|
}
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
for (i = 0; i < count; i++)
|
1999-10-03 22:12:41 +00:00
|
|
|
if (old_windows[i] == GDK_DRAWABLE_XID (window))
|
1998-07-04 15:31:30 +00:00
|
|
|
{
|
|
|
|
XFree (old_windows);
|
|
|
|
return;
|
|
|
|
}
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
new_windows = g_new (Window, count + 1);
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
for (i = 0; i < count; i++)
|
|
|
|
new_windows[i] = old_windows[i];
|
1999-10-03 22:12:41 +00:00
|
|
|
new_windows[count] = GDK_DRAWABLE_XID (window);
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1999-10-03 22:12:41 +00:00
|
|
|
XSetWMColormapWindows (GDK_DRAWABLE_XDISPLAY (toplevel),
|
|
|
|
GDK_DRAWABLE_XID (toplevel),
|
1997-11-24 22:37:52 +00:00
|
|
|
new_windows, count + 1);
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
g_free (new_windows);
|
|
|
|
if (old_windows)
|
|
|
|
XFree (old_windows);
|
|
|
|
}
|
|
|
|
|
1998-11-06 22:05:02 +00:00
|
|
|
static gboolean
|
|
|
|
gdk_window_have_shape_ext (void)
|
|
|
|
{
|
|
|
|
enum { UNKNOWN, NO, YES };
|
|
|
|
static gint have_shape = UNKNOWN;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1998-11-06 22:05:02 +00:00
|
|
|
if (have_shape == UNKNOWN)
|
|
|
|
{
|
|
|
|
int ignore;
|
1999-02-10 08:06:30 +00:00
|
|
|
if (XQueryExtension (gdk_display, "SHAPE", &ignore, &ignore, &ignore))
|
1998-11-06 22:05:02 +00:00
|
|
|
have_shape = YES;
|
|
|
|
else
|
|
|
|
have_shape = NO;
|
|
|
|
}
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1998-11-06 22:05:02 +00:00
|
|
|
return (have_shape == YES);
|
|
|
|
}
|
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
/*
|
|
|
|
* This needs the X11 shape extension.
|
1998-05-03 22:41:32 +00:00
|
|
|
* If not available, shaped windows will look
|
1997-11-24 22:37:52 +00:00
|
|
|
* ugly, but programs still work. Stefan Wille
|
|
|
|
*/
|
|
|
|
void
|
|
|
|
gdk_window_shape_combine_mask (GdkWindow *window,
|
|
|
|
GdkBitmap *mask,
|
|
|
|
gint x, gint y)
|
|
|
|
{
|
1998-02-17 06:03:40 +00:00
|
|
|
Pixmap pixmap;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
g_return_if_fail (window != NULL);
|
1999-10-03 22:12:41 +00:00
|
|
|
g_return_if_fail (GDK_IS_WINDOW (window));
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1998-05-03 22:41:32 +00:00
|
|
|
#ifdef HAVE_SHAPE_EXT
|
1999-10-03 22:12:41 +00:00
|
|
|
if (GDK_DRAWABLE_DESTROYED (window))
|
1998-11-06 22:05:02 +00:00
|
|
|
return;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
|
|
|
if (gdk_window_have_shape_ext ())
|
1998-02-17 06:03:40 +00:00
|
|
|
{
|
1998-05-03 22:41:32 +00:00
|
|
|
if (mask)
|
|
|
|
{
|
1999-10-03 22:12:41 +00:00
|
|
|
pixmap = GDK_DRAWABLE_XID (mask);
|
1998-05-03 22:41:32 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
x = 0;
|
|
|
|
y = 0;
|
|
|
|
pixmap = None;
|
|
|
|
}
|
|
|
|
|
1999-10-03 22:12:41 +00:00
|
|
|
XShapeCombineMask (GDK_DRAWABLE_XDISPLAY (window),
|
|
|
|
GDK_DRAWABLE_XID (window),
|
1999-02-10 08:06:30 +00:00
|
|
|
ShapeBounding,
|
|
|
|
x, y,
|
|
|
|
pixmap,
|
|
|
|
ShapeSet);
|
1998-02-17 06:03:40 +00:00
|
|
|
}
|
1998-05-03 22:41:32 +00:00
|
|
|
#endif /* HAVE_SHAPE_EXT */
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
|
|
|
|
1997-12-16 22:10:43 +00:00
|
|
|
void
|
1999-02-10 08:06:30 +00:00
|
|
|
gdk_window_set_override_redirect (GdkWindow *window,
|
|
|
|
gboolean override_redirect)
|
1997-12-16 22:10:43 +00:00
|
|
|
{
|
|
|
|
XSetWindowAttributes attr;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1998-01-26 01:20:14 +00:00
|
|
|
g_return_if_fail (window != NULL);
|
1999-10-03 22:12:41 +00:00
|
|
|
g_return_if_fail (GDK_IS_WINDOW (window));
|
|
|
|
|
|
|
|
if (GDK_DRAWABLE_DESTROYED (window))
|
|
|
|
{
|
|
|
|
attr.override_redirect = (override_redirect == FALSE)?False:True;
|
|
|
|
XChangeWindowAttributes (GDK_DRAWABLE_XDISPLAY (window),
|
|
|
|
GDK_DRAWABLE_XID (window),
|
|
|
|
CWOverrideRedirect,
|
|
|
|
&attr);
|
|
|
|
}
|
1997-12-16 22:10:43 +00:00
|
|
|
}
|
1998-02-27 03:55:33 +00:00
|
|
|
|
|
|
|
void
|
1999-02-10 08:06:30 +00:00
|
|
|
gdk_window_set_icon (GdkWindow *window,
|
|
|
|
GdkWindow *icon_window,
|
|
|
|
GdkPixmap *pixmap,
|
|
|
|
GdkBitmap *mask)
|
1998-02-27 03:55:33 +00:00
|
|
|
{
|
1999-02-10 15:45:19 +00:00
|
|
|
XWMHints *wm_hints;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1998-02-27 03:55:33 +00:00
|
|
|
g_return_if_fail (window != NULL);
|
1999-10-03 22:12:41 +00:00
|
|
|
g_return_if_fail (GDK_IS_WINDOW (window));
|
|
|
|
|
|
|
|
if (GDK_DRAWABLE_DESTROYED (window))
|
1998-02-27 03:55:33 +00:00
|
|
|
return;
|
1999-02-10 15:45:19 +00:00
|
|
|
|
1999-10-03 22:12:41 +00:00
|
|
|
wm_hints = XGetWMHints (GDK_DRAWABLE_XDISPLAY (window),
|
|
|
|
GDK_DRAWABLE_XID (window));
|
1999-02-10 15:45:19 +00:00
|
|
|
if (!wm_hints)
|
|
|
|
wm_hints = XAllocWMHints ();
|
|
|
|
|
1998-02-27 03:55:33 +00:00
|
|
|
if (icon_window != NULL)
|
|
|
|
{
|
1999-02-10 15:45:19 +00:00
|
|
|
wm_hints->flags |= IconWindowHint;
|
1999-10-03 22:12:41 +00:00
|
|
|
wm_hints->icon_window = GDK_DRAWABLE_XID (icon_window);
|
1998-02-27 03:55:33 +00:00
|
|
|
}
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1998-02-27 03:55:33 +00:00
|
|
|
if (pixmap != NULL)
|
|
|
|
{
|
1999-02-10 15:45:19 +00:00
|
|
|
wm_hints->flags |= IconPixmapHint;
|
1999-10-03 22:12:41 +00:00
|
|
|
wm_hints->icon_pixmap = GDK_DRAWABLE_XID (pixmap);
|
1998-02-27 03:55:33 +00:00
|
|
|
}
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1998-02-27 03:55:33 +00:00
|
|
|
if (mask != NULL)
|
|
|
|
{
|
1999-02-10 15:45:19 +00:00
|
|
|
wm_hints->flags |= IconMaskHint;
|
1999-10-03 22:12:41 +00:00
|
|
|
wm_hints->icon_mask = GDK_DRAWABLE_XID (mask);
|
1998-02-27 03:55:33 +00:00
|
|
|
}
|
1999-02-10 15:45:19 +00:00
|
|
|
|
1999-10-03 22:12:41 +00:00
|
|
|
XSetWMHints (GDK_DRAWABLE_XDISPLAY (window),
|
|
|
|
GDK_DRAWABLE_XID (window), wm_hints);
|
1999-02-10 15:45:19 +00:00
|
|
|
XFree (wm_hints);
|
1998-02-27 03:55:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
1999-02-10 08:06:30 +00:00
|
|
|
gdk_window_set_icon_name (GdkWindow *window,
|
|
|
|
gchar * name)
|
1998-02-27 03:55:33 +00:00
|
|
|
{
|
|
|
|
XTextProperty property;
|
|
|
|
gint res;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1998-02-27 03:55:33 +00:00
|
|
|
g_return_if_fail (window != NULL);
|
1999-10-03 22:12:41 +00:00
|
|
|
g_return_if_fail (GDK_IS_WINDOW (window));
|
|
|
|
|
|
|
|
if (GDK_DRAWABLE_DESTROYED (window))
|
1998-02-27 03:55:33 +00:00
|
|
|
return;
|
1999-10-03 22:12:41 +00:00
|
|
|
|
|
|
|
res = XmbTextListToTextProperty (GDK_DRAWABLE_XDISPLAY (window),
|
1998-02-27 03:55:33 +00:00
|
|
|
&name, 1, XStdICCTextStyle,
|
|
|
|
&property);
|
|
|
|
if (res < 0)
|
|
|
|
{
|
1999-02-10 08:06:30 +00:00
|
|
|
g_warning ("Error converting icon name to text property: %d\n", res);
|
1998-02-27 03:55:33 +00:00
|
|
|
return;
|
|
|
|
}
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1999-10-03 22:12:41 +00:00
|
|
|
XSetWMIconName (GDK_DRAWABLE_XDISPLAY (window),
|
|
|
|
GDK_DRAWABLE_XID (window),
|
1998-02-27 03:55:33 +00:00
|
|
|
&property);
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1998-07-04 15:31:30 +00:00
|
|
|
if (property.value)
|
|
|
|
XFree (property.value);
|
1998-02-27 03:55:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
1999-02-10 08:06:30 +00:00
|
|
|
gdk_window_set_group (GdkWindow *window,
|
|
|
|
GdkWindow *leader)
|
1998-02-27 03:55:33 +00:00
|
|
|
{
|
1999-02-10 15:45:19 +00:00
|
|
|
XWMHints *wm_hints;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1998-02-27 03:55:33 +00:00
|
|
|
g_return_if_fail (window != NULL);
|
1999-10-03 22:12:41 +00:00
|
|
|
g_return_if_fail (GDK_IS_WINDOW (window));
|
1998-02-27 03:55:33 +00:00
|
|
|
g_return_if_fail (leader != NULL);
|
1999-10-03 22:12:41 +00:00
|
|
|
g_return_if_fail (GDK_IS_WINDOW (leader));
|
|
|
|
|
|
|
|
if (GDK_DRAWABLE_DESTROYED (window) || GDK_DRAWABLE_DESTROYED (leader))
|
1998-02-27 03:55:33 +00:00
|
|
|
return;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1999-10-03 22:12:41 +00:00
|
|
|
wm_hints = XGetWMHints (GDK_DRAWABLE_XDISPLAY (window),
|
|
|
|
GDK_DRAWABLE_XID (window));
|
1999-02-10 15:45:19 +00:00
|
|
|
if (!wm_hints)
|
|
|
|
wm_hints = XAllocWMHints ();
|
|
|
|
|
|
|
|
wm_hints->flags |= WindowGroupHint;
|
1999-10-03 22:12:41 +00:00
|
|
|
wm_hints->window_group = GDK_DRAWABLE_XID (leader);
|
1999-02-10 15:45:19 +00:00
|
|
|
|
1999-10-03 22:12:41 +00:00
|
|
|
XSetWMHints (GDK_DRAWABLE_XDISPLAY (window),
|
|
|
|
GDK_DRAWABLE_XID (window), wm_hints);
|
1999-02-10 15:45:19 +00:00
|
|
|
XFree (wm_hints);
|
1998-02-27 03:55:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
gdk_window_set_mwm_hints (GdkWindow *window,
|
|
|
|
MotifWmHints *new_hints)
|
|
|
|
{
|
|
|
|
static Atom hints_atom = None;
|
|
|
|
MotifWmHints *hints;
|
|
|
|
Atom type;
|
|
|
|
gint format;
|
|
|
|
gulong nitems;
|
|
|
|
gulong bytes_after;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1999-10-03 22:12:41 +00:00
|
|
|
if (GDK_DRAWABLE_DESTROYED (window))
|
1998-02-27 03:55:33 +00:00
|
|
|
return;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1998-02-27 03:55:33 +00:00
|
|
|
if (!hints_atom)
|
1999-10-03 22:12:41 +00:00
|
|
|
hints_atom = XInternAtom (GDK_DRAWABLE_XDISPLAY (window),
|
1998-02-27 03:55:33 +00:00
|
|
|
_XA_MOTIF_WM_HINTS, FALSE);
|
|
|
|
|
1999-10-03 22:12:41 +00:00
|
|
|
XGetWindowProperty (GDK_DRAWABLE_XDISPLAY (window), GDK_DRAWABLE_XID (window),
|
1999-02-21 20:55:04 +00:00
|
|
|
hints_atom, 0, sizeof (MotifWmHints)/sizeof (long),
|
1998-02-27 03:55:33 +00:00
|
|
|
False, AnyPropertyType, &type, &format, &nitems,
|
|
|
|
&bytes_after, (guchar **)&hints);
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1998-02-27 03:55:33 +00:00
|
|
|
if (type == None)
|
|
|
|
hints = new_hints;
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (new_hints->flags & MWM_HINTS_FUNCTIONS)
|
|
|
|
{
|
|
|
|
hints->flags |= MWM_HINTS_FUNCTIONS;
|
|
|
|
hints->functions = new_hints->functions;
|
|
|
|
}
|
|
|
|
if (new_hints->flags & MWM_HINTS_DECORATIONS)
|
|
|
|
{
|
|
|
|
hints->flags |= MWM_HINTS_DECORATIONS;
|
|
|
|
hints->decorations = new_hints->decorations;
|
|
|
|
}
|
|
|
|
}
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1999-10-03 22:12:41 +00:00
|
|
|
XChangeProperty (GDK_DRAWABLE_XDISPLAY (window), GDK_DRAWABLE_XID (window),
|
1998-02-27 03:55:33 +00:00
|
|
|
hints_atom, hints_atom, 32, PropModeReplace,
|
1999-02-21 20:55:04 +00:00
|
|
|
(guchar *)hints, sizeof (MotifWmHints)/sizeof (long));
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1998-02-27 03:55:33 +00:00
|
|
|
if (hints != new_hints)
|
|
|
|
XFree (hints);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
gdk_window_set_decorations (GdkWindow *window,
|
|
|
|
GdkWMDecoration decorations)
|
|
|
|
{
|
|
|
|
MotifWmHints hints;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1999-10-03 22:12:41 +00:00
|
|
|
g_return_if_fail (window != NULL);
|
|
|
|
g_return_if_fail (GDK_IS_WINDOW (window));
|
|
|
|
|
1998-02-27 03:55:33 +00:00
|
|
|
hints.flags = MWM_HINTS_DECORATIONS;
|
|
|
|
hints.decorations = decorations;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1998-02-27 03:55:33 +00:00
|
|
|
gdk_window_set_mwm_hints (window, &hints);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
gdk_window_set_functions (GdkWindow *window,
|
|
|
|
GdkWMFunction functions)
|
|
|
|
{
|
|
|
|
MotifWmHints hints;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1999-10-03 22:12:41 +00:00
|
|
|
g_return_if_fail (window != NULL);
|
|
|
|
g_return_if_fail (GDK_IS_WINDOW (window));
|
|
|
|
|
1998-02-27 03:55:33 +00:00
|
|
|
hints.flags = MWM_HINTS_FUNCTIONS;
|
|
|
|
hints.functions = functions;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1998-02-27 03:55:33 +00:00
|
|
|
gdk_window_set_mwm_hints (window, &hints);
|
|
|
|
}
|
1998-05-01 16:15:39 +00:00
|
|
|
|
1998-11-06 22:05:02 +00:00
|
|
|
/*
|
|
|
|
* propagate the shapes from all child windows of a GDK window to the parent
|
|
|
|
* window. Shamelessly ripped from Enlightenment's code
|
|
|
|
*
|
|
|
|
* - Raster
|
|
|
|
*/
|
|
|
|
struct _gdk_span
|
|
|
|
{
|
1999-02-10 08:06:30 +00:00
|
|
|
gint start;
|
|
|
|
gint end;
|
|
|
|
struct _gdk_span *next;
|
1998-11-06 22:05:02 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static void
|
1999-02-10 08:06:30 +00:00
|
|
|
gdk_add_to_span (struct _gdk_span **s,
|
|
|
|
gint x,
|
|
|
|
gint xx)
|
|
|
|
{
|
|
|
|
struct _gdk_span *ptr1, *ptr2, *noo, *ss;
|
|
|
|
gchar spanning;
|
|
|
|
|
|
|
|
ptr2 = NULL;
|
|
|
|
ptr1 = *s;
|
|
|
|
spanning = 0;
|
|
|
|
ss = NULL;
|
|
|
|
/* scan the spans for this line */
|
|
|
|
while (ptr1)
|
|
|
|
{
|
|
|
|
/* -- -> new span */
|
|
|
|
/* == -> existing span */
|
|
|
|
/* ## -> spans intersect */
|
|
|
|
/* if we are in the middle of spanning the span into the line */
|
|
|
|
if (spanning)
|
|
|
|
{
|
|
|
|
/* case: ---- ==== */
|
|
|
|
if (xx < ptr1->start - 1)
|
|
|
|
{
|
|
|
|
/* ends before next span - extend to here */
|
|
|
|
ss->end = xx;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
/* case: ----##=== */
|
|
|
|
else if (xx <= ptr1->end)
|
|
|
|
{
|
|
|
|
/* crosses into next span - delete next span and append */
|
|
|
|
ss->end = ptr1->end;
|
|
|
|
ss->next = ptr1->next;
|
|
|
|
g_free (ptr1);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
/* case: ---###--- */
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/* overlaps next span - delete and keep checking */
|
|
|
|
ss->next = ptr1->next;
|
|
|
|
g_free (ptr1);
|
|
|
|
ptr1 = ss;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/* otherwise havent started spanning it in yet */
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/* case: ---- ==== */
|
|
|
|
if (xx < ptr1->start - 1)
|
|
|
|
{
|
|
|
|
/* insert span here in list */
|
|
|
|
noo = g_malloc (sizeof (struct _gdk_span));
|
|
|
|
|
|
|
|
if (noo)
|
|
|
|
{
|
|
|
|
noo->start = x;
|
|
|
|
noo->end = xx;
|
|
|
|
noo->next = ptr1;
|
|
|
|
if (ptr2)
|
|
|
|
ptr2->next = noo;
|
|
|
|
else
|
|
|
|
*s = noo;
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
/* case: ----##=== */
|
|
|
|
else if ((x < ptr1->start) && (xx <= ptr1->end))
|
|
|
|
{
|
|
|
|
/* expand this span to the left point of the new one */
|
|
|
|
ptr1->start = x;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
/* case: ===###=== */
|
|
|
|
else if ((x >= ptr1->start) && (xx <= ptr1->end))
|
|
|
|
{
|
|
|
|
/* throw the span away */
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
/* case: ---###--- */
|
|
|
|
else if ((x < ptr1->start) && (xx > ptr1->end))
|
|
|
|
{
|
|
|
|
ss = ptr1;
|
|
|
|
spanning = 1;
|
|
|
|
ptr1->start = x;
|
|
|
|
ptr1->end = xx;
|
|
|
|
}
|
|
|
|
/* case: ===##---- */
|
|
|
|
else if ((x >= ptr1->start) && (x <= ptr1->end + 1) && (xx > ptr1->end))
|
|
|
|
{
|
|
|
|
ss = ptr1;
|
|
|
|
spanning = 1;
|
|
|
|
ptr1->end = xx;
|
|
|
|
}
|
|
|
|
/* case: ==== ---- */
|
|
|
|
/* case handled by next loop iteration - first case */
|
|
|
|
}
|
|
|
|
ptr2 = ptr1;
|
|
|
|
ptr1 = ptr1->next;
|
|
|
|
}
|
|
|
|
/* it started in the middle but spans beyond your current list */
|
|
|
|
if (spanning)
|
|
|
|
{
|
|
|
|
ptr2->end = xx;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
/* it does not start inside a span or in the middle, so add it to the end */
|
|
|
|
noo = g_malloc (sizeof (struct _gdk_span));
|
|
|
|
|
|
|
|
if (noo)
|
|
|
|
{
|
|
|
|
noo->start = x;
|
|
|
|
noo->end = xx;
|
|
|
|
if (ptr2)
|
|
|
|
{
|
|
|
|
noo->next = ptr2->next;
|
|
|
|
ptr2->next = noo;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
noo->next = NULL;
|
|
|
|
*s = noo;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
1998-11-06 22:05:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
1999-02-10 08:06:30 +00:00
|
|
|
gdk_add_rectangles (Display *disp,
|
|
|
|
Window win,
|
|
|
|
struct _gdk_span **spans,
|
|
|
|
gint basew,
|
|
|
|
gint baseh,
|
|
|
|
gint x,
|
|
|
|
gint y)
|
1998-11-06 22:05:02 +00:00
|
|
|
{
|
|
|
|
gint a, k;
|
|
|
|
gint x1, y1, x2, y2;
|
|
|
|
gint rn, ord;
|
|
|
|
XRectangle *rl;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
|
|
|
rl = XShapeGetRectangles (disp, win, ShapeBounding, &rn, &ord);
|
1998-11-06 22:05:02 +00:00
|
|
|
if (rl)
|
|
|
|
{
|
|
|
|
/* go through all clip rects in this window's shape */
|
|
|
|
for (k = 0; k < rn; k++)
|
|
|
|
{
|
|
|
|
/* for each clip rect, add it to each line's spans */
|
|
|
|
x1 = x + rl[k].x;
|
|
|
|
x2 = x + rl[k].x + (rl[k].width - 1);
|
|
|
|
y1 = y + rl[k].y;
|
|
|
|
y2 = y + rl[k].y + (rl[k].height - 1);
|
|
|
|
if (x1 < 0)
|
|
|
|
x1 = 0;
|
|
|
|
if (y1 < 0)
|
|
|
|
y1 = 0;
|
|
|
|
if (x2 >= basew)
|
|
|
|
x2 = basew - 1;
|
|
|
|
if (y2 >= baseh)
|
|
|
|
y2 = baseh - 1;
|
|
|
|
for (a = y1; a <= y2; a++)
|
|
|
|
{
|
|
|
|
if ((x2 - x1) >= 0)
|
1999-02-10 08:06:30 +00:00
|
|
|
gdk_add_to_span (&spans[a], x1, x2);
|
1998-11-06 22:05:02 +00:00
|
|
|
}
|
|
|
|
}
|
1999-02-10 08:06:30 +00:00
|
|
|
XFree (rl);
|
1998-11-06 22:05:02 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
1999-02-10 08:06:30 +00:00
|
|
|
gdk_propagate_shapes (Display *disp,
|
|
|
|
Window win,
|
|
|
|
gboolean merge)
|
|
|
|
{
|
|
|
|
Window rt, par, *list = NULL;
|
|
|
|
gint i, j, num = 0, num_rects = 0;
|
|
|
|
gint x, y, contig;
|
|
|
|
guint w, h, d;
|
|
|
|
gint baseh, basew;
|
|
|
|
XRectangle *rects = NULL;
|
|
|
|
struct _gdk_span **spans = NULL, *ptr1, *ptr2, *ptr3;
|
|
|
|
XWindowAttributes xatt;
|
|
|
|
|
|
|
|
XGetGeometry (disp, win, &rt, &x, &y, &w, &h, &d, &d);
|
|
|
|
if (h <= 0)
|
|
|
|
return;
|
|
|
|
basew = w;
|
|
|
|
baseh = h;
|
|
|
|
spans = g_malloc (sizeof (struct _gdk_span *) * h);
|
|
|
|
|
|
|
|
for (i = 0; i < h; i++)
|
|
|
|
spans[i] = NULL;
|
|
|
|
XQueryTree (disp, win, &rt, &par, &list, (unsigned int *)&num);
|
|
|
|
if (list)
|
|
|
|
{
|
|
|
|
/* go through all child windows and create/insert spans */
|
|
|
|
for (i = 0; i < num; i++)
|
|
|
|
{
|
|
|
|
if (XGetWindowAttributes (disp, list[i], &xatt) && (xatt.map_state != IsUnmapped))
|
|
|
|
if (XGetGeometry (disp, list[i], &rt, &x, &y, &w, &h, &d, &d))
|
|
|
|
gdk_add_rectangles (disp, list[i], spans, basew, baseh, x, y);
|
|
|
|
}
|
|
|
|
if (merge)
|
|
|
|
gdk_add_rectangles (disp, win, spans, basew, baseh, x, y);
|
|
|
|
|
|
|
|
/* go through the spans list and build a list of rects */
|
|
|
|
rects = g_malloc (sizeof (XRectangle) * 256);
|
|
|
|
num_rects = 0;
|
|
|
|
for (i = 0; i < baseh; i++)
|
|
|
|
{
|
|
|
|
ptr1 = spans[i];
|
|
|
|
/* go through the line for all spans */
|
|
|
|
while (ptr1)
|
|
|
|
{
|
|
|
|
rects[num_rects].x = ptr1->start;
|
|
|
|
rects[num_rects].y = i;
|
|
|
|
rects[num_rects].width = ptr1->end - ptr1->start + 1;
|
|
|
|
rects[num_rects].height = 1;
|
|
|
|
j = i + 1;
|
|
|
|
/* if there are more lines */
|
|
|
|
contig = 1;
|
|
|
|
/* while contigous rects (same start/end coords) exist */
|
|
|
|
while ((contig) && (j < baseh))
|
|
|
|
{
|
|
|
|
/* search next line for spans matching this one */
|
|
|
|
contig = 0;
|
|
|
|
ptr2 = spans[j];
|
|
|
|
ptr3 = NULL;
|
|
|
|
while (ptr2)
|
|
|
|
{
|
|
|
|
/* if we have an exact span match set contig */
|
|
|
|
if ((ptr2->start == ptr1->start) &&
|
|
|
|
(ptr2->end == ptr1->end))
|
|
|
|
{
|
|
|
|
contig = 1;
|
|
|
|
/* remove the span - not needed */
|
|
|
|
if (ptr3)
|
|
|
|
{
|
|
|
|
ptr3->next = ptr2->next;
|
|
|
|
g_free (ptr2);
|
|
|
|
ptr2 = NULL;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
spans[j] = ptr2->next;
|
|
|
|
g_free (ptr2);
|
|
|
|
ptr2 = NULL;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
/* gone past the span point no point looking */
|
|
|
|
else if (ptr2->start < ptr1->start)
|
|
|
|
break;
|
|
|
|
if (ptr2)
|
|
|
|
{
|
|
|
|
ptr3 = ptr2;
|
|
|
|
ptr2 = ptr2->next;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/* if a contiguous span was found increase the rect h */
|
|
|
|
if (contig)
|
1998-11-06 22:05:02 +00:00
|
|
|
{
|
1999-02-10 08:06:30 +00:00
|
|
|
rects[num_rects].height++;
|
|
|
|
j++;
|
1998-11-06 22:05:02 +00:00
|
|
|
}
|
1999-02-10 08:06:30 +00:00
|
|
|
}
|
|
|
|
/* up the rect count */
|
|
|
|
num_rects++;
|
|
|
|
/* every 256 new rects increase the rect array */
|
|
|
|
if ((num_rects % 256) == 0)
|
|
|
|
rects = g_realloc (rects, sizeof (XRectangle) * (num_rects + 256));
|
|
|
|
ptr1 = ptr1->next;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/* set the rects as the shape mask */
|
|
|
|
if (rects)
|
|
|
|
{
|
|
|
|
XShapeCombineRectangles (disp, win, ShapeBounding, 0, 0, rects, num_rects,
|
|
|
|
ShapeSet, YXSorted);
|
|
|
|
g_free (rects);
|
|
|
|
}
|
|
|
|
XFree (list);
|
|
|
|
}
|
|
|
|
/* free up all the spans we made */
|
|
|
|
for (i = 0; i < baseh; i++)
|
|
|
|
{
|
|
|
|
ptr1 = spans[i];
|
|
|
|
while (ptr1)
|
|
|
|
{
|
|
|
|
ptr2 = ptr1;
|
|
|
|
ptr1 = ptr1->next;
|
|
|
|
g_free (ptr2);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
g_free (spans);
|
1998-11-06 22:05:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
gdk_window_set_child_shapes (GdkWindow *window)
|
|
|
|
{
|
|
|
|
g_return_if_fail (window != NULL);
|
1999-10-03 22:12:41 +00:00
|
|
|
g_return_if_fail (GDK_IS_WINDOW (window));
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1998-11-06 22:05:02 +00:00
|
|
|
#ifdef HAVE_SHAPE_EXT
|
1999-10-03 22:12:41 +00:00
|
|
|
if (!GDK_DRAWABLE_DESTROYED (window) &&
|
|
|
|
gdk_window_have_shape_ext ())
|
|
|
|
gdk_propagate_shapes (GDK_DRAWABLE_XDISPLAY (window),
|
|
|
|
GDK_DRAWABLE_XID (window), FALSE);
|
1998-11-06 22:05:02 +00:00
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
gdk_window_merge_child_shapes (GdkWindow *window)
|
|
|
|
{
|
|
|
|
g_return_if_fail (window != NULL);
|
1999-10-03 22:12:41 +00:00
|
|
|
g_return_if_fail (GDK_IS_WINDOW (window));
|
1998-11-06 22:05:02 +00:00
|
|
|
|
|
|
|
#ifdef HAVE_SHAPE_EXT
|
1999-10-03 22:12:41 +00:00
|
|
|
if (!GDK_DRAWABLE_DESTROYED (window) &&
|
|
|
|
gdk_window_have_shape_ext ())
|
|
|
|
gdk_propagate_shapes (GDK_DRAWABLE_XDISPLAY (window),
|
|
|
|
GDK_DRAWABLE_XID (window), TRUE);
|
1998-11-06 22:05:02 +00:00
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
1999-01-27 18:21:20 +00:00
|
|
|
/* Support for windows that can be guffaw-scrolled
|
|
|
|
* (See http://www.gtk.org/~otaylor/whitepapers/guffaw-scrolling.txt)
|
|
|
|
*/
|
|
|
|
|
|
|
|
static gboolean
|
|
|
|
gdk_window_gravity_works (void)
|
|
|
|
{
|
|
|
|
enum { UNKNOWN, NO, YES };
|
|
|
|
static gint gravity_works = UNKNOWN;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1999-01-27 18:21:20 +00:00
|
|
|
if (gravity_works == UNKNOWN)
|
|
|
|
{
|
|
|
|
GdkWindowAttr attr;
|
|
|
|
GdkWindow *parent;
|
|
|
|
GdkWindow *child;
|
|
|
|
gint y;
|
|
|
|
|
|
|
|
/* This particular server apparently has a bug so that the test
|
|
|
|
* works but the actual code crashes it
|
|
|
|
*/
|
|
|
|
if ((!strcmp (XServerVendor (gdk_display), "Sun Microsystems, Inc.")) &&
|
|
|
|
(VendorRelease (gdk_display) == 3400))
|
|
|
|
{
|
|
|
|
gravity_works = NO;
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
attr.window_type = GDK_WINDOW_TEMP;
|
|
|
|
attr.wclass = GDK_INPUT_OUTPUT;
|
|
|
|
attr.x = 0;
|
|
|
|
attr.y = 0;
|
|
|
|
attr.width = 100;
|
|
|
|
attr.height = 100;
|
|
|
|
attr.event_mask = 0;
|
|
|
|
|
|
|
|
parent = gdk_window_new (NULL, &attr, GDK_WA_X | GDK_WA_Y);
|
|
|
|
|
|
|
|
attr.window_type = GDK_WINDOW_CHILD;
|
|
|
|
child = gdk_window_new (parent, &attr, GDK_WA_X | GDK_WA_Y);
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1999-01-27 18:21:20 +00:00
|
|
|
gdk_window_set_static_win_gravity (child, TRUE);
|
|
|
|
|
|
|
|
gdk_window_resize (parent, 100, 110);
|
|
|
|
gdk_window_move (parent, 0, -10);
|
|
|
|
gdk_window_move_resize (parent, 0, 0, 100, 100);
|
|
|
|
|
|
|
|
gdk_window_resize (parent, 100, 110);
|
|
|
|
gdk_window_move (parent, 0, -10);
|
|
|
|
gdk_window_move_resize (parent, 0, 0, 100, 100);
|
|
|
|
|
|
|
|
gdk_window_get_geometry (child, NULL, &y, NULL, NULL, NULL);
|
|
|
|
|
|
|
|
gdk_window_destroy (parent);
|
|
|
|
gdk_window_destroy (child);
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1999-01-27 18:21:20 +00:00
|
|
|
gravity_works = ((y == -20) ? YES : NO);
|
|
|
|
}
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1999-01-27 18:21:20 +00:00
|
|
|
return (gravity_works == YES);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
gdk_window_set_static_bit_gravity (GdkWindow *window, gboolean on)
|
|
|
|
{
|
|
|
|
XSetWindowAttributes xattributes;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1999-01-27 18:21:20 +00:00
|
|
|
g_return_if_fail (window != NULL);
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1999-01-27 18:21:20 +00:00
|
|
|
xattributes.bit_gravity = on ? StaticGravity : ForgetGravity;
|
1999-10-03 22:12:41 +00:00
|
|
|
XChangeWindowAttributes (GDK_DRAWABLE_XDISPLAY (window),
|
|
|
|
GDK_DRAWABLE_XID (window),
|
1999-01-27 18:21:20 +00:00
|
|
|
CWBitGravity, &xattributes);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
gdk_window_set_static_win_gravity (GdkWindow *window, gboolean on)
|
|
|
|
{
|
|
|
|
XSetWindowAttributes xattributes;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1999-01-27 18:21:20 +00:00
|
|
|
g_return_if_fail (window != NULL);
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1999-01-27 18:21:20 +00:00
|
|
|
xattributes.win_gravity = on ? StaticGravity : NorthWestGravity;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1999-10-03 22:12:41 +00:00
|
|
|
XChangeWindowAttributes (GDK_DRAWABLE_XDISPLAY (window),
|
|
|
|
GDK_DRAWABLE_XID (window),
|
1999-01-27 18:21:20 +00:00
|
|
|
CWWinGravity, &xattributes);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************
|
|
|
|
* gdk_window_set_static_gravities:
|
|
|
|
* Set the bit gravity of the given window to static,
|
|
|
|
* and flag it so all children get static subwindow
|
|
|
|
* gravity.
|
|
|
|
* arguments:
|
|
|
|
* window: window for which to set static gravity
|
|
|
|
* use_static: Whether to turn static gravity on or off.
|
|
|
|
* results:
|
|
|
|
* Does the XServer support static gravity?
|
|
|
|
*************************************************************/
|
|
|
|
|
|
|
|
gboolean
|
|
|
|
gdk_window_set_static_gravities (GdkWindow *window,
|
|
|
|
gboolean use_static)
|
|
|
|
{
|
|
|
|
GdkWindowPrivate *private = (GdkWindowPrivate *)window;
|
|
|
|
GList *tmp_list;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1999-01-27 18:21:20 +00:00
|
|
|
g_return_val_if_fail (window != NULL, FALSE);
|
1999-10-03 22:12:41 +00:00
|
|
|
g_return_val_if_fail (GDK_IS_WINDOW (window), FALSE);
|
|
|
|
|
1999-01-27 18:21:20 +00:00
|
|
|
if (!use_static == !private->guffaw_gravity)
|
|
|
|
return TRUE;
|
|
|
|
|
|
|
|
if (use_static && !gdk_window_gravity_works ())
|
|
|
|
return FALSE;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1999-01-27 18:21:20 +00:00
|
|
|
private->guffaw_gravity = use_static;
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1999-10-03 22:12:41 +00:00
|
|
|
if (!GDK_DRAWABLE_DESTROYED (window))
|
1999-01-27 18:21:20 +00:00
|
|
|
{
|
1999-10-03 22:12:41 +00:00
|
|
|
gdk_window_set_static_bit_gravity (window, use_static);
|
1999-01-27 18:21:20 +00:00
|
|
|
|
1999-10-03 22:12:41 +00:00
|
|
|
tmp_list = private->children;
|
|
|
|
while (tmp_list)
|
|
|
|
{
|
|
|
|
gdk_window_set_static_win_gravity (window, use_static);
|
|
|
|
|
|
|
|
tmp_list = tmp_list->next;
|
|
|
|
}
|
1999-01-27 18:21:20 +00:00
|
|
|
}
|
1999-02-10 08:06:30 +00:00
|
|
|
|
1999-01-27 18:21:20 +00:00
|
|
|
return TRUE;
|
|
|
|
}
|
1999-11-08 20:14:59 +00:00
|
|
|
|
|
|
|
/* internal function created for and used by gdk_window_xid_at_coords */
|
|
|
|
Window
|
|
|
|
gdk_window_xid_at (Window base,
|
|
|
|
gint bx,
|
|
|
|
gint by,
|
|
|
|
gint x,
|
|
|
|
gint y,
|
|
|
|
GList *excludes,
|
|
|
|
gboolean excl_child)
|
|
|
|
{
|
|
|
|
Display *xdisplay;
|
|
|
|
Window *list = NULL;
|
|
|
|
Window child = 0, parent_win = 0, root_win = 0;
|
|
|
|
int i;
|
|
|
|
unsigned int ww, wh, wb, wd, num;
|
|
|
|
int wx, wy;
|
|
|
|
|
|
|
|
xdisplay = GDK_DISPLAY ();
|
|
|
|
if (!XGetGeometry (xdisplay, base, &root_win, &wx, &wy, &ww, &wh, &wb, &wd))
|
|
|
|
return 0;
|
|
|
|
wx += bx;
|
|
|
|
wy += by;
|
|
|
|
|
|
|
|
if (!((x >= wx) &&
|
|
|
|
(y >= wy) &&
|
|
|
|
(x < (int) (wx + ww)) &&
|
|
|
|
(y < (int) (wy + wh))))
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
if (!XQueryTree (xdisplay, base, &root_win, &parent_win, &list, &num))
|
|
|
|
return base;
|
|
|
|
|
|
|
|
if (list)
|
|
|
|
{
|
|
|
|
for (i = num - 1; ; i--)
|
|
|
|
{
|
|
|
|
if ((!excl_child) || (!g_list_find (excludes, (gpointer *) list[i])))
|
|
|
|
{
|
|
|
|
if ((child = gdk_window_xid_at (list[i], wx, wy, x, y, excludes, excl_child)) != 0)
|
|
|
|
{
|
|
|
|
XFree (list);
|
|
|
|
return child;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!i)
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
XFree (list);
|
|
|
|
}
|
|
|
|
return base;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* The following fucntion by The Rasterman <raster@redhat.com>
|
|
|
|
* This function returns the X Window ID in which the x y location is in
|
|
|
|
* (x and y being relative to the root window), excluding any windows listed
|
|
|
|
* in the GList excludes (this is a list of X Window ID's - gpointer being
|
|
|
|
* the Window ID).
|
|
|
|
*
|
|
|
|
* This is primarily designed for internal gdk use - for DND for example
|
|
|
|
* when using a shaped icon window as the drag object - you exclude the
|
|
|
|
* X Window ID of the "icon" (perhaps more if excludes may be needed) and
|
|
|
|
* You can get back an X Window ID as to what X Window ID is infact under
|
|
|
|
* those X,Y co-ordinates.
|
|
|
|
*/
|
|
|
|
Window
|
|
|
|
gdk_window_xid_at_coords (gint x,
|
|
|
|
gint y,
|
|
|
|
GList *excludes,
|
|
|
|
gboolean excl_child)
|
|
|
|
{
|
|
|
|
GdkWindow *window;
|
|
|
|
GdkDrawablePrivate *private;
|
|
|
|
Display *xdisplay;
|
|
|
|
Window *list = NULL;
|
|
|
|
Window root, child = 0, parent_win = 0, root_win = 0;
|
|
|
|
unsigned int num;
|
|
|
|
int i;
|
|
|
|
|
|
|
|
window = gdk_parent_root;
|
|
|
|
private = (GdkDrawablePrivate*) window;
|
|
|
|
xdisplay = GDK_DRAWABLE_XDISPLAY (private);
|
|
|
|
root = GDK_DRAWABLE_XID (private);
|
|
|
|
num = g_list_length (excludes);
|
|
|
|
|
|
|
|
XGrabServer (xdisplay);
|
|
|
|
if (!XQueryTree (xdisplay, root, &root_win, &parent_win, &list, &num))
|
|
|
|
{
|
|
|
|
XUngrabServer (xdisplay);
|
|
|
|
return root;
|
|
|
|
}
|
|
|
|
if (list)
|
|
|
|
{
|
|
|
|
i = num - 1;
|
|
|
|
do
|
|
|
|
{
|
|
|
|
XWindowAttributes xwa;
|
|
|
|
|
|
|
|
XGetWindowAttributes (xdisplay, list [i], &xwa);
|
|
|
|
|
|
|
|
if (xwa.map_state != IsViewable)
|
|
|
|
continue;
|
|
|
|
|
|
|
|
if (excl_child && g_list_find (excludes, (gpointer *) list[i]))
|
|
|
|
continue;
|
|
|
|
|
|
|
|
if ((child = gdk_window_xid_at (list[i], 0, 0, x, y, excludes, excl_child)) == 0)
|
|
|
|
continue;
|
|
|
|
|
|
|
|
if (excludes)
|
|
|
|
{
|
|
|
|
if (!g_list_find (excludes, (gpointer *) child))
|
|
|
|
{
|
|
|
|
XFree (list);
|
|
|
|
XUngrabServer (xdisplay);
|
|
|
|
return child;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
XFree (list);
|
|
|
|
XUngrabServer (xdisplay);
|
|
|
|
return child;
|
|
|
|
}
|
|
|
|
} while (--i > 0);
|
|
|
|
XFree (list);
|
|
|
|
}
|
|
|
|
XUngrabServer (xdisplay);
|
|
|
|
return root;
|
|
|
|
}
|
|
|
|
|