Commit Graph

905 Commits

Author SHA1 Message Date
Matthias Clasen
1a8e3a7020 Fix #155658, Sebastian Bacher:
2004-10-18  Matthias Clasen  <mclasen@redhat.com>

	Fix #155658, Sebastian Bacher:

	* gdk/x11/gdkwindow-x11.h (struct _GdkToplevelX11): Add a new
	is_leader flag.

	* gdk/x11/gdkwindow-x11.c (update_wm_hints): Set wm hints on
	leader windows even if they are withdrawn.
	(gdk_window_set_group): Mark the new leader window as such. We
	never remove the flag again, but that should a) be vanishingly
	rare and b) not a problem, since the flag just turns off an
	optimization.

	* gdk/x11/gdkdisplay-x11.c (gdk_display_open): Mark the default
	leader window as such.
2004-10-18 21:02:37 +00:00
Matthias Clasen
0eb44bad4a GDK documentation fixes. 2004-10-09 03:31:50 +00:00
Matthias Clasen
221db8e025 Return a new reference to an existing GdkWindow if one already exists.
2004-10-05  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkwindow-x11.c (gdk_window_foreign_new_for_display):
	Return a new reference to an existing GdkWindow if one already
	exists.  (#151378, Gustavo Carneiro)
2004-10-05 05:40:42 +00:00
Matthias Clasen
5717212948 Warn if a UTF8_STRING or text/plain;charset=utf-8 roperty contains invalid
Thu Sep 16 23:20:05 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkselection.c (selection_get_text_plain):
	* gdk/x11/gdkselection-x11.c (make_list): Warn if a UTF8_STRING
	or text/plain;charset=utf-8 roperty contains invalid
	UTF-8.  (#152845, Owen Taylor)
2004-09-17 03:23:32 +00:00
Matthias Clasen
e1077caf36 Add descriptions for the commandline arguments. The actual descriptions
Sun Sep  5 17:14:16 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkmain.c:
	* gdk/gdk.c:
	* gdk/x11/gdkmain-x11.c:
	* gdk/win32/gdkmain-win32.c: Add descriptions for the
	commandline arguments. The actual descriptions are mostly
	taken from libbonoboui, so translators should be able to
	copy existing translations from there.
2004-09-05 21:15:58 +00:00
Anders Carlsson
04d65a6d3d Make gtk argument parsing use goption. Add gtk_get_option_group and
2004-09-05  Anders Carlsson  <andersca@gnome.org>

	* gdk/gdk.c: (gdk_arg_class_cb), (gdk_arg_name_cb),
	(gdk_add_option_entries_libgtk_only), (gdk_pre_parse_libgtk_only),
	(gdk_parse_args):
	* gdk/gdk.h:
	* gdk/gdkinternals.h:
	* gdk/linux-fb/gdkmain-fb.c: (_gdk_windowing_init):
	* gdk/win32/gdkmain-win32.c: (_gdk_windowing_init):
	* gdk/x11/gdkdisplay-x11.c: (gdk_display_open):
	* gdk/x11/gdkmain-x11.c: (_gdk_windowing_init):
	* gtk/gtkmain.c: (gtk_arg_debug_cb), (gtk_arg_no_debug_cb),
	(gtk_arg_module_cb), (gtk_arg_warnings_cb),
	(do_pre_parse_initialization), (do_post_parse_initialization),
	(pre_parse_hook), (post_parse_hook), (gtk_get_option_group),
	(gtk_init_with_args), (gtk_parse_args):
	* gtk/gtkmain.h:
	Make gtk argument parsing use goption. Add gtk_get_option_group and
	gtk_init_with_args.

	* tests/testtreemodel.c: (main):
	Use gtk_init_with_args.
2004-09-05 15:09:55 +00:00
Søren Sandmann
59e481fab5 Revert accidental change from Aug 02 that removed a flush of the X
Sat Sep  4 16:51:00 2004  Søren Sandmann  <sandmann@redhat.com>

	* gdk/x11/gdkevents-x11.c (gdk_event_prepare): Revert accidental
	change from Aug 02 that removed a flush of the X connection from
	gdk_event_prepare() causing applications to get stuck. (#151732,
	Richard Hoelscher).
2004-09-04 15:07:16 +00:00
Matthias Clasen
8189921f44 Make it possible to specify additional modules to load via a setting.
2004-09-01  Matthias Clasen  <mclasen@redhat.com>

	Make it possible to specify additional modules to load
	via a setting.  (#117236, Alex Graveley)

	* gtk/gtkmodules.h:
	* gtk/gtkmodules.c: New files which contain the module
	handling code which was previously in gtkmain.[hc].
	Additionally, the code now looks for the gtk-modules
	setting, which can specify additional modules to load.

	* gtk/gtkmain.c:
	* gtk/gtkmain.h: Remove all the module handling code.

	* gtk/gtkdebug.h: Add a debug flag for modules.

	* gtk/gtk.h: Include gtkmodules.h

	* gtk/Makefile.am (gtk_public_h_sources): Add gtkmodules.h
	(gtk_c_sources): Add gtkmodules.c

	* gtk/gtksettings.c: Add the gtk-modules setting.

	* gdk/x11/gdkevents-x11.c: Add the Gtk/Modules XSetting.
2004-09-01 20:30:24 +00:00
Matthias Clasen
6d5398ccdc Remove debug spew.
Tue Aug 31 23:20:58 2004  Matthias Clasen  <maclas@gmx.de>

	* gdk/x11/gdkdnd-x11.c (gdk_drop_finish): Remove debug spew.
2004-09-01 03:21:30 +00:00
Manish Singh
800574e35c remove unused gdk_font_charset_for_locale() function.
Wed Aug 25 17:24:17 2004  Manish Singh  <yosh@gimp.org>

        * gdk/x11/gdkfont-x11.c: remove unused gdk_font_charset_for_locale()
        function.

        * gdk/x11/gdkinput-x11.c (_gdk_input_common_init): remove unused
        variables num_extensions and extensions.

        * gtk/gtkhsv.c: remove unused gtk_hsv_get_focus_gc() function.
2004-08-26 00:23:46 +00:00
Matthias Clasen
2d2d3e4b27 Make it compile. 2004-08-23 19:05:04 +00:00
Matthias Clasen
a9585748ec Add a user_time field.
2004-08-23  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkwindow-x11.h (struct _GdkToplevelX11): Add a
	user_time field.

	* gdk/x11/gdkwindow-x11.c (gdk_x11_window_set_user_time): Update
	toplevel->user_time.
	(show_window_internal): Update the user time when re-mapping a
	toplevel window.  (#150502, Elijah Newren)
2004-08-23 17:10:34 +00:00
Matthias Clasen
31b681948c Support the latest EWMH additions to the _NET_ACTIVE_WINDOW client message
2004-08-23  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkwindow-x11.c (gdk_window_focus): Support the latest
	EWMH additions to the _NET_ACTIVE_WINDOW client message
	format.  (#150668, Elijah Newren)
2004-08-23 15:12:04 +00:00
Matthias Clasen
0742ff3ae3 Add hidden aliases for exported symbols which are used internally in order
Mon Aug  9 15:41:17 2004  Matthias Clasen  <maclas@gmx.de>

	Add hidden aliases for exported symbols which are
	used internally in order to get rid of many PLT
	entries.  (#145519, Arjan van de Ven)

	* gdk/Makefile.am: Add rules to generate gdk.def and
	gdkalias.h from gdk.symbols, and make make check check
	the abi with abicheck.sh.

	* gdk/gdk.symbols: New file. Definition of the GDK ABI.
	The file can be processed by cpp to filter out certain
	subsets of symbols.

	* gdk/abicheck.sh: New file. Script to check the actually
	symbols exported from libgdk-x11.2.0.so against the symbols
	found in gdk.symbols.

	* gdk/makegdkalias.pl: New file. Perl script to generate the
	header containing the alias definitions for internally used
	exported symbols from a list of symbols.

	* gdk/*.c, gdk/x11/*.c: Include gdkalias.h
2004-08-09 20:14:43 +00:00
Morten Welinder
2f7c4c1e10 Fix C99ism.
2004-08-09  Morten Welinder  <terra@gnome.org>

	* gdk/x11/gdkdnd-x11.c (gdk_drag_drop_succeeded): Fix C99ism.
2004-08-09 19:58:05 +00:00
Matthias Clasen
6542996063 Make static.
Mon Aug  9 14:24:46 2004  Matthias Clasen  <maclas@gmx.de>

	* gdk/x11/gdkevents-x11.c (gdk_event_send_client_message_to_all_recurse):
	Make static.
2004-08-09 18:29:21 +00:00
Matthias Clasen
39469f8f4a Really fix the initialization of the target list.
2004-08-06  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkdnd.c (gtk_drag_dest_set, gtk_drag_source_set): Really
	fix the initialization of the target list.

	Support XDND v5. (#10220, Owen Taylor)

	* gdk/x11/gdkdnd-x11.c: Record the XDND version and whether the
	drop was successful in the GdkDragContextPrivateX11 struct.
	(xdnd_finished_filter): Store the success status of the drop
	for an XDND version 5 interaction. For other versions, always
	assume the drop was successful.
	(xdnd_check_dest): Return the protocol version.
	(_gdk_drag_get_protocol_for_display): Return the protocol version.
	(gdk_drag_find_window_for_screen): Store the used protocol version
	in the GdkDragContext.
	(xdnd_send_enter): Send the used protocol version from the context,
	instead of hardwiring 3.
	(xdnd_enter_filter): Accept protocol versions >= 3 and store the
	used protocol version in the context.

	* gdk/gdkdnd.h:
	* gdk/x11/gdkdnd-x11.c (gdk_drag_drop_succeeded): New function
	to find out whether a drop was successful.
2004-08-06 17:03:52 +00:00
Soeren Sandmann
ed44e79c49 Call gdk_window_enable_synchronized_configure()
Thu Aug  5 19:58:08 2004  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gtk/gtkplug.c (gtk_plug_realize): Call
	gdk_window_enable_synchronized_configure()

	* gdk/x11/gdkwindow-x11.c (gdk_window_configure_finished): Make
	noop if gdk_window_enable_synchronized_configure() has not been
	called.
2004-08-05 17:58:20 +00:00
Soeren Sandmann
b506066667 New function. Make sure the sync counter is recreated when a window is
Mon Aug  2 21:52:45 2004  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gdk/x11/gdkwindow-x11.c (ensure_sync_counter): New
	function. Make sure the sync counter is recreated when a window is
	reparented to become a toplevel. (#148358)
2004-08-02 20:01:27 +00:00
Matthias Clasen
856064b036 Add missing error traps. (#149011, Thomas Leonard)
Mon Aug  2 01:02:57 2004  Matthias Clasen  <maclas@gmx.de>

	* gdk/x11/gdkevents-x11.c (gdk_check_wm_state_changed):
	(gdk_check_wm_desktop_changed): Add missing error
	traps.  (#149011, Thomas Leonard)
2004-08-02 05:04:33 +00:00
Matthias Clasen
dc0f328bf2 Don't set both states at once. (#148789, Matthew Garret)
Sat Jul 31 00:42:08 2004  Matthias Clasen  <maclas@gmx.de>

	* gdk/x11/gdkwindow-x11.c (gdk_window_set_keep_below):
	* gdk/x11/gdkwindow-x11.c (gdk_window_set_keep_above): Don't
	set both states at once.  (#148789, Matthew Garret)
2004-07-31 04:45:09 +00:00
Anders Carlsson
c7e31e3471 Cast to 32-bit integers when premultiplying, suggested by Keith Packard.
2004-07-28  Anders Carlsson  <andersca@gnome.org>

	* gdk/x11/gdkdrawable-x11.c (gdk_draw_rectangle_alpha_libgtk_only):
	Cast to 32-bit integers when premultiplying, suggested by Keith Packard.
2004-07-27 23:19:19 +00:00
Anders Carlsson
564ab37a07 Add gdk_draw_rectangle_alpha_libgtk_only which uses XRenderFillRectangle
2004-07-27  Anders Carlsson  <andersca@gnome.org>

	* demos/gtk-demo/iconview.c: (do_iconview):
	* gdk/gdkdrawable.h:
	* gdk/linux-fb/gdkdrawable-fb2.c:
	(gdk_draw_rectangle_alpha_libgtk_only):
	* gdk/win32/gdkdrawable-win32.c:
	(gdk_draw_rectangle_alpha_libgtk_only):
	* gdk/x11/gdkdrawable-x11.c: (gdk_x11_draw_image),
	(get_impl_drawable), (gdk_x11_draw_pixbuf),
	(gdk_draw_rectangle_alpha_libgtk_only):
	Add gdk_draw_rectangle_alpha_libgtk_only which uses
	XRenderFillRectangle on X11. It's stubbed out on the
	Win32 and fb backends.

	* gtk/gtkiconview.c:
	(gtk_icon_view_paint_rubberband):
	Use gdk_draw_rectangle_alpha_libgtk_only here.
2004-07-27 21:58:09 +00:00
Matthias Clasen
a76303dfb3 Hook up gtk-menu-bar-accel to an XSetting, Gtk/MenuBarAccel. (#120859,
Tue Jul 20 23:11:23 2004  Matthias Clasen  <maclas@gmx.de>

	* gdk/x11/gdkevents-x11.c: Hook up gtk-menu-bar-accel to
	an XSetting, Gtk/MenuBarAccel.  (#120859, Scott James Remnant)
2004-07-21 03:12:38 +00:00
Matthias Clasen
601ef659f4 Fix a warning message. 2004-07-17 05:18:09 +00:00
Matthias Clasen
e0e35c0cd9 Use 'cannot' instead of 'can not' in messages. (#144226, Morten Welinder)
Thu Jul 15 19:20:05 2004  Matthias Clasen  <maclas@gmx.de>

	* gdk/x11/gdkim-x11.c (_gdk_x11_initialize_locale):
	* gtk/gtkcalendar.c (gtk_calendar_class_init): Use 'cannot'
	instead of 'can not' in messages.  (#144226, Morten Welinder)
2004-07-15 23:24:51 +00:00
Soeren Sandmann
dddab53b54 Do an empty begin_paint_region()/end_paint() for windows without
Tue Jul 13 00:40:29 2004  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gdk/gdkwindow.c (gdk_window_process_updates_internal): Do an
	empty begin_paint_region()/end_paint() for windows without
	EXPOSURE_MASK.

	* gdk/x11/gdkwindow-x11.c (_gdk_x11_window_tmp_unset_bg,
	_gdk_x11_window_tmp_reset_bg): Remove checks for EXPOSURE_MASK.
2004-07-12 22:52:40 +00:00
Matthias Clasen
027bbe0fd9 Include the update_counter check in the HAVE_XSYNC condition, since
Mon Jul 12 01:56:26 2004  Matthias Clasen  <maclas@gmx.de>

	* gdk/x11/gdkwindow-x11.c (gdk_toplevel_x11_free_contents):
	Include the update_counter check in the HAVE_XSYNC condition,
	since update_counter isn't present in the !HAVE_XSYNC case.
2004-07-12 05:57:41 +00:00
Soeren Sandmann
1a5e92dd61 Bug 143330, support update counter spec.
Sun Jul 11 15:24:03 2004  Soeren Sandmann  <sandmann@daimi.au.dk>

	Bug 143330, support update counter spec.

	* configure.in: Add check for the Sync extension

	* gdk/gdkwindow.h: gdk_window_enable_synchronized_configure() and
	gdk_window_configure_finished()

	* gtk/gtkwindow.c (gtk_window_move_resize): Call gdk_window_finish_configure().
	* gtk/gtkwindow.c (gtk_window_realize): Automatically enable
	synchronized configures.

	* gdk/x11/gdkwindow-x11.h (struct _GdkToplevelX11): Store current
	and pending counter values.

	* gdk/x11/gdkwindow-x11.c (gdk_window_configure_finished): New function.
	* gdk/x11/gdkwindow-x11.c
	(gdk_window_enable_synchronized_configure): New function.
	* gdk/x11/gdkwindow-x11.c (gdk_toplevel_x11_free_contents):
	Delete update counter.
	* gdk/x11/gdkwindow-x11.c (set_wm_protocols): Advertise
	_NET_WM_SYNC_REQUEST when Sync is available

	* gdk/x11/gdkevents-x11.c (gdk_wm_protocols_filter): Handle
	_NET_WM_SYNC_REQUEST messages
	* gdk/x11/gdkevents-x11.c (gdk_event_translate): Save counter
	value for use by gdk_window_configure_finished() when receiving
	ConfigureNotifies.

	* gdk/x11/gdkdisplay-x11.h (struct _GdkDisplayX11): Add use_sync flag
	* gdk/x11/gdkdisplay-x11.c (gdk_display_open): Check if the XSync
	extension is available
	* gdk/x11/gdkdisplay-x11.c: Add _NET_WM_SYNC_REQUEST and
	_NET_WM_SYNC_REQUEST_COUNTER to list of supported atoms.

	* gdk/linux-fb/gdkwindow-fb.c, gdk/win32/gdkwindow-win32.c: Add
	stubs for enable_synchronized_configure() and configure_finished()
2004-07-11 13:26:57 +00:00
Soeren Sandmann
1c5a1dda9b Insert checks for root window. The root window is never mapped.
Sat Jul 10 01:55:29 2004  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gdk/x11/gdkwindow-x11.c (_gdk_x11_window_tmp_{re|un}set_bg):
	Insert checks for root window. The root window is never mapped.
2004-07-09 23:57:08 +00:00
Soeren Sandmann
d7da887ee6 Fix a warning Actually unset bg.
Sat Jul 10 01:06:05 2004  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gdk/x11/gdkwindow-x11.c (post_unmap): Fix a warning
	* gdk/x11/gdkwindow-x11.c (show_window_internal): Actually unset
	bg.
2004-07-09 23:06:35 +00:00
Soeren Sandmann
69ab514aef Bug 113310.
Sat Jul 10 00:37:45 2004  Soeren Sandmann  <sandmann@daimi.au.dk>

	Bug 113310.

	* gdk/x11/gdkwindow-x11.c (_gdk_x11_window_tmp_{un|re}set_bg):
	New functions that can do a recursive unset/reset bg.

	* gdk/x11/gdkgeometry-x11.c: Remove
	gdk_window_tmp_{un|re}set_bg().

	* gdk/x11/gdkwindow-x11.c (pre_unmap, post_unmap): New functions
	called before and after unmapping a window. They unset the
	background of all other windows to prevent flicker from the X
	server repainting the background. post_unmap() also invalidates
	the parent of the unmapped window to draw it without roundtrips.

	* gdk/x11/gdkwindow-x11.c (show_window_internal): Unset
	background of newly mapped windows and all desendants to prevent
	flicker.
2004-07-09 22:44:35 +00:00
Manish Singh
b22258e6a6 have a dummy case GDK_OWNER_CHANGE in switch statements to avoid gcc
Fri Jul  9 15:33:55 2004  Manish Singh  <yosh@gimp.org>

        * gdk/gdkevents.c: have a dummy case GDK_OWNER_CHANGE in switch
        statements to avoid gcc warnings about not all enum values handled.

        * gdk/x11/gdkdisplay-x11.c (gdk_display_open): ignore should live in
        #ifdef HAVE_XFIXES.
2004-07-09 22:42:19 +00:00
Soeren Sandmann
8889f2b45d Add an "override_redirect" bit.
Fri Jul  9 23:26:09 2004  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gdk/x11/gdkwindow-x11.h (struct _GdkWindowImplX11): Add an
	"override_redirect" bit.

	* gdk/x11/gdkwindow-x11.c (gdk_window_new): Set it here.

	* gdk/x11/gdkwindow-x11.c (gdk_window_move, gdk_window_resize,
	gdk_window_move_resize):
	Update the local size/position cache
	immediately for override redirect windows.

	* gdk/x11/gdkwindow-x11.c (show_window_internal): Invalidate
	newly mapped child and override redirect windows.
2004-07-09 21:27:09 +00:00
Federico Mena Quintero
097eddf374 Fix typo; tmp_event -> temp_event.
2004-07-09  Federico Mena Quintero  <federico@ximian.com>

	* gdk/x11/gdkdnd-x11.c (xdnd_send_xevent): Fix typo; tmp_event ->
	temp_event.
2004-07-09 17:43:10 +00:00
Matthias Clasen
9ab68256d1 Don't leak references to the drag context. (#144324, Alex Larsson)
2004-07-08  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkdnd-x11.c (xdnd_send_xevent): Don't leak
	references to the drag context.  (#144324, Alex Larsson)
2004-07-08 20:29:19 +00:00
Matthias Clasen
a346f4a8ad Fix a 64bit alignment issue. (#144302, Sunil)
Tue Jul  6 22:58:00 2004  Matthias Clasen  <maclas@gmx.de>

	* gdk/x11/gdkwindow-x11.c (gdk_x11_window_set_user_time): Fix
	a 64bit alignment issue.  (#144302, Sunil)
2004-07-07 02:59:47 +00:00
Matthias Clasen
401d10f2c6 Handle _NET_WM_STATE_ABOVE and _NET_WM_STATE_BELOW. (#144851, Billy Biggs)
Sat Jun 26 01:15:40 2004  Matthias Clasen  <maclas@gmx.de>

	* gdk/x11/gdkwindow-x11.c (set_initial_hints): Handle
	_NET_WM_STATE_ABOVE and _NET_WM_STATE_BELOW.  (#144851,
	Billy Biggs)
2004-06-26 05:17:59 +00:00
Bastien Nocera
8b6934bc2c reviewed by: Matthias Clasen <maclas@gmx.de>
2004-06-25  Bastien Nocera  <hadess@hadess.net>

	reviewed by: Matthias Clasen  <maclas@gmx.de>

	* gdk/x11/gdkkeys-x11.c: (get_symbol), (update_keymaps),
	(gdk_keymap_lookup_key), (translate_keysym): fix keys parsing when
	the number of keysyms per keycode is odd. Fixes #144808.
2004-06-25 15:21:43 +00:00
Matthias Clasen
69a848e018 Doc updates. 2004-06-22 15:29:29 +00:00
Michael Natterer
1408c75941 Merge from stable:
2004-06-21  Michael Natterer  <mitch@gimp.org>

	Merge from stable:

	* gdk/x11/gdkdrawable-x11.[ch]: made convert_format() utility
	function public as _gdk_x11_convert_to_format().

	* gdk/x11/gdkcursor-x11.c (create_cursor_image): premultiply
	the pixels from the GdkPixbuf when putting them in the
	Xcursor image. Fixes bug #144350.
2004-06-21 16:13:55 +00:00
Matthias Clasen
588b8c7f71 Fix off-by-one allocation errors. (#143337, Billy Biggs)
Fri May 28 14:20:17 2004  Matthias Clasen  <maclas@gmx.de>

	* gdk/x11/gdkevents-x11.c: Fix off-by-one allocation
	errors. (#143337, Billy Biggs)
2004-05-28 18:21:58 +00:00
Owen Taylor
ac8b3dc1ae Set bits within visual->depth that aren't used for color to 1s, in case
Thu May 27 16:36:22 2004  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkcolor-x11.c (gdk_colormap_alloc_colors): Set
        bits within visual->depth that aren't used for color to
        1s, in case they are alpha.
2004-05-27 20:46:58 +00:00
Matthias Clasen
7b8616bf76 Check for XFIXES extension.
2004-05-18  Matthias Clasen  <mclasen@redhat.com>

	* configure.in: Check for XFIXES extension.

	* gdk/x11/gdkdisplay-x11.h (struct _GdkDisplayX11): Add
	a gboolean have_xfixes member.

	* gdk/x11/gdkdisplay-x11.c (gdk_display_open): Register
	XFIXES events and set have_xfixes.

	* gdk/gdkevents.h (GdkEventType): Add GDK_OWNER_CHANGE.
	(GdkEventOwnerChange): New event struct for owner change events.
	(GdkOwnerChange): New enum for the reason field of GdkEventOwnerChange.

	* gdk/x11/gdkevents-x11.c (gdk_event_translate): Translate
	XFixesSelectionNotify events into GdkEventOwnerChange events.

	* gdk/gdkdisplay.h:
	* gdk/x11/gdkdisplay-x11.c (gdk_display_supports_selection_notification):
	(gdk_display_request_selection_notification): New api
	to support selection ownership notification.

	* gtk/gtkclipboard.h:
	* gtk/gtkclipboard.c (_gtk_clipboard_handle_event): New private
	api to handle owner change events.
	(clipboard_peek): Refactored out the body of
	gtk_clipboard_get_for_display() for use in _gtk_clipboard_handle_event().

	* gtk/gtkmain.c (gtk_main_do_event): Handle GDK_OWNER_CHANGE events
	by calling _gtk_clipboard_handle_event().
2004-05-18 20:56:54 +00:00
Matthias Clasen
db167a4a5f Make static.
2004-05-10  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdkdisplay.c (singlehead_...):
	* gdk/x11/gdkkeys-x11.c (get_effective_keymap):
	* gdk/x11/gdkgeometry-x11.c (expose_serial_predicate):
	* gdk/x11/gdkdisplay-x11.c (escape_for_xmessage): Make static.
2004-05-10 20:51:19 +00:00
Elijah Newren
5502f77eaf Changes to support do-not-focus-on-map hint in conjunction with
2004-05-05  Elijah Newren  <newren@math.utah.edu>

	Changes to support do-not-focus-on-map hint in conjunction with
	_NET_WM_USER_TIME (#115650):

	* gdk/gdkwindow.h (struct _GdkWindowObject): Add a new boolean
	field focus_on_map

	* gdk/gdkwindow.h (gdk_window_set_accept_focus): New function to
	set it.

	* gtk/gtkwindow.[hc]: Add a boolean property "focus_on_map"
	and gtk_window_get_focus_on_map() and gtk_window_set_focus_on_map().

	* gdk/win32/gdkwindow-win32.c (gdk_window_new):
	* gdk/linux-fb/gdkwindow-fb.c (gdk_window_new):
	* gdk/x11/gdkwindow-x11.c (gdk_window_new):
	Initialize the focus_on_map field to TRUE.

	* gdk/win32/gdkwindow-win32.c (gdk_window_set_focus_on_map):
	* gdk/linux-fb/gdkwindow-fb.c (gdk_window_set_focus_on_map):
	* gdk/x11/gdkwindow-x11.c (gdk_window_set_focus_on_map):
	* gdk/x11/gdkwindow-x11.c (setup_toplevel_window):
	Implementations for the various backends. The Win32 and linux-fb
	implementations set the focus_on_map field, but don't use it yet
	to actually implement noinput windows. The X implementation sets
	_NET_WM_USER_TIME to 0 if focus_on_map is FALSE (see the EWMH).

	* gdk/x11/gdkwindow-x11.h:
	* gdk/x11/gdkevents-x11.c (set_user_time):
	* gdk/x11/gdkinput-x11.c (_gdk_input_common_other_event):
	* gdk/x11/gdkwindow-x11.c (gdk_x11_window_set_user_time):
	s/_gdk_x11_window_set_user_time/gdk_x11_window_set_user_time/,
	since we want that function to be part of the public API.
2004-05-06 02:57:01 +00:00
Matthias Clasen
b139a59978 Make set_user_time() static. _-prefix calls of
2004-04-23  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkevents-x11.c (set_user_time): Make set_user_time()
	static.
	* gdk/x11/gdkinput-x11.c (_gdk_input_common_other_event):
	_-prefix calls of gdk_x11_window_set_user_time().
2004-04-23 13:03:56 +00:00
Soeren Sandmann
8340991b7d Make gdk_keymap_translate_keyboard_state() handle NULL keymaps. (#139715,
Sun Apr 18 17:06:03 2004  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gdk/x11/gdkkeys-x11.c (get_effective_keymap): Make
	gdk_keymap_translate_keyboard_state() handle NULL
	keymaps. (#139715, Torsten Schoenfeld).
2004-04-18 15:10:59 +00:00
Soeren Sandmann
730da6f84c Support for _NET_WM_USER_TIME (bug 115650). Patch by Elijah Newren.
Sun Apr 18 16:15:15 2004  Soeren Sandmann  <sandmann@daimi.au.dk>

	Support for _NET_WM_USER_TIME (bug 115650). Patch by Elijah
	Newren.

	* gdk/x11/gdkwindow-x11.[ch]: Add new internal function
	_gdk_x11_set_user_time() to set the _NET_WM_USER_TIME property.

	* gdk/x11/gdkdisplay-x11.h (struct _GdkDisplayX11): Add user_time field

	* gdk/x11/gdkdisplay-x11.c: Add _NET_WM_USER_TIME to list of
	precached atoms.

	* gdk/x11/gdkinput-x11.c, gdk/x11/gdkevents-x11.c: Set the
	property on user interaction.
2004-04-18 14:33:07 +00:00
Owen Taylor
ef5915da35 Make this a total no-op when the new or old parent is destroyed. (#134230,
Sat Mar 13 12:17:16 2004  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkwindow-x11.c (gdk_window_reparent): Make
        this a total no-op when the new or old parent is
        destroyed. (#134230, patch from Soeren Sandmann)

        * gdk/gdkwindow.c (_gdk_window_destroy_hierarchy):
        For foreign windows in our heirarchy, call
        _gdk_windowing_window_destroy_foreign (window) and skip
        all the normal destruction logic.

        * gdk/x11/gdkwindow-x11.c gdk/win32/gdkwindow-win32.c:
        Move code to request destruction of a foreign window
        code into a separate _gdk_windowing_window_destroy_foreign().

        * gdk/x11/gdkwindow-x11.c (gdk_window_impl_x11_finalize):
        Call GDK_WINDOW_DISPLAY() on the wrapper not on the
        impl. (Also from Soeren's patch)
2004-03-13 18:27:56 +00:00
Federico Mena Quintero
80581c3011 Fixes #136082 and #135265, patch by Morten Welinder.
2004-03-05  Federico Mena Quintero  <federico@ximian.com>

	Fixes #136082 and #135265, patch by Morten Welinder.

	* configure.in: Use AC_SYS_LARGEFILE.

	* */*.c: #include <config.h>
2004-03-06 03:38:59 +00:00
Simon Budig
c04ecdaa1a X11 R6.4 specifies 15 events for the XInput extension. We want to see them
2004-03-01  Simon Budig  <simon@gimp.org>

	* gdk/x11/gdkinput-x11.c: X11 R6.4 specifies 15 events
	for the XInput extension. We want to see them all.
	We now get Proximity Out events again. Fixes bug #135320.
2004-03-01 23:59:36 +00:00
Owen Taylor
945e6c4ecb Based on patch by Alex Larsson
Mon Mar  1 14:16:52 2004  Owen Taylor  <otaylor@redhat.com>

        Based on patch by Alex Larsson

        * gtk/gtkfilechooserdefault.c: Use gtk-file-chooser-backend
        GtkSetting to set the backend if the app doesn't specify one.

        * gdk/x11/gdkevents-x11.c gtk/gtksettings.c:
        Add Gtk/FileChooserBackend.
2004-03-01 19:40:47 +00:00
Manish Singh
7f31ba2bd6 fix ytpo: s/eles/else/
Thu Feb 26 17:31:34 2004  Manish Singh  <yosh@gimp.org>

        * gdk/x11/xsettings-client.c (read_settings): fix ytpo: s/eles/else/
2004-02-27 01:31:16 +00:00
Owen Taylor
4cbbe4e161 Add xsettings_client_set_grab_func, Add xsettings_client_set_ungrab_func
Thu Feb 26 19:53:32 2004  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/xsettings-common.h (xsettings_client_process_event):
        Add xsettings_client_set_grab_func,
        Add xsettings_client_set_ungrab_func to the list of renames.
2004-02-27 00:56:04 +00:00
Owen Taylor
4528eae1f3 Fix memory leak in case of mismatched property type.
Thu Feb 26 19:48:39 2004  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/xsettings-client.c (read_settings): Fix memory leak
        in case of mismatched property type.
2004-02-27 00:52:45 +00:00
Owen Taylor
04ebfe9465 Return GDK_FILTER_CONTINUE for unhandled message types.
Thu Feb 26 17:29:04 2004  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkevents-x11.c (gdk_wm_protocols_filter): Return
        GDK_FILTER_CONTINUE for unhandled message types.

        * gdk/x11/gdkevents-x11.c (gdk_event_translate): Allow
        multiple filters for the same event type with the standard
        "GDK_FILTER_CONTINUE == pretend I wasn't here" semantics.

        * gdk/x11/gdkevents-x11.c (gdk_display_add_client_message_filter):
        Append to the filter list not prepend, since order now matters.

        * gdk/win32/gdkevents-win32.c (gdk_add_client_message_filter):
        Append to the filter list not prepend, since order now matters.
2004-02-26 22:53:50 +00:00
Owen Taylor
d2e3514d63 Use the right free() function. (#135511, George Bronnikov)
Thu Feb 26 13:23:47 2004  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkwindow-x11.c (set_text_property): Use the right
        free() function. (#135511, George Bronnikov)
2004-02-26 18:28:07 +00:00
Owen Taylor
6139c61d22 Call g_convert(), not g_convert() with fallback, since Emacs is happier if
Wed Feb 25 15:36:50 2004  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkselection-x11.c (gdk_utf8_to_compound_text_for_display):
        Call g_convert(), not g_convert() with fallback, since Emacs is
        happier if we reject the COMPOUND_TEXT request and it can
        then ask for UTF-8. (#114527)

        * gtk/gtkselection.c (gtk_selection_data_set_text): When
        TEXT is requested, if COMPOUND_TEXT fails, fall back to STRING.
2004-02-25 23:05:48 +00:00
Soeren Sandmann
e2e6a5f411 Bug 130790 (Federico Mena Quintero, Owen Taylor)
Sat Feb 21 20:09:53 2004  Soeren Sandmann  <sandmann@daimi.au.dk>

	Bug 130790 (Federico Mena Quintero, Owen Taylor)

	* gdk/x11/gdkevents-x11.c: Add Xft XSETTINGS

	* gtk/gtksettings.c: Add new GtkSettings corresponding to the Xft
	XSETTINGS
2004-02-21 19:17:48 +00:00
Matthias Clasen
add52ebbbf Fixes for #82099:
Thu Feb 19 23:41:06 2004  Matthias Clasen  <maclas@gmx.de>

	Fixes for #82099:

	* gdk/x11/gdkevents-x11.c: Introduce new XSettings "Gtk/ButtonImages"
	and "Gtk/MenuImages" and map them to "gtk-button-images" and
	"gtk-menu-images".

	* gtk/gtkimagemenuitem.c: Add a boolean setting "gtk-menu-images" and use
	it to set the visibility of the embedded image.

	* gtk/gtkbutton.c: Add a boolean setting "gtk-button-images" and use
	it to set the visibility of an embedded image.
2004-02-19 22:39:58 +00:00
Soeren Sandmann
1c51c48606 GC caching, bug #125645 (based on patch by Brian Cameron)
Wed Feb 18 01:44:59 2004  Soeren Sandmann  <sandmann@daimi.au.dk>

	GC caching, bug #125645 (based on patch by Brian Cameron)

	* gdk/gdkscreen.h (struct _GdkScreen): Add GC cache
	* gdk/gdkscreen.c (gdk_screen_dispose): New function. Unref the
	cached GC's here.
	* gdk/gdkdraw.c (_gdk_drawable_get_scratch_gc): New function to
	get a scratch gc.
	* gdk/gdkinternals.h: Declare the function here

	* gdk/gdkdraw.c (gdk_drawable_real_draw_pixbuf): Use
	_gdk_drawable_get_scratch_gc() instead of creating a new GC.
	* gdk/x11/gdkgeometry-x11.c (gdk_window_copy_area_scroll): same
	* gdk/x11/gdkdrawable-x11.c (draw_with_images): same
	* gdk/gdkwindow.c (gdk_window_get_composite_drawable): same
	* gdk/gdkwindow.c (gdk_window_end_paint): same
	* gdk/gdkpixmap.c (gdk_pixmap_colormap_new_from_pixbuf): same
	* gdk/gdkpixbuf-render.c (gdk_pixbuf_render_threshold_alpha): same
	* gdk/gdkpixbuf-render.c (gdk_pixbuf_render_pixmap_and_mask_for_colormap): same
2004-02-18 00:59:14 +00:00
Soeren Sandmann
6c8430c0c4 Fix for #119722, reported by Olexiy Avramchenko, patch by Owen Taylor.
Tue Feb 17 23:02:58 2004  Soeren Sandmann  <sandmann@daimi.au.dk>

	Fix for #119722, reported by Olexiy Avramchenko, patch by Owen
	Taylor.

	* gdk/x11/gdkprivate-x11.h (struct _GdkGCX11): Add a depth field

	* gdk/x11/gdkgc-x11.c (_gdk_x11_gc_new): Keep track of the GC's
	depth.

	* gdk/x11/gdkgc-x11.c (_gdk_gc_x11_get_fg_xft_color): First query
	the colormap, if no colormap, special case depth 1,

	* gdk/x11/gdkgc-x11.c (_gdk_x11_gc_get_fg_picture): Use
	_gdk_gc_x11_get_fg_xft_color() to get the foreground color.

	* gdk/x11/gdkdrawable-x11.c (gdk_x11_drawable_get_xft_draw):
	Special-case bitmaps without a colormap.

	* gdk/x11/gdkdrawable-x11.c (gdk_x11_draw_pixbuf): Use inherited
	draw_pixbuf() implementation in the bitmap case.
2004-02-17 22:05:47 +00:00
Manish Singh
7cf055efb3 Assign xtype using gdk_x11_atom_to_xatom_for_display () when type !=
Thu Feb 12 11:05:16 2004  Manish Singh  <yosh@gimp.org>

        * gdk/x11/gdkproperty-x11.c (gdk_property_get): Assign xtype using
        gdk_x11_atom_to_xatom_for_display () when type != GDK_NONE.

        * gtk/gtkselection.c (_gtk_selection_request): Use GDK_NONE in
        gdk_property_get call instead of 0.

        * docs/reference/gdk/tmpl/properties.sgml: Document the above
        as GDK_NONE instead of simply 0.
2004-02-12 19:18:23 +00:00
Matthias Clasen
06d35613f7 Fix misleading debug output.
Thu Feb 12 00:37:00 2004  Matthias Clasen  <maclas@gmx.de>

	* gdk/x11/gdkproperty-x11.c (gdk_property_change): Fix misleading
	debug output.
2004-02-11 23:33:59 +00:00
Owen Taylor
351ebd8bd2 Avoid triggering an X error when the client->manager_window is
Tue Feb 10 12:02:14 2004  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/xsettings-client.c (read_settings): Avoid
        triggering an X error when the client->manager_window
        is None...makes logs look cleaner.

        * gdk/x11/gdkproperty-x11.c (gdk_property_get): Handle
        GDK_NONE to mean AnyPropertyType as documented. (Reported
        by Yu Shao)

        * gdk/x11/gdkevents-x11.c (fetch_net_wm_check_window,
        gdk_x11_screen_get_window_manager_name): Fix error trap
        we've been leaking since 2002... (#129538)
2004-02-10 18:51:19 +00:00
Soeren Sandmann
01440e457e Use a weak reference instead of ref()/unref(). (#60857, reported by Joshua
Tue Feb  3 00:14:36 2004  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gdk/x11/gdkgeometry-x11.c (queue_item_free, gdk_window_queue):
	Use a weak reference instead of ref()/unref(). (#60857, reported
	by Joshua N Pritikin)

	* gdk/gdkimage.c (scratch_image_info_for_depth): Formatting fix.
2004-02-02 23:26:55 +00:00
Soeren Sandmann
d9d3cf5eda Assume gravity works. (Anything else we have to take our chances with).
Mon Feb  2 19:04:17 2004  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gdk/x11/gdkwindow-x11.c: Assume gravity works. (Anything else
	we have to take our chances with).

	(Bug 97510)
2004-02-02 18:18:18 +00:00
Soeren Sandmann
ff364586da Remove unused variable 'result'
Mon Feb  2 18:45:28 2004  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gdk/x11/gdkfont-x11.c (gdk_font_from_description_for_display):
	Remove unused variable 'result'

	* gdk/x11/xsettings-client.[ch]: Add new set_grab/ungrab_func() functions.

	* gdk/x11/gdkevents-x11.c (_gdk_x11_events_init_screen): Use them here
2004-02-02 18:01:27 +00:00
Federico Mena Quintero
a9fbfc99f5 Fixes #132975.
2004-01-30  Federico Mena Quintero  <federico@ximian.com>

	Fixes #132975.

	* gtk/gtkfilesystem.c (gtk_file_system_make_path): Return NULL,
	not FALSE.
	(gtk_file_system_volume_render_icon): Likewise.

	* gtk/gtkfilesystemwin32.c (gtk_file_system_win32_make_path):
	Likewise.

	* gtk/gtktreestore.c (gtk_tree_store_iter_n_children): Return 0,
	not FALSE.

	* gtk/gtktoolbar.c (gtk_toolbar_get_drop_index): Return -1, not
	FALSE.

	* gtk/gtktextiter.c (gtk_text_iter_get_chars_in_line): Return 0,
	not FALSE.
	(gtk_text_iter_get_bytes_in_line): Likewise.

	* gdk/x11/gdkcursor-x11.c (gdk_display_get_default_cursor_size):
	Likewise.

	* gdk/linux-fb/gdkcolor-fb.c (gdk_colors_alloc): Return FALSE, not
	0.
2004-01-30 19:49:40 +00:00
Owen Taylor
1378322fe4 Revert changes from #113476 and go back to using XftDrawSetClip, because
Fri Jan 30 11:37:37 2004  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkdrawable-x11.c: Revert changes from
        #113476 and go back to using XftDrawSetClip, because
        XftDrawSetClipRectangles is buggy in XFree86-4.3.
2004-01-30 16:40:59 +00:00
Federico Mena Quintero
5ebb6b04f2 Fix #105497; constify uses of GdkColor.
2004-01-26  Federico Mena Quintero  <federico@ximian.com>

	Fix #105497; constify uses of GdkColor.

	* gdk/gdkgc.c (gdk_gc_set_rgb_fg_color): Constify.
	(gdk_gc_set_rgb_bg_color): Constify.
	(gdk_gc_set_foreground): Constify.

	* gdk/x11/gdkcursor-x11.c (gdk_cursor_new_from_pixmap): Constify.
	* gdk/win32/gdkcursor-win32.c (gdk_cursor_new_from_pixmap): Constify.
	* gdk/linux-fb/gdkcursor-fb.c (gdk_cursor_new_from_pixmap): Constify.

	* gdk/x11/gdkpixmap-x11.c (gdk_pixmap_create_from_data): Constify.
	* gdk/win32/gdkpixmap-win32.c (gdk_pixmap_create_from_data): Constify.
	* gdk/linux-fb/gdkpixmap-fb.c (gdk_pixmap_create_from_data): Constify.

	* gdk/x11/gdkwindow-x11.c (gdk_window_set_background): Constify.
	* gdk/win32/gdkwindow-win32.c (gdk_window_set_background): Constify.
	* gdk/linux-fb/gdkwindow-fb.c (gdk_window_set_background): Constify.

	* gdk/gdkpango.c (gdk_draw_layout_line_with_colors): Constify.
	(gdk_draw_layout_with_colors): Constify.

	* gdk/gdkpixmap.c (gdk_pixmap_colormap_new_from_pixbuf): Constify.
	(gdk_pixmap_colormap_create_from_xpm): Constify.
	(gdk_pixmap_create_from_xpm): Constify.
	(gdk_pixmap_colormap_create_from_xpm_d): Constify.
	(gdk_pixmap_create_from_xpm_d): Constify.

	* gtk/gtkcellview.c (gtk_cell_view_set_background_color): Constify.

	* gtk/gtkclist.c (gtk_clist_set_foreground): Constify.
	(gtk_clist_set_background): Constify.

	* gtk/gtkcolorbutton.c (gtk_color_button_new_with_color): Constify.
	(gtk_color_button_set_color): Constify.

	* gtk/gtkcolorsel.c (gtk_color_selection_set_current_color):
	Constify and add a check for color != NULL.
	(gtk_color_selection_get_current_color): Add a check for color != NULL.
	(gtk_color_selection_set_previous_color): Constify and add a check
	for color != NULL.
	(gtk_color_selection_get_previous_color): Add a check for color != NULL.

	* gtk/gtkctree.c (gtk_ctree_node_set_foreground): Constify.
	(gtk_ctree_node_set_background): Constify.

	* gtk/gtktext.c (gtk_text_insert): Constify.
	(insert_text_property): Constify.
	(text_properties_equal): Constify.
	(new_text_property): Constify.

	* gtk/gtkwidget.c (gtk_widget_modify_color_component): Constify.
	(gtk_widget_modify_fg): Constify.
	(gtk_widget_modify_bg): Constify.
	(gtk_widget_modify_text): Constify.
	(gtk_widget_modify_base): Constify.
2004-01-26 20:21:09 +00:00
Alexander Larsson
465d6e358c Fix typo
2004-01-22  Alexander Larsson  <alexl@redhat.com>

	* gdk/x11/gdkwindow-x11.c (WINDOW_IS_TOPLEVEL):
	Fix typo
2004-01-22 17:13:22 +00:00
13:49 Daniel Rogers
a5f2118818 Fix to allow reasonable pointer behavior in window mode when an extended
2003-12-31 13:49 Daniel Rogers <dsrogers@phasevelocity.org>

        * gdk/x11/gdkinput-x11.c: (gdk_input_translate_coordinates)

        Fix to allow reasonable pointer behavior in window mode when an
        extended input device reports an incorrect resolution of 0.
Fixes
        bug #123546
2003-12-31 22:00:21 +00:00
Matthias Clasen
8a15fe283b Add the missing _get_ to the name of the non-Xcursor version of this
Thu Dec 25 00:26:34 2003  Matthias Clasen  <maclas@gmx.de>

	* gdk/x11/gdkcursor-x11.c (gdk_display_get_default_cursor_size):
	Add the missing _get_ to the name of the non-Xcursor version of
	this function.  (noticed by Torsten Schoenfeld)
2003-12-24 23:28:14 +00:00
Soeren Sandmann
d2e744ca52 Set the right properties when the window becomes a toplevel. When a window
Sun Dec 21 17:34:22 2003  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gdk/x11/gdkwindow-x11.c (gdk_window_reparent): Set the right
	properties when the window becomes a toplevel. When a window that
	was previously a toplevel becomes a toplevel again, restore its
	window type. Also make sure the focus window is removed from the
	XID hash when it is destroyed. (#117579, reported by Morten
	Welinder, patch reviewed by Owen Taylor).
2003-12-21 16:37:43 +00:00
Matthias Clasen
fbb0ba1a3b Do not interpret distant clicks as double-clicks (#116541, Bernhard
Tue Dec 16 01:46:46 2003  Matthias Clasen  <maclas@gmx.de>

	Do not interpret distant clicks as double-clicks  (#116541,
	Bernhard Walle):

	* gdk/gdkdisplay.h (struct GdkDisplay): Add new fields
	double_click_distance, button_x and button_y.
	* gdk/gdkdisplay.c (gdk_display_init): Initialize the new fields.

	* gdk/gdkdisplay.h:
	* gdk/gdkevents.c (gdk_display_set_double_click_distance):
	New function to set the double click distance on a display.

	* gdk/gdkevents.c: Take double click distance into account
	when generating single, double or triple clicks.

	* gtk/gtksettings.c: Add new setting "gtk-double-click-distance".

	* gdk/x11/gdkevents-x11.c: Add the XSetting
	"Net/DoubleClickDistance" and map it to "gtk-double-click-distance".
2003-12-16 00:56:48 +00:00
Matthias Clasen
1014c413c5 Rename from _gdk_x11_register_event_type(), added API docs.
Sun Dec 14 01:28:23 2003  Matthias Clasen  <maclas@gmx.de>

	* gdk/x11/gdkprivate-x11.h:
	* gdk/x11/gdkx.h:
	* gdk/x11/gdkevents-x11.c (gdk_x11_register_standard_event_type):
	Rename from _gdk_x11_register_event_type(), added API docs.
	* gdk/x11/gdkinput-x11.c (_gdk_input_common_init):
	* gdk/x11/gdkimage-x11.c (_gdk_windowing_image_init): Adjust
	all callers.  (#121471, Bill Haneman)
2003-12-14 00:28:57 +00:00
Matthias Clasen
5d8f0a69c4 Documentation updates. 2003-12-11 23:52:59 +00:00
Matthias Clasen
5fb61f3075 Changes to allow "no input" windows (#64613):
Thu Dec 11 00:35:12 2003  Matthias Clasen  <maclas@gmx.de>

	Changes to allow "no input" windows (#64613):

	* gdk/gdkwindow.h (struct _GdkWindowObject): Add a new boolean
	field accept_focus.

	* gdk/gdkwindow.h (gdk_window_set_accept_focus): New function to
	set it.

	* gtk/gtkwindow.[hc]: Add a boolean property "accept_focus"
	and gtk_window_get_focus() and gtk_window_set_focus().

	* gdk/win32/gdkwindow-win32.c (gdk_window_new):
	* gdk/linux-fb/gdkwindow-fb.c (gdk_window_new):
	* gdk/x11/gdkwindow-x11.c (gdk_window_set_new):
	Initialize the accept_focus field to TRUE.

	* gdk/win32/gdkwindow-win32.c (gdk_window_set_accept_focus):
	* gdk/linux-fb/gdkwindow-fb.c (gdk_window_set_accept_focus):
	* gdk/x11/gdkwindow-x11.c (gdk_window_set_accept_focus):
	Implementations for the various backends. The Win32 and linux-fb
	implementations set the accept_focus field, but don't use it yet
	to actually implement noinput windows. The X implementation updates
	the WM_HINTS to select the globally active input model (see the
	ICCCM) if accept_focus is FALSE.

	* gdk/x11/gdkevents-x11.c (gdk_wm_protocols_filter): Ignore the
	WM_TAKE_FOCUS message if accept_focus is FALSE.
2003-12-10 23:58:23 +00:00
Mark McLoughlin
b79642263f s/gdk_spawn/gdk_spawn_on_screen/.
2003-12-10  Mark McLoughlin  <mark@skynet.ie>

        * gdk/linux-fb/gdkspawn-fb.c,
          gdk/win32/gdkspawn-win32.c,
          gdk/x11/gdkspawn-x11.c: (gdk_spawn_command_line_on_screen):
        s/gdk_spawn/gdk_spawn_on_screen/.
2003-12-10 14:17:07 +00:00
Mark McLoughlin
01fcbc199f Utility functions for multi-screen applications which need to ensure
2003-12-10  Mark McLoughlin  <mark@skynet.ie>

        Utility functions for multi-screen applications which need
        to ensure launched applications appear on a certain screen.
        See bug #95897.

        * gdk/gdkspawn.h: header for multi-screen launching
        support.

        * gdk/Makefile.am: install gdkspawn.h.

        * gdk/x11/Makefile.am:
        * gdk/x11/gdkspawn-x11.c:
        (gdk_spawn_make_environment_for_screen): private function
        to create an environment vector with DISPLAY set appropriately
        for the screen.
        (gdk_spawn_on_screen): multi-screen version of g_spawn_async().
        (gdk_spawn_on_screen_with_pipes): version of g_spawn_async_with_pipes().
        (gdk_spawn_command_line_on_screen): version of g_spawn_command_line_async().

        * gdk/linux-fb/Makefile.am,
          gdk/linux-fb/gdkspawn-fb.c: linux-fb impl.

        * gdk/win32/Makefile.am,
          gdk/win32/gdkspawn-win32.c: win32 impl.
2003-12-10 13:49:58 +00:00
Matthias Clasen
3f6441ea3a Improve the GDK API for dealing with group leaders (#119375):
Wed Dec 10 00:06:24 2003  Matthias Clasen  <maclas@gmx.de>

	Improve the GDK API for dealing with group leaders (#119375):

	* gdk/gdkwindow.h:
	* gdk/x11/gdkwindow-x11.c (gdk_window_get_group): New function to
	get the group leader of a toplevel window as a GdkWindow.

	* gdk/gdkdisplay.h:
	* gdk/x11/gdkdisplay-x11.c (gdk_display_get_default_group): New
	function to get the default group leader as a GdkWindow.

	* gdk/x11/gdkdisplay-x11.h (struct _GdkDisplayX11): Add a field for
	the GdkWindow of the default group leader.

	* gdk/x11/gdkdisplay-x11.c (gdk_display_open): Construct the GdkWindow
	for the default group leader.
2003-12-09 23:12:53 +00:00
Matthias Clasen
cc84041751 Make monitor boundaries visible in fake Xinerama mode.
Fri Nov 21 01:57:21 2003  Matthias Clasen  <maclas@gmx.de>

	* gdk/x11/gdkscreen-x11.c (init_xinerama_support): Make monitor
	boundaries visible in fake Xinerama mode.
2003-11-21 01:02:45 +00:00
Matthias Clasen
b31a2ece5c Introduce a GDK_DEBUG_XINERAMA debug flag, and make it trigger a fake 2x2
Mon Nov  3 20:56:28 2003  Matthias Clasen  <maclas@gmx.de>

	* gdk/gdk.c:
	* gdk/gdkinternals.h:
	* gdk/x11/gdkscreen-x11.c (init_xinerama_support): Introduce a
	GDK_DEBUG_XINERAMA debug flag, and make it trigger a fake 2x2
	Xinerama mode when no actual Xinerama setup is found.
2003-11-03 20:10:34 +00:00
Owen Taylor
6773cabf56 Move the call to gdk_error_trap_pop() to the right place, fixing a problem
Wed Oct 29 15:01:32 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkimage-x11.c (_gdk_x11_copy_to_image): Move
        the call to gdk_error_trap_pop() to the right place,
        fixing a problem where we'd pop() too many times
        when bailing out. (#123302, Thomas Leonard)
2003-10-29 20:05:40 +00:00
Manish Singh
afad91fe8d #include <X11/extensions/Xrandr.h> if we have RandR support, for
Mon Oct 27 15:47:58 2003  Manish Singh  <yosh@gimp.org>

        * gdk/x11/gdkscreen-x11.c: #include <X11/extensions/Xrandr.h> if
        we have RandR support, for XRRUpdateConfiguration declaration.

        * gtk/gtkfilefilter.c: #include "gtkprivate.h" for _gtk_fnmatch
        declaration.

        * gtk/gtkuimanager.c (gtk_ui_manager_add_ui_from_file): Make
        length a gsize variable, since that's what g_file_get_contents()
        expects.
2003-10-27 23:50:34 +00:00
Matthias Clasen
76d7a19436 Actually assign the new leader. (#125168, Mariano Suarez-Alvarez)
Thu Oct 23 20:47:44 2003  Matthias Clasen  <maclas@gmx.de>

	* gdk/x11/gdkwindow-x11.c (gdk_window_set_group): Actually
	assign the new leader.  (#125168, Mariano Suarez-Alvarez)
2003-10-23 18:50:40 +00:00
Matthias Clasen
2baa63a100 Make it work as documented when pixmap or mask is NULL. (#124081)
Mon Oct 13 20:58:07 2003  Matthias Clasen  <maclas@gmx.de>

	* gdk/x11/gdkwindow-x11.c (gdk_window_set_icon): Make it work
	as documented when pixmap or mask is NULL.  (#124081)
2003-10-13 19:00:19 +00:00
Kristian Rietveld
9538b6e57c big patch from Kjartan Maraas to fix numerous typos.
Wed Sep  3 21:38:26 2003  Kristian Rietveld  <kris@gtk.org>

	* gdk/Makefile.am, gdk/linux-fb/gdkfbmanager.c, gdk/x11/gdkcolor-x11.c,
	gdk-pixbuf/io-gif.c, gtk/Makefile.am, gtk/gtkcalendar.c,
	gtk/gtkclist.c, gtk/gtkctree.c, gtk/gtkdnd.c, gtk/gtkentry.c,
	gtk/gtkhandlebox.c, gtk/gtkitemfactory.c, gtk/gtkmenu.c,
	gtk/gtknotebook.c, gtk/gtkrange.c, gtk/gtkrc.h, gtk/gtktree.c,
	gtk/gtktypeutils.h: big patch from Kjartan Maraas
	to fix numerous typos.
2003-09-03 19:56:36 +00:00
Matthias Clasen
ce940e61a5 Improve PointerHint docs. Explain is_hint field in GdkEventMotion.
2003-08-28  Matthias Clasen  <maclas@gmx.de>

	* gdk/tmpl/events.sgml: Improve PointerHint docs.
	* gdk/tmpl/event_structs.sgml: Explain is_hint field in GdkEventMotion.
	(#120542)
	* gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state): Markup
	fix in the docs.
2003-08-27 22:59:47 +00:00
Owen Taylor
d8c62d66c2 Fix variable declaration not at start of block. (#120371, Damien Carbery)
Tue Aug 26 09:57:38 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkkeys-x11.c (update_keymaps): Fix variable
        declaration not at start of block. (#120371, Damien Carbery)
2003-08-26 14:04:52 +00:00
Owen Taylor
378005c65e Fix up CapsLock and NumLock handling for non-XKB. Add a special case hack
Mon Aug 25 16:15:41 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkkeys-x11.c: Fix up CapsLock and
        NumLock handling for non-XKB. Add a special case
        hack for NumLock on Sun servers. (Patch from
        Robert Basch, #115819)
2003-08-25 20:22:39 +00:00
Owen Taylor
c7c5a7ddaa Change the interpretation of consumed_modifiers so that it contains: -
Thu Aug 21 15:17:42 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkkeys-x11.c: Change the interpretation
        of consumed_modifiers so that it contains:
         - Modifiers combinations actually found in
           state.
         - Single modifier modifier combinations.
        But not multi-modifier combinations that aren't
        in event->state. Document. (#100439)
2003-08-21 19:23:39 +00:00
Owen Taylor
ccfd33c5a5 Don't use impl->position_info.clip_rect for toplevels. (#107068, reported
Tue Aug 19 13:58:50 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkgeometry-x11.c (gdk_window_scroll):
        Don't use impl->position_info.clip_rect for toplevels.
        (#107068, reported by Thomas Mirlacher)
2003-08-19 18:32:12 +00:00
Owen Taylor
df58bb7f8a Add a fallback for unaligned source data for FORMAT_ARGB_MASK. (#117217)
Mon Aug 18 11:48:51 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkdrawable-x11.c (convert_to_format):
        Add a fallback for unaligned source data for
        FORMAT_ARGB_MASK. (#117217)
2003-08-18 16:02:46 +00:00
Owen Taylor
e44f6a8a00 Fixes for X/Cygwin builds of GTK+ (#107623, Masahiro Sakai):
Fri Aug 15 12:34:04 2003  Owen Taylor  <otaylor@redhat.com>

        Fixes for X/Cygwin builds of GTK+ (#107623, Masahiro Sakai):

        * configure.in (GDK_DEP_LIBS_FOR_X): Make sure that
        we link libgtk against X explicitely, since we
        make GTK+ calls for plug/socket.

        * gtk/queryimmodules.c: Use USE_LA_MODULES and
        G_MODULE_SUFFIX here.

        * gdk/x11/gdkdrawable-x11.c (gdk_x11_draw_image): Protect
        XShmPutImage with #ifdef USE_SHM.
2003-08-15 16:50:57 +00:00
Owen Taylor
35f964d54e Add missing break statements (#119494, Soeren Sandmann)
Mon Aug 11 12:07:14 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkevents-x11.c (get_real_window): Add missing
        break statements (#119494, Soeren Sandmann)
2003-08-11 16:08:27 +00:00
Matthias Clasen
424433f1a4 Add support for EWMH "Above" and "Below" window states. (105100, Manuel Clos) 2003-08-10 23:37:37 +00:00
Matthias Clasen
9bfaab6e77 Reset the toplevel->have_* flags before iterating over the _NET_WM_STATE
2003-08-07  Matthias Clasen  <maclas@gmx.de>

	* gdk/x11/gdkevents-x11.c (gdk_check_wm_state_changed): Reset the toplevel->have_* flags before
	iterating over the _NET_WM_STATE atoms.  (#119217)
2003-08-07 21:11:35 +00:00
Owen Taylor
72f1116387 Fix problem where use_xshm was getting set wrong if MIT_SHM wasn't found.
Mon Aug  4 14:53:46 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkimage-x11.c (_gdk_windowing_image_init):
        Fix problem where use_xshm was getting set wrong if
        MIT_SHM wasn't found. (George Lebel)
2003-08-04 19:02:36 +00:00
Matthias Clasen
ee18c33dc9 Improve wording of the docs, avoid the term "virtual screen". (#119030,
2003-08-03  Matthias Clasen  <maclas@gmx.de>

	* gdk/x11/gdkscreen-x11.c (gdk_screen_get_n_monitors):
	(gdk_screen_get_monitor_geometry): Improve wording of the docs, avoid the
	term "virtual screen".  (#119030, Tor Lillquist)
2003-08-03 20:50:58 +00:00
Matthias Clasen
0df78ed774 Use g_setenv() instead of putenv(). 2003-08-02 21:35:44 +00:00
Owen Taylor
88c1c94651 Requires glib-2.3.0, pango-1.2.0.
Sat Aug  2 12:53:16 2003  Owen Taylor  <otaylor@redhat.com>

        * configure.in: Requires glib-2.3.0, pango-1.2.0.

        * configure.in: Require Xft version 2,
        remove code for handling older versions of pango and Xft.
        Many miscellaneous improvements to X checks

        * acinclude.m4: Add GTK_ADD_LIB() macro for adding
        a library to a variable, avoiding dups.

        * gdk/x11/gdkfont-x11.c (gdk_font_from_description_for_display):
        Always load "fixed"

        * gdk/x11/gdk*-x11.[ch]: Remove support for Xft1 and
        for pangox.
2003-08-02 17:50:09 +00:00
Owen Taylor
10a3ddf6cc If the check for missing depths, try actually creating pixmaps of the
Fri Aug  1 16:30:13 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkdrawable-x11.c (_gdk_x11_have_render):
        If the check for missing depths, try actually creating pixmaps
        of the depths to deal with Xinerama not reporting
        all the depths it should. (#115822)
2003-08-01 20:37:56 +00:00
Tor Lillqvist
63f745738d gdk/win32/gdkprivate-win32.h New flags _gdk_input_locale_is_ime and
2003-07-25  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkprivate-win32.h
	* gdk/win32/gdkglobals-win32.c: New flags _gdk_input_locale_is_ime
	and _gdk_keyboard_has_altgr.

	* gdk/win32/gdkevents-win32.c: Lots of changes. Most important
	ones detailled here.

	Code that has been ifdeffed out for a long time removed. Remove
	some really old doc comments that were left behind for some public
	functions, the official ones are in the X11 backend anyway. Change
	GDK_WINDOW_OBJECT() calls to GdkWindowObject casts. Reformat
	multi-line boolean expressions to have the operators at ends of
	lines.

	As mouse capture with SetCapture() indeed seems to work OK, no
	need to have the correspoinding macro USE_SETCAPTURE and ifdefs.

	Ifdef out the gdk-ping-msg stuff. I don't remember why it was
	needed at some time, and things seem to work fine now without
	(knock on wood).

	Ifdef out the search for some Latin locale keyboard layout being
	loaded. Not used currently, but might be needed after all, if we
	decide that we want to be able to generate ASCII control character
	events with a non-Latin keyboard.

	(assign_object): New helper function, handles the g_object_ref()
	and unref() calls when assigning GObject pointers.

	(generate_crossing_events): Also generate the GDK_NOTIFY_INTERIOR
	enter event when the pointer has moved to an ancestor window. Was
	left out by mistake.

	(gdk_window_is_ancestor): Renamed from gdk_window_is_child().

	(gdk_pointer_grab, gdk_pointer_ungrab): Implement the confine_to
	functionality, using ClipCursor().

	(find_window_for_mouse_event): Splice part of code into new
	function find_real_window_for_grabbed_mouse_event().

	(fixup_event, append_event, apply_filters): New functions, code
	refactored out from elsewhere.

	(synthesize_enter_or_leave_event, synthesize_leave_event,
	synthesize_enter_event,
	synthesize_leave_events,synthesize_enter_events): Also take a
	GdkCrossingMode parameter, in preparation to generating
	GDK_CROSSING_GRAB and GDK_CROSSING_UNGRAB events.

	(fixup_event, append_event, fill_key_event_string): New functions,
	code refactoring.

	(vk_from_char, build_keypress_event, build_keyrelease_event):
	Removed as part of dropping WM_CHAR handling.

	(build_key_event_state,gdk_event_translate): Call
	GetKeyboardState(), once, for each keyboard message, instead of
	several calls to GetKeyState() here and there.

	(gdk_event_translate): Fix bugs #104516, #104662, #115902. While
	at it, do some major refactoring, and some fixes for potential
	problems noticed while going through the code.

	Don't handle WM_CHAR at all. Only handle WM_KEYDOWN and
	WM_KEYUP. Don't need the state variables related to whether to
	wait for WM_CHAR or not, and whether the current key is
	AltGr. Remove lots of complexity. Thus don't need the
	use_ime_composition flag.

	Not handling WM_CHAR means dead key handling will have to be taken
	care of by GTK, but that seems to work fine, so no worry.

	Another side-effect is that Alt+keypad digits don't work any
	longer, but it's better to learn to use GTK's ISO14755 support is
	anyway.

	Be more careful in checking whether AltGr is involved. Only
	attempt to handle it if the keyboard actually has it. And
	explicitly check for *left* Control plus *right* Alt being
	pressed. Still, allow (left) Alt and/or (right) Control with AltGr
	chars.

	Handle keys using similar code as in the X11 backend. As we have
	built a keymap in gdkkeys-win32.c anyway, use it by calling
	gdk_keymap_translate_keyboard_state() to look up the keysym from
	the virtual key code and keyboard state. Build the key event
	string in exactly the same way as the X11 backend.

	If an IME is being used, don't generate GDK events for keys
	between receiving WM_IME_STARTCOMPOSITION and
	WM_IME_ENDCOMPOSITION, as those keys are for the IME.

	For WM_IME_COMPOSITION, handle all the Unicode chars returned from
	the IME, not just the first one.

	gdk_event_translate() is still quite complex, could split the
	message handler cases out into separate functions.

	On mouse events, when the mouse is grabbed, use
	find_real_window_for_grabbed_mouse_event() in order to be able to
	generate correct crossing events.

	No longer take a pre-allocated GdkEvent as parameter. Instead,
	allocate events as needed and append them to the queue. (This is
	different from how gdk_event_translate() in the X11 backend
	works.) This change made the code much clearer, especially in the
	cases where we have to generate several GDK events for one Windows
	message.  Return FALSE if DefWindowProc() should be called, TRUE
	if not. If DefWindowProc() should not be called, also return the
	value to be returned from the window procedure.

	(Previously, the interaction with gdk_event_translate()'s caller
	was much more complex, when we had to indicate whether the
	already-queued event should be left in the queue or removed, and
	in addition also had to indicate whether to call DefWindowProc()
	or not, and what value to return from the window procedure if
	not.)

	Don't use a separate "private" variable required to be pointing to
	the GdkWindowObject of the "window" variable at all times. Just
	use casts, even if looks a bit uglier.

	Notice destroyed windows as early as possible, and break out of
	the messsage switch.

	Use _gdk_pointer_root as current_window when the pointer is
	outside GDK's top-level windows.

	On WM_INPUTLANGCHANGE, set _gdk_input_locale_is_ime as
	appropriate, based on ImmIsIME().

	(gdk_event_translate, gdk_event_send_client_message_for_display,
	gdk_screen_broadcast_client_message): Implement client messages.
	Use a registered Windows message to pass GDK client messages. Note
	that the amount of user data is restricted to four bytes, as it is
	carried in the LPARAM. (The WPARAM is used for the message type
	"atom".)

	(real_window_procedure): Adapt for new gdk_event_translate()
	interface.

	* gdk/win32/gdkmain-win32.c (_gdk_windowing_init): Set
	_gdk_input_locale_is_ime initially.

	* gdk/win32/gdkwindow-win32.c: Use g_object_ref()/unref() instead
	of g_colormap_ref()/unref().

	(gdk_window_new): Made code a bit more like the X11 one, pretend
	to handle screens (although we just have one for now).

	* gdk/x11/gdkevents-x11.c
	(gdk_event_send_client_message_for_display,
	gdk_screen_broadcast_client_message): Document the user data
	limitation on Win32.

	* gdk/win32/gdkevents-win32.c (print_event): More complete enter
	and leave notify detail output.

	* gdk/win32/gdkkeys-win32.c (update_keymap): Make dead keys
	visible to GDK and GTK. Store the corresponding GDK_dead_* keysym
	for those, so that the GtkIMContextCimple compose tables will
	work. Deduce if the keyboard layout has the AltGr key, and set the
	above flag accordingly.
2003-07-26 01:54:59 +00:00
Jody Goldberg
b42280f708 fix cut-n-paste-o
2003-07-16  Jody Goldberg <jody@gnome.org>

	* gdk/x11/gdkwindow-x11.c (gdk_window_focus) : fix cut-n-paste-o
2003-07-18 17:42:17 +00:00
Matthias Clasen
a0829aa499 API doc updates. 2003-07-14 22:13:33 +00:00
Owen Taylor
50da0ae808 gdk/x11/gdkevents-x11.c (get_real_window) gdk/x11/gdkinput-x11.c
Tue Jul  8 20:11:04 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkevents-x11.c (get_real_window)
        gdk/x11/gdkinput-x11.c (_gdk_input_common_init)
        gdk/x11/gdkimage-x11.c (_gdk_windowing_image_init)
        gdk/x11/gdkprivate-x11.h (_gdk_windowing_image_init)
        Don't assume that all events start with XEventAny - Xkb events
        don't! (#105745). So, only do that for core events, and for
        non-core events, add a system for registering event types
        that start with XEventAny.

        * gdk/x11/gdkevents-x11.c (gdk_event_translate):
        Check to see if the result of gdk_window_lookup_for_display()
        is actually a window.
2003-07-11 19:57:01 +00:00
Morten Welinder
469f6e87a5 Fix memory access error. (#69436)
2003-07-11  Morten Welinder  <terra@gnome.org>

	* gdk/x11/gdkcursor-x11.c (gdk_cursor_new_from_pixbuf): Fix memory
	access error.  (#69436)
2003-07-11 17:32:49 +00:00
Owen Taylor
8500d9458e Change _gdk_x11_send_xevent_async() to
Tue Jul  8 17:36:21 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkasync.[ch] gdk/gdkdnd-x11.c:
        Change _gdk_x11_send_xevent_async() to
        _gdk_x11_send_client_message_async() avoid using Xlib
        internals that are different on Solaris.
        (#116917, Morten Welinder)
2003-07-08 22:27:47 +00:00
Owen Taylor
ba999da1d8 Lookup all the atoms in the target list at once.
Sat Jul  5 09:55:38 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkdnd-x11.c (precache_target_list): Lookup
        all the atoms in the target list at once.

        * gdk/x11/gdkdnd-x11.c (gdk_drag_get_protocol_for_display):
        Local drag short-circuit.

        * gdk/x11/gdkdnd-x11.c (gdk_drag_motion): For the
        local case, poke the actions in directly instead of
        going through xdnd_set_actions.

        * gdk/x11/gdkdnd-x11.c (xdnd_read_actions): Short-circuit
        the local case.

        * gdk/x11/gdkdnd-x11.c (xdnd_manage_source_filter): Don't
        XSelectInput()/add a filter if the drag is local.

        * gdk/x11/gdkdnd-x11.c (gdk_drag_get_selection):
        Simplify handling of "XdndSelection".

        * gdk/x11/gdkevents-x11.c (gdk_event_send_client_message_to_all_recurse): Somehow,
        a WM_STATE => _NET_WM_STATE change hand been made here.

        * gdk/x11/gdkproperty-x11.c (_gdk_x11_precache_atoms): Free
        xatom_names, not atom_names.

        * tests/testdnd.c (target_drag_motion): Make the trashcan
        open again. (Got lost in deprecation cleanup.)
2003-07-05 15:02:35 +00:00
Owen Taylor
e5561940f2 Move the grabs up earlier, so we don't get a big pile of uncompressed
Sat Jul  5 00:49:32 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkdnd.c (gtk_drag_begin): Move the grabs up
        earlier, so we don't get a big pile of uncompressed
        motion events before the grab takes effect.

        * gtk/gtkdnd.c (gtk_drag_update_icon): Call
        gdk_window_process_all_updates() so that the area
        we are dragging over gets a change to redraw.

        * gtk/gtkdnd.c (_gtk_drag_dest_handle_event): Use
        gdk_window_get_position(), not gdk_window_get_origin().

        * gdk/x11/gdkwindow-x11.[ch] (gdk_window_have_shape_ext)
        gdkdisplay-x11.h: use XShapeQueryExtension to
        avoid duplicate XQueryExtension when we actually
        use it. Remove unnecessary caching in GdkDisplayX11.
2003-07-05 05:27:11 +00:00
Owen Taylor
58a7f9f72a Function to get a range of information about all the children of a window
Fri Jul  4 23:49:22 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkasync.[ch] (_gdk_x11_get_window_child_info):
        Function to get a range of information about all the
        children of a window in a single pass.

        * gdk/x11/gdkdnd-x11.c (get_client_window_at_coords_recurse)
        gdk/x11/gdkdnd-x11.c (gdk_window_cache_new): Use
        _gdk_x11_get_window_child_info() to greatly reduce
        the number of roundtrips.
2003-07-05 04:22:06 +00:00
Owen Taylor
60149b3275 Add a function to XSendEvent() and call a calback on failure/success.
Fri Jul  4 22:57:18 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkasync.[ch] (_gdk_send_xevent_async): Add
        a function to XSendEvent() and call a calback on
        failure/success.

        * gdk/x11/gdkdnd-x11.c (xdnd_send_xevent): Short-circuit
        messages to the same process, use _gdk_send_xevent_async().
2003-07-05 03:02:21 +00:00
Owen Taylor
8625065817 Split toplevel-specific pieces of GdkWindowImplX11 into a separate
Fri Jul  4 22:26:27 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkwindow-x11.[ch] gdkevents-x11.c: Split
        toplevel-specific pieces of GdkWindowImplX11 into
        a separate GdkToplevelX11 structure.
2003-07-05 02:34:52 +00:00
Owen Taylor
bce0622bd6 Fix some leftover fields.
Fri Jul  4 22:05:09 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkasync.c (struct _SetInputFocusState): Fix
        some leftover fields.
2003-07-05 02:06:04 +00:00
Owen Taylor
9bedbf662d Use asynchronously _gdk_x11_set_input_focus_safe to avoid having to trap
Fri Jul  4 15:57:52 2003  Owen Taylor  <otaylor@redhat.com>

	* gdk/x11/gdkevents-x11.c (gdk_wm_protocols_filter):
	Use asynchronously _gdk_x11_set_input_focus_safe
	to avoid having to trap errors and XSync().

	* gdk/x11/gdkwindow-x11.c (gdk_window_focus): Use
	_gdk_x11_set_input_focus_safe() here as well.

	* gdk/x11/gdkevents-x11.c (gdk_check_wm_state_changed):
	Rework handling of property notifies on _NET_WM_STATE
	so that we ignore _NET_WM_DESKTOP notifies unless we
	really care.

	* gdk/x11/gdkimage-x11.c (gdk_image_check_xshm): Use
	XShmQueryExtension() rather than XQueryExtension() to
	avoid extra rountrip.

	* gdk/x11/gdkwindow-x11.c (_gdk_windowing_window_init):
	Remove unused call to XGetWindowAttributes()

	* gdk/x11/gdkdisplay-x11.c (gdk_display_open): Remove
	unused call to XGetKeyboardControl().

	* gdk/x11/gdkdisplay-x11.c gdk/gdk.def (gdk_display_flush):
	Add (#99571)

	* gdk/win32/gdkevents-win32.c gdk/linux-fb/gdkevents-fb.c
	No-op implementations of gdk_display_flush().

	* gdk/gdkwindow.c (gdk_window_process_all_updates): Use
	gdk_display_flush() rather than gdk_flush() to avoid
	XSync().

	* gdk/x11/gdkwindow-x11.c (update_wm_hints)
	gdk/x11/gdkwindow-x11.h: Centralize all handling of WM_HINTS here
	so that we don't have to get the property back from the server.

	* gdk/x11/gdkwindow-x11.c (show_window_internal): Store
	the serial of when we map a toplevel to allow optimizing
	out notifies on _NET_WM_STATE/_NET_WM_DESKTOP.

	* gdk/x11/gdkevents-x11.c (gdk_event_translate): Don't
	XTranslateCoordinates() for override-redirect windows.

Fri Jul  4 15:59:27 2003  Owen Taylor  <otaylor@redhat.com>

	* gdk/x11/gdkwindow-x11.c (gdk_window_set_group): Remove comment
	about setting window group after the window is mapped from docs
	- nothing the ICCCM forbids that.

	* gdk/x11/gdkcursor-x11.c (gdk_display_get_maximal_cursor_size):
	Fix g_return_val_if_fail() in void return function.

	* configure.in: Fix misplaced comma that was resulting
	in XShm always being disabled.
2003-07-05 01:54:05 +00:00
Owen Taylor
a72aed4ea2 Implement a loader for named themed icon based on from gnome-desktop
Wed Jul  2 18:00:56 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkicontheme.[ch]: Implement a loader for
        named themed icon based on from gnome-desktop library
        by Alex Larsson.

        * gtk/gtkiconthemeparser.[ch]: .ini file parsing code
        from gnome-desktop.

        * gtk/gtkiconfactory.[ch]: Add
        gtk_icon_source_set/get_icon_name() to allow stock icons
        to be based off of named theme icons.

        * gtk/gtkiconfactory.c: Rework sources so that the source
        is *either* a pixbuf, or a filename, or an icon name,
        instead of the pixbuf/filename mix it was before. Put a
        workaround for get_pixbuf() so that it can return the
        filename pixbuf, e.g, for render_icon().

        * gtk/gtkiconfactory.c: Make the default setup use
        themed icons, and add builtin icons to the default
        icon theme for all the standard pixbufs, so we
        don't rely on actually having an icon theme on disk.

        * gtk/gtkrc.c: Add support for @"icon-name" to specify
        a themed icon for a stock icon source.

        * tests/Makefile.am test/testicontheme.c: Add a test
        program from gnome-desktop.

        * gdk/x11/gdkevents-x11.c gtk/gtksettings.c: Add
        Net/IconThemeName / gtk-icon-theme-name setting.

        * gtk/gtkiconfactory.c (ensure_cache_up_to_date): Actually
        update the icon cache serial so we don't continually

        * gtk/gtkwidget.c: Fix a couple of references in doc comments
        to ::direction_set that should have been to ::direction-changed
2003-07-02 22:44:09 +00:00
Matthias Clasen
eb7135adb5 Check for Xcursor.
2003-07-01  Matthias Clasen  <maclas@gmx.de>

	* configure.in: Check for Xcursor.

	* gdk/x11/gdkcursor-x11.c:
	* gdk/gdkdisplay.h:
	* gdk/gdkcursor.h: RGBA cursor support based on Xcursor. New functions:
	gdk_cursor_new_from_pixbuf(), gdk_display_supports_cursor_alpha(),
	gdk_display_supports_cursor_color(), gdk_display_get_default_cursor_size() and
	gdk_display_get_maximal_cursor_size().  (#69436)
2003-06-30 22:30:54 +00:00
Owen Taylor
85d8c33706 Use application/x-rootwindow-drop for root window drops. (#108670, Alex
Sun Jun  8 22:03:09 2003  Owen Taylor  <otaylor@redhat.com>

        * tests/testdnd.c: Use application/x-rootwindow-drop for
        root window drops. (#108670, Alex Larsson)

        * gdk/x11/gdkdnd-x11.c (gdk_drag_motion) gtk/gtkdnd.c (gtk_drag_drop):
        Accept either application/x-rootwin-drop (what GTK+ has always used)
        or application/x-rootwindow-drop (what the XDND standard specifies).
2003-06-09 02:13:42 +00:00
Owen Taylor
76fc08a3fc Keep track of when we have a clip mask set for the GC, and when we unset
Wed Jun  4 19:24:28 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkgc-x11.c gdk/x11/gdkprivate-x11.h: Keep
        track of when we have a clip mask set for the GC,
        and when we unset it, or switch to a clip region,
        immediately call XSetClipMask (..., None) to avoid
        Xlib caching stale data. (#111806)

        * gtk/gtktextdisplay.c: Don't set a clip mask
        when drawing alpha pixmaps; it isn't necessary any more.
        (#111806)
2003-06-04 23:26:52 +00:00
Owen Taylor
eb6debd4e0 Don't respond to pings on a root window; prevents infinite loops if we are
Tue Jun  3 18:32:30 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkevents-x11.c (gdk_wm_protocols_filter): Don't
        respond to pings on a root window; prevents infinite
        loops if we are selecting for SubstructureNotify on the
        root window. (#111945, Sergey V. Udaltsov)
2003-06-03 22:43:15 +00:00
Owen Taylor
794a3a9fbc Remove bad optimization for src_rowstride == dest_stride. (Didn't consider
Tue Jun  3 15:05:47 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkdrawable-x11.c (convert_to_format): Remove
        bad optimization for src_rowstride == dest_stride.
        (Didn't consider the case where we were copying only
        partial widths of a wider source buffer)
        (#113034, reported by Hans Petter Jansson)
2003-06-03 19:12:37 +00:00
Michael Natterer
ace98abaaa reenabled button_release events for xinput devices. (#113948)
2003-06-03  Michael Natterer  <mitch@gimp.org>

	* gdk/x11/gdkinput-x11.c (_gdk_input_common_find_events):
	reenabled button_release events for xinput devices. (#113948)
2003-06-03 18:47:20 +00:00
Matthias Clasen
83c626bbe0 Remove dubious bitfields of unspecified signedness. (#112919, Morten
2003-05-27  Matthias Clasen  <maclas@gmx.de>

	* io-wbmp.c: Remove dubious bitfields of
	unspecified signedness.  (#112919, Morten Welinder)gdk-p

	* gdk-pixdata.c (gdk_pixdata_to_csource): Replace all occurances
	of g_string_new ("") by g_string_new (NULL). (#106975, Morten Welinder)

	* gtk/gtkwindow-decorate.c:
	* gtk/gtktreeprivate.h:
	* gtk/gtkdnd.c:
	* gdk/win32/gdkwindow-win32.h:
	* gdk/linux-fb/gdkprivate-fb.h:
	* gdk/linux-fb/gdkkeyboard-fb.c: Remove dubious bitfields of
	unspecified signedness.  (#112919, Morten Welinder)

	* gtk/queryimmodules.c (escape_string):
	* gtk/gtktextbtree.c (_gtk_text_btree_get_text):
	* gtk/gtksettings.c (_gtk_settings_parse_convert):
	* gtk/gtkrc.c (gtk_rc_parse_assignment):
	* gtk/gtkinputdialog.c (gtk_input_dialog_set_key):
	* gdk/x11/gdkdisplay-x11.c (escape_for_xmessage): Replace all
	occurances of g_string_new ("") by g_string_new (NULL). (#106975,
	Morten Welinder)
2003-05-27 21:21:00 +00:00
Matthias Clasen
81c9d969d3 Use XftDrawSetClipRectangles(), since we're inside HAVE_XFT2 anyway.
2003-05-22  Matthias Clasen  <maclas@gmx.de>

	* gdk/x11/gdkdrawable-x11.c (gdk_x11_drawable_update_xft_clip):
	Use XftDrawSetClipRectangles(), since we're inside HAVE_XFT2
	anyway.  (#113476)
2003-05-21 22:37:35 +00:00
Owen Taylor
ef6053684b Comprehensively zero all unused parts of client messages (Mainly Motif DND
Tue May 20 15:09:29 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkdnd-x11.c gdk/x11/gdkwindow-x11.c: Comprehensively
        zero all unused parts of client messages (Mainly Motif DND
        and EWMH). Also, fix a couple places where we were putting
        contents into Motif DND messages that didn't belong.
        (#113361, EWMH problem reported by Lubos Lunak)

        * gtk/gtkselection.c (_gtk_selection_request): Handle the
        case where the property type for the multiple atoms is
        ATOM_PAIR by doing the conversions ourselve. This is
        needed for Xt inter-operation.
2003-05-20 21:01:08 +00:00
Owen Taylor
d4d077677c Remove unecessary g_return_if_fail(). (#105500, Morten Welinder.)
Wed May 14 16:00:51 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkgc-x11.c: Remove unecessary g_return_if_fail().
        (#105500, Morten Welinder.)
2003-05-14 20:02:25 +00:00
Owen Taylor
629a0e1424 Patch from James Henstridge to update to automake-1.7 (#109542)
Tue May  6 16:50:52 2003  Owen Taylor  <otaylor@redhat.com>

        Patch from James Henstridge to update to automake-1.7
        (#109542)

        * autogen.sh: update to call newer tools.

        * configure.in: various updates, to use M4 macros to put
        variables that change each release at the top.
        Use AC_HELP_STRING to format help strings.
        Use AC_CONFIG_COMMANDS to generate gdkconfig.h.

        * Makefile.am: require Automake 1.7.  Remove gdk-2.0.pc and
        gtk+-2.0.pc on uninstall.  Pass --enable-gtk-doc to configure
        during distcheck.

        * docs/reference/*/Makefile.am: simplify to use the gtk-doc.make
        makefile fragment.

        * */Makefile.am: don't use STRIP_BEGIN/STRIP_END.
        Use BUILT_SOURCES where appropriate.
        Build generated files in builddir rather than srcdir.
        Fix uninstall and distclean targets to satisfy distcheck.

        ===

        * gdk/*/Makefile.am: Remove the hacks to get gdkenumtypes.h
        built first, since we are now using BUILT_SOURCES.

        * gdk/Makefile.am: Remove an outdated comment about gdk_headers.

        * demos/gtk-demo/Makefile.am: Fix srcdir != buildd problem
        with geninclude.pl.

        * configure.in: Update versions to 2.3.0.
2003-05-06 21:55:41 +00:00
Owen Taylor
355a5ee8ab Patch from Alex Larsson fixing problem with restacking during DND.
Mon Apr 21 18:13:46 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkdnd-x11.c (gdk_window_cache_filter): Patch
        from Alex Larsson fixing problem with restacking during
        DND. (#108671)
2003-04-21 22:18:05 +00:00
Owen Taylor
dd6426b51e Calling XFlush() after ungrabbing, to avoid problems if the app
Mon Apr 21 15:07:29 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkdisplay-x11.c (gdk_display_keyboard/pointer_ungrab):
        Calling XFlush() after ungrabbing, to avoid problems if
        the app subsequently blocks on a long-running operation.
        (#106520, reported by Rajkumar Siva)
2003-04-21 19:11:45 +00:00
Owen Taylor
feff41c77b Add SKIP_TASKBAR/SKIP_PAGER to set of properties we might set on map.
Fri Apr 18 17:42:45 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkwindow-x11.c (set_initial_hints): Add
        SKIP_TASKBAR/SKIP_PAGER to set of properties we
        might set on map. (#110019, problem reported
        by Loban Rahman)
2003-04-21 19:03:15 +00:00
Owen Taylor
89b2a072ff Fix pointer arithmetic on 'void *'. (#108322)
Fri Apr 18 16:57:44 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkdrawable-x11.c (draw_with_images/pixmaps):
        Fix pointer arithmetic on 'void *'. (#108322)
2003-04-18 20:59:49 +00:00
Owen Taylor
ac2ef34988 Check for XAddConnectionWatch()/X11R6, and if found, disable XIM and use
Fri Apr 18 16:31:49 2003  Owen Taylor  <otaylor@redhat.com>

        * configure.in gdk/x11/gdkdisplay-x11.c modules/input/Makefile.am:
        Check for XAddConnectionWatch()/X11R6, and if found, disable XIM and
        use of XAddConnectionWatch. Remove --enable-xim config option.
        Should fix building on X11R6 (#110523, Albert Chin
2003-04-18 20:53:37 +00:00
Owen Taylor
dcaf1b80e2 Patch from Morten Welinder to catch Sun servers with a broken
Fri Apr 18 15:56:46 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkdisplay-x11.[ch] gdk/x11/gdkdrawable-x11.[ch]:
        Patch from Morten Welinder to catch Sun servers with a
        broken implementation of the RENDER extension. (#108309)
2003-04-18 20:21:44 +00:00
Owen Taylor
5e5dd39adf Use gdk_free_compound_text(), not g_free(). (#107643, Michael Zucchi)
Fri Apr 18 15:30:38 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkwindow-x11.c (set_text_property): Use
        gdk_free_compound_text(), not g_free(). (#107643,
        Michael Zucchi)
2003-04-18 19:33:37 +00:00
Owen Taylor
f964a0e1f8 Fix wrong use of base_finalize. (#105126, Sven Neumann)
Fri Apr 18 15:11:50 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkdisplay-x11.c (_gdk_display_x11_get_type)
        gdk/x11/gdkscreen-x11.c (_gdk_screen_x11_get_type): Fix
        wrong use of base_finalize. (#105126, Sven Neumann)
2003-04-18 19:18:27 +00:00
Owen Taylor
0e815d2ff0 You don't get a XkbMapNotify event if you get a XkbNewKeyboardNotify
Fri Apr 18 14:15:09 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkdisplay-x11.c (gdk_display_open):
        * gdk/x11/gdkevents-x11.c (gdk_event_translate): You
        don't get a XkbMapNotify event if you get a XkbNewKeyboardNotify
        event, so select for both. (#108406, Egmont Koblinger)
2003-04-18 18:51:20 +00:00
Owen Taylor
1926dbc1f6 Flush after ungrabbing the server.
Mon Apr  7 19:43:15 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkdisplay-x11.c (gdk_x11_display_ungrab): Flush
        after ungrabbing the server.

        * gdk/x11/gdkimage-x11.c: Remove some no-longer-needed
        calls to XFlush().

        * gdk/x11/gdkwindow-x11.c (_gdk_windowing_window_at_pointer):
        Use gdk_x11_display_grab/ungrab.
2003-04-07 23:47:59 +00:00
Matthias Clasen
3db24eb81c Bug #107664 continued:
2003-03-08  Matthias Clasen  <maclas@gmx.de>

	Bug #107664 continued:

	* gdk/x11/gdkinputprivate.h:
	* gdk/x11/gdkinput-none.c (_gdk_input_window_none_event): Remove.
	(_gdk_input_other_event): Return gboolean.
	* gdk/x11/gdkinput-xfree.c (_gdk_input_window_none_event): Remove.
	(_gdk_input_other_event): Return gboolean.
	* gdk/x11/gdkinput-x11.c (_gdk_input_common_other_event): Return gboolean.

	* gdk/x11/gdkevents-x11.c (gdk_event_translate): Make return_val
	gboolean, remove pointless call to _gdk_input_window_none_event.

	* gdk/win32/gdkinput-win32.[hc] (_gdk_input_other_event): Return gboolean.
	(_gdk_input_window_none_event): Remove.

	* gtk/gtktextiter.c (_gtk_text_iter_get_indexable_segment):
	(_gtk_text_iter_get_any_segment):
	(_gtk_text_iter_get_segment_byte):
	(_gtk_text_iter_get_segment_char):
	(_gtk_text_iter_get_text_line):
	(_gtk_text_iter_get_btree): Fix 0/NULL confusion.
	* gdk/x11/gdkdnd-x11.c (motif_target_table_check): Return gint.
	* gdk/win32/gdkfont-win32.c (gdk_font_equal):
	* gdk/linux-fb/gdkwindow-fb.c (gdk_window_get_deskrelative_origin):
	(gdk_window_get_origin):
	* gdk/linux-fb/gdkcolor-fb.c (gdk_colors_alloc): Fix 0/FALSE confusion.
2003-03-08 21:11:39 +00:00
Matthias Clasen
d03b2741ad Trivial cleanups (bug #107664) 2003-03-08 20:49:00 +00:00
Matthias Clasen
285a25da03 Return gboolean, not gint. (#107664, Morten Welinder)
2003-03-06  Matthias Clasen  <maclas@gmx.de>

	* gdk/gdkrgb.c (gdk_rgb_try_colormap): Return gboolean, not gint.
	(#107664, Morten Welinder)

	* gdk/x11/gdkwindow-x11.c (gdk_window_get_deskrelative_origin):
	* gdk/x11/gdkfont-x11.c (gdk_font_equal):
	* gdk/x11/gdkdnd-x11.c (gdk_drag_get_protocol_for_display):
	Fix TRUE/1 and FALSE/0 confusion.  (#107664, Morten Welinder)

	* io-gif.c (gif_read): Fix 0/FALSE confusion (#107664, Morten Welinder)
2003-03-06 20:19:11 +00:00
Manish Singh
dd74be94c6 demos/gtk-demo/main.c demos/gtk-demo/tree_store.c gdk/x11/gdkscreen-x11.c
Thu Feb 27 17:44:24 2003  Manish Singh  <yosh@gimp.org>

        * demos/gtk-demo/main.c
        * demos/gtk-demo/tree_store.c
        * gdk/x11/gdkscreen-x11.c
        * gtk/gtkcellrenderertoggle.c
        * gtk/gtkcolorsel.c
        * gtk/gtkdnd.c
        * gtk/gtkeditable.c
        * gtk/gtkentry.c
        * gtk/gtkmenu.c
        * gtk/gtkmenubar.c
        * gtk/gtkmenuitem.c
        * gtk/gtkmenushell.c
        * gtk/gtkrc.c
        * gtk/gtksettings.c
        * gtk/gtkstyle.c
        * gtk/gtktextbuffer.c
        * gtk/gtktextview.c
        * gtk/gtktreeviewcolumn.c
        * tests/testgtk.c
        * tests/testtext.c
        * tests/testtreeedit.c
        * tests/testtreefocus.c
        * tests/testtreeview.c: remove unnecessary G_OBJECT() casts.
2003-02-28 01:45:51 +00:00
Matthias Clasen
d566e483b6 Return a GdkVisual *, not a GdkVisual **. (#105243)
2003-02-06  Matthias Clasen  <maclas@gmx.de>

	* gdk/x11/gdkvisual-x11.c (gdk_visual_get_best_with_depth): Return
	a GdkVisual *, not a GdkVisual **.  (#105243)
2003-02-06 19:18:20 +00:00
Manish Singh
57e9b8ef9c add a "return" at the end of the function, so there is a statement
Wed Jan 22 14:18:46 2003  Manish Singh  <yosh@gimp.org>

        * gdk/x11/gdkevents-x11.c (translate_key_event): add a "return" at
        the end of the function, so there is a statement following the "out"
        label in all cases (fixes #101961)
2003-01-22 22:14:00 +00:00
Manish Singh
bd6ac8c69c #include <stdlib.h> for putenv, <string.h> for strlen.
Wed Jan  8 18:43:03 2003  Manish Singh  <yosh@gimp.org>

        * gdk/x11/gdkdisplay-x11.c: #include <stdlib.h> for putenv,
        <string.h> for strlen.

        * gdk/x11/gdkscreen-x11.c: #include <stdlib.h> for getenv,
        <string.h> for strrchr.

        * tests/testgtk.c (create_saved_position): "x" and "y" properties
        for widgets no longer exist, use gtk_window_move instead.

        * test/testtextbuffer.c (check_get_set_text): cast strlen to
        int for g_error.
2003-01-09 02:38:13 +00:00
Owen Taylor
9902a67094 Call the filters on the window where the event is received, not on the
Thu Dec 19 11:42:00 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkevents-x11.c (gdk_event_translate): Call
        the filters on the window where the event is received,
        not on the window the event is "about". (#101512,
        Bolian Yin.)
2002-12-19 16:51:02 +00:00
Owen Taylor
880f14ff0c Fix a bug with checking the private flag on the wrong window; improve the
Sat Dec 14 22:18:45 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkwindow-x11.c (gdk_window_get_frame_extents):
        Fix a bug with checking the private flag on the wrong
        window; improve the answer on failure a bit; push
        an error trap around the X operations. (#100933)
2002-12-15 03:28:44 +00:00
Matthias Clasen
8ba71578f2 Use g_printf instead of system printf. (#99327)
2002-12-15  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkcalendar.c:
	* gtk/gtkfilesel.c:
	* gtk/gtkfontsel.c:
	* gtk/gtkhruler.c:
	* gtk/gtkinputdialog.c:
	* gtk/gtkprogress.c:
	* gtk/gtktreemodel.c:
	* gtk/gtkvruler.c:
	* gtk/queryimmodules.c:
	* gtk/theme-bits/decompose-bits.c:
	* gdk-pixbuf/gdk-pixbuf-csource.c:
	* gdk-pixbuf/make-inline-pixbuf.c:
	* gdk-pixbuf/queryloaders.c:
	* gdk/gdkkeynames.c:
	* gdk/gdkrgb.c:
	* gdk/linux-fb/gdkfbmanager.c:
	* gdk/win32/gdkevents-win32.c:
	* gdk/win32/gdkmain-win32.c:
	* gdk/win32/gdkproperty-win32.c:
	* gdk/x11/gdkmain-x11.c: Use g_printf instead of system
	printf.  (#99327)
2002-12-15 01:49:01 +00:00
PST 2002 Manish Singh
1e5d33a29b gdk_x11_get_xatom_by_name_for_display takes a GdkDisplay *, not an
Tue Dec 10 15:46:01 PST 2002  Manish Singh  <yosh@gimp.org>

        * gdk/x11/gdkwindow-x11.c (set_initial_hints):
        gdk_x11_get_xatom_by_name_for_display takes a GdkDisplay *,
        not an XDisplay * (obvious typo fix for the previous commit)
2002-12-10 23:48:07 +00:00
Matthias Clasen
428c076fef Delete EWMH properties if no private->state flags are set. (#66754)
* gdk/x11/gdkwindow-x11.c (set_initial_hints): Delete EWMH
	properties if no private->state flags are set.  (#66754)

	* gtk/gtkwidget.c (gtk_widget_class_find_style_property):
	* gtk/gtkcontainer.c (gtk_container_class_find_child_property):
	Doc typo fixes.

	* gtk/tmpl/gtktextview.sgml: Add docs.

	* gtk/tree_widget.sgml: Fix some links.

	* gtk/tmpl/gtkwindow.sgml: Add docs.

	* gtk/tmpl/gtkeditable.sgml: Document GtkEditable as an interface,
	not as an abstract base class.

	* gtk/gtk-docs.sgml: Move GtkEditable from "Abstract Base Classes"
	to "Numeric/Text Data Entry".
2002-12-10 23:25:33 +00:00
Owen Taylor
329c090ec1 Separate out tracking of the X server focus window from tracking our idea
Tue Dec 10 14:37:41 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkevents-x11.c (gdk_event_translate)
          gdk/x11/gdkwindow-x11.h: Separate out tracking of the X server
          focus window from tracking our idea of what the focus window is,
          because the PointerRoot code needs to know the real pointer
          window. (Mostly accidentally committed a bit earlier.)
2002-12-10 20:06:02 +00:00
Owen Taylor
b658a5d26c Remove selection for DeviceButtonRelease, we no longer need it now that
Mon Dec  9 18:50:31 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkinput-x11.c (_gdk_input_common_find_events):
        Remove selection for DeviceButtonRelease, we no longer need
        it now that gxi is gone. (#32617, reported by Garry
        Osgood)
2002-12-09 23:55:26 +00:00
Kristian Rietveld
00185e7ed1 update to allow a GdkDrawable instead of a GdkWindow.
Tue Dec 10 00:49:35 2002  Kristian Rietveld  <kris@gtk.org>

        * gdk/gdkpixmap.h (gdk_pixmap_new), (gdk_bitmap_create_from_data),
        (gdk_pixmap_create_from_xpm), (gdk_pixmap_colormap_create_from_xpm),
        (gdk_pixmap_create_from_xpm_d),
        (gdk_pixmap_colormap_create_from_xpm_d): update to allow a
        GdkDrawable instead of a GdkWindow.

        * gdk/gdkpixmap.c (gdk_pixmap_colormap_create_from_xpm),
        (gdk_pixmap_create_from_xpm), (gdk_pixmap_colormap_create_from_xpm_d),
        (gdk_pixmap_create_from_xpm_d): update to allow a GdkDrawable
        instead of a GdkWindow.

        * gdk/linux-fb/gdkpixmap-fb.c (gdk_pixmap_new),
        (gdk_bitmap_create_from_data), (gdk_pixmap_create_from_data): update
        to allow a GdkDrawable instead of a GdkWindow.

        * gdk/x11/gdkpixmap-x11.c (gdk_pixmap_new),
        (gdk_bitmap_create_from_data), (gdk_pixmap_create_from_data): likewise
2002-12-09 23:34:49 +00:00
Owen Taylor
516b7c18ba Fix a bug in one of my earlier changes. (From Naofumi Yasufuku, #100023)
Mon Dec  9 10:44:59 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkcolor-x11.c (gdk_colormap_alloc_colors_private):
        Fix a bug in one of my earlier changes. (From Naofumi Yasufuku,
        #100023)
2002-12-09 15:48:09 +00:00
Owen Taylor
39e143aa68 Fix spacing in a bunch of for (i=0; i<ncolors; i++).
Sun Dec  8 21:43:31 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkcolor-x11.c: Fix spacing in a bunch of
        for (i=0; i<ncolors; i++).

        * gdk/x11/gdkcolor-x11.c: Various g_return_if_fail()
        cleanup.
2002-12-09 02:51:14 +00:00
Owen Taylor
af36a5e5c1 Fix a lost refcount in the case where we get a duplicate back from the X
Sun Dec  8 21:29:10 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkcolor-x11.c (gdk_colormap_alloc1): Fix
        a lost refcount in the case where we get a duplicate
        back from the X server.

        * gdk/x11/gdkcolor-x11.c (gdk_colormap_alloc_colors_writeable):
        Set success[] for all colors when allocation of colors
        cells via XAllocColorCells succeeds.

        * gdk/x11/gdkcolor-x11.c (gdk_colormap_alloc_colors_private):
        Don't match against colors cells allocated writeable.
2002-12-09 02:41:51 +00:00
Owen Taylor
e4c9e2ebca When allocating non-writeable colors, fill in the flags field of the
Sun Dec  8 21:22:46 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkcolor-x11.c (gdk_colormap_alloc_colors_private):
        When allocating non-writeable colors, fill in the flags
        field of the XColor, and insert the returned color into
        our color hash. (#100023, Naofumi Yasufuku)

        * gdk/x11/gdkcolor-x11.c (gdk_colormap_free_colors):
        Fix a typo (my fault) that slipped in in the last patch.
2002-12-09 02:25:14 +00:00
Owen Taylor
fac76f9426 More fixes for GdkColormapX11 (#100023, Naofumi Yasufuku)
Sun Dec  8 20:32:23 2002  Owen Taylor  <otaylor@redhat.com>

        More fixes for GdkColormapX11 (#100023, Naofumi Yasufuku)

        * gdk/x11/gdkcolor-x11.c (gdk_colors_free)
        (gdk_colormap_free_colors): Don't call XFreeColors() for
        private colorsmaps.

        * gdk/x11/gdkcolor-x11.c (gdk_colormap_alloc_colors_writeable,
        gdk_colormap_colors_private, gdk_colormap_alloc_colors_shared):
        Fix return values to return number remaining not number
        allocated.

        * gdk/x11/gdkcolor-x11.c (gdk_colormap_alloc_colors_shared,
        gdk_colormap_alloc_colors_private): Clean up some a stray
        initializations.
2002-12-09 02:02:27 +00:00
Owen Taylor
bb0446a014 Fixes for GdkColormapX11 (#100023, Naofumi Yasufuku)
Sun Dec  8 20:19:22 2002  Owen Taylor  <otaylor@redhat.com>

        Fixes for GdkColormapX11 (#100023, Naofumi Yasufuku)

        * gdk/x11/gdkcolor-x11.c (gdk_x11_colormap_foreign_new):
        Fix typo that caused us to always return the system
        colormap.

        * gdk/x11/gdkcolor-x11.c (gdk_colormap_new): When allocating
        a private colormap and copying the system palette
        to prevent flashing, handle colormap->size greater than
        system_colormap->size.

        * gdk/x11/gdkcolor-x11.c (gdk_x11_colormap_get_xdisplay):
        Get rid of the last remains of private->xdisplay
        in favor of using private->screen.
2002-12-09 01:29:34 +00:00
Owen Taylor
6d5f8224a5 Always look up and create the Motif drag window as a child of the root
Wed Dec  4 14:31:46 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkdnd-x11.c: Always look up and create the
        Motif drag window as a child of the root window of screen 0
        rather than the default screen. (#100362, Erwann Chenede)

        * gdk/x11/gdkdnd-x11.c (motif_read_initiator_info):
        Return FALSE, not GDK_FILTER_REMOVE on failure; this
        isn't a filter function.

        * gdk/x11/gdkselection-x11.c gtk/gtkselection.c: Add
        some g_return_if_fail() to catch selection == None more
        gracefully than an X error.
2002-12-04 19:50:57 +00:00
Owen Taylor
a58708c484 Fix wrong sign for queued translation. (Found by Chris Blizzard, #100274)
Tue Dec  3 17:47:24 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkgeometry-x11.c (gdk_window_guffaw_scroll): Fix wrong
        sign for queued translation. (Found by Chris Blizzard,
        #100274)
2002-12-03 22:54:09 +00:00
Matthias Clasen
58d7ca8102 Moveresize emulation for all edges. (#52833) 2002-12-03 21:57:13 +00:00
Matthias Clasen
7cb3f99fc7 Document 2.2 API additions. 2002-11-28 00:33:17 +00:00
Owen Taylor
a1f5e821bf Fixes from #98358, Havoc Pennington.
Mon Nov 25 17:44:09 2002  Owen Taylor  <otaylor@redhat.com>

        Fixes from #98358, Havoc Pennington.

        * gdk/{x11,win32,linux-fb}/gdkcolor-*.c (gdk_colormap_finalize):
        Free the private structure.

        * gdk/x11,win32,linxu-fb}/gdkscreen-*.c (gdk_screen_set_default_colormap):
          gdk/x11/gdkwindow-x11.c (_gdk_windowing_window_init):
        Keep a ref to the default colormap.

        * gdk/x11/gdkscreen-x11.c (gdk_screen_x11_dispose): Unref
        the default colormap.

        * gdk/x11/gdkwindow-x11.c (gdk_window_impl_x11_set_colormap):
        Handle the CMAP == NULL case even when the window is
        destroyed.

        * gdk/x11/gdkwindow-x11.c (_gdk_windowing_window_init):
        Add a missing ref for the system colormap.
2002-11-25 22:52:36 +00:00
Owen Taylor
ddfe34c7b0 Use _NET_WM_WINDOW_TYPE_SPLASH, not TYPE_SPLASHSCREEN. (#99482, Gregory
Mon Nov 25 16:58:27 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkwindow-x11.c: Use _NET_WM_WINDOW_TYPE_SPLASH,
        not TYPE_SPLASHSCREEN. (#99482, Gregory Merchan)
2002-11-25 22:05:52 +00:00
Matthias Clasen
65cce90c27 Remove period from title of example in docs.
* gdk/x11/gdkcursor-x11.c (gdk_cursor_new_from_pixmap):
	Remove period from title of example in docs.

	* gdk/tmpl/x_interaction.sgml:
	* gdk/tmpl/pango_interaction.sgml:
	* gdk/tmpl/input_devices.sgml:
	* gdk/tmpl/input.sgml:
	* gdk/tmpl/threads.sgml:
	* gdk/tmpl/properties.sgml:
	* gdk/tmpl/dnd.sgml:
	* gdk/tmpl/selections.sgml:
	* gdk/tmpl/keys.sgml:
	* gdk/tmpl/event_structs.sgml:
	* gdk/tmpl/events.sgml:
	* gdk/tmpl/windows.sgml:
	* gdk/tmpl/cursors.sgml:
	* gdk/tmpl/fonts.sgml:
	* gdk/tmpl/colors.sgml:
	* gdk/tmpl/pixbufs.sgml:
	* gdk/tmpl/images.sgml:
	* gdk/tmpl/pixmaps.sgml:
	* gdk/tmpl/drawing.sgml:
	* gdk/tmpl/regions.sgml:
	* gdk/tmpl/gdkdisplaymanager.sgml:
	* gdk/tmpl/gdkscreen.sgml:
	* gdk/tmpl/gdkdisplay.sgml:
	* gdk/tmpl/general.sgml:
	Add missing short descriptions, standardize them to start with
	a capital and end without a period. Also remove periods from
	titles of examples.
2002-11-23 23:02:10 +00:00
Manish Singh
89fd6ad3de add -DGDK_DISABLE_DEPRECATED
Sun Nov 17 13:45:08 2002  Manish Singh  <yosh@gimp.org>

        * gdk/Makefile.am: add -DGDK_DISABLE_DEPRECATED

        * gdk/gdk.c (gdk_exit): remove obsolete comment

        * gdk/gdk.h: declare gdk_input_add_full if GTK_COMPILATION for
        gtk_input_add_full

        * gdk/gdkcolor.c (gdk_color_white, gdk_color_black): use
        gdk_colormap_alloc_color instead of gdk_color_alloc

        * gdk/gdkcolor.h: declare gdk_colormap_change if GDK_COMPILATION for
        gdk_colors_store. Also, gdk_colors_{alloc,free} for
        gdk_rgb_try_colormap

        * gdk/gdkdrawable.h: declare gdk_draw_string if GTK_COMPILATION for
        gtk_default_draw_string. Also, gdk_draw_text and gdk_draw_text_wc
        if GDK_COMPILATION for the respective gdk_window_ and gdk_pixmap_
        functions.

        * gdk/gdkfont.c: #undef GDK_DISABLE_DEPRECATED, completely compat
        code here

        * gdk/gdkfont.h: allow the GdkFont structure and a few gdk_font_
        functions for compat code in GDK_COMPILATION and GTK_COMPILATION.

        * gdk/gdkrgb.c (gdk_rgb_cmap_fail, gdk_rgb_try_colormap): use
        gdk_colormap_free_colors instead of gdk_colors_free.

        * gdk/gdkrgb.c (gdk_draw_rgb_image_core): no need to set fg/bg
        for own_gc, unused.

        * gdk/gdkwindow.h: declare gdk_window_get_deskrelative_origin if
        GTK_COMPILATION for gtk_handle_box_button_changed.

        * gdk/x11/Makefile.am: add -DGDK_DISABLE_DEPRECATED, renmae
        -DINSIDE_GDK_X11 to -DGDK_COMPILATION

        * gdk/x11/gdkcolor-x11.c: remove duplicate doc string for
        gdk_colormap_alloc_colors.

        * gdk/x11/gdkfont-x11.c:  #undef GDK_DISABLE_DEPRECATED, completely
        compat code here

        * gdk/x11/gdkx.h: use GDK_COMPILATION instead of INSIDE_GDK_X11,
        allow a few gdk_x11_font_ functions if GDK_COMPILATION for compat
        code

        * gtk/Makefile.am: add -DGDK_DISABLE_DEPRECATED

        * gtk/gtkclist.c
        * gtk/gtkctree.c
        * gtk/gtkpixmap.c
        * gtk/gtkpreview.c
        * gtk/gtktext.c: #undef GDK_DISABLE_DEPRECATED, deprecated widget

        * gtk/gtkhandlebox.c (gtk_handle_box_motion): use
        gdk_window_set_geometry_hints instead of gdk_window_set_hints.

        * gtk/gtkmain.c (gtk_exit): call exit directly

        * gtktipsquery.c (gtk_tips_query_real_start_query)
        * gtk/gtktreeitem.c (gtk_tree_item_add_pixmaps): remove some
        deprecated GDK usage.
2002-11-17 22:04:03 +00:00
Owen Taylor
030ddc16b2 Fix display/window typo. (#98511, Soeren Sandmann)
Thu Nov 14 14:58:21 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkwindow-x11.c (gdk_window_set_icon_name):
        Fix display/window typo. (#98511, Soeren Sandmann)
2002-11-14 20:02:32 +00:00
Owen Taylor
af2d862517 Try a different hack to force gdkenumtypes.h to be updated before building
Fri Nov  8 18:04:16 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/{linux-fb,win32,11}/Makefile.am: Try a different
        hack to force gdkenumtypes.h to be updated before
        building the subdir, last hack caused contents
        to be rebuilt on every make.
2002-11-14 06:07:46 +00:00
Matthias Clasen
f4823da651 Fix a typo which broke moveresize emulation.
* gdk/x11/gdkwindow-x11.c (_gdk_moveresize_handle_event): Fix a
	typo which broke moveresize emulation.
2002-11-10 01:33:53 +00:00
Matthias Clasen
908bee9b3f Reformulate doc comments to work around gtk-doc limitations.
* gdk/x11/gdkfont-x11.c (gdk_text_extents_wc):
	(gdk_text_extents):
	* gdk/gdkfont.c (gdk_string_extents): Reformulate doc comments to
	work around gtk-doc limitations.
2002-11-08 23:21:35 +00:00
Owen Taylor
85c6465ec5 Add in a awful hack to force gdkenumtypes.h to be updated before building
Fri Nov  8 18:04:16 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/{linux-fb,win32,11}/Makefile.am: Add in a awful
        hack to force gdkenumtypes.h to be updated before
        building the subdir. (#86587)
2002-11-08 23:14:53 +00:00
Owen Taylor
b179b5eba4 Use g_get_application_name() instead of g_get_prgname() as the default
Fri Nov  8 17:08:54 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkwindow-x11.c (gdk_window_new): Use
        g_get_application_name() instead of g_get_prgname()
        as the default window title when set.

        * gdk/x11/gdkwindow-x11.c gdk/x11/gdkdisplay-x11.[ch]:x
        Set g_get_application_name() as the title for the
        leader window the first time we create a window
        pointing to it.

        * tests/testgtk.c (main): Call g_set_application_name();

        * configure.in (GDK_PIXBUF_VERSION): Require GLib-2.1.3
2002-11-08 22:29:33 +00:00
Soeren Sandmann
b1165617b7 docs/reference/gdk/tmpl/dnd.sgml docs/reference/gdk/tmpl/drawing.sgml
Fri Nov  8 20:14:52 2002  Soeren Sandmann  <sandmann@daimi.au.dk>

	* docs/reference/gdk/tmpl/dnd.sgml
	docs/reference/gdk/tmpl/drawing.sgml
	docs/reference/gdk/tmpl/gdk-unused.sgml
	docs/reference/gdk/tmpl/gdkdisplay.sgml
	docs/reference/gdk/tmpl/general.sgml
	docs/reference/gdk/tmpl/input_devices.sgml
	docs/reference/gdk/tmpl/selections.sgml
	docs/reference/gtk/tmpl/gtkcellrenderer.sgml
	docs/reference/gtk/tmpl/gtkcurve.sgml
	docs/reference/gtk/tmpl/gtkdnd.sgml
	docs/reference/gtk/tmpl/gtkitemfactory.sgml
	docs/reference/gtk/tmpl/gtkmenu.sgml
	docs/reference/gtk/tmpl/gtkoldeditable.sgml
	docs/reference/gtk/tmpl/gtkoptionmenu.sgml
	docs/reference/gtk/tmpl/gtkpreview.sgml
	docs/reference/gtk/tmpl/gtkselection.sgml
	docs/reference/gtk/tmpl/gtksocket.sgml
	docs/reference/gtk/tmpl/gtkstyle.sgml
	docs/reference/gtk/tmpl/gtktextbuffer.sgml
	docs/reference/gtk/tmpl/gtktreemodel.sgml
	docs/reference/gtk/tmpl/gtkwidget.sgml gdk/gdk.h gdk/gdkdisplay.c
	gdk/gdkdisplay.h gdk/gdkdnd.h gdk/gdkdraw.c gdk/gdkdrawable.h
	gdk/gdkinput.h gdk/gdkselection.h gdk/x11/gdkdisplay-x11.c
	gdk/x11/gdkdnd-x11.c gdk/x11/gdkselection-x11.c gtk/gtkcurve.h
	gtk/gtkdnd.h gtk/gtkitemfactory.c gtk/gtkitemfactory.h
	gtk/gtkmenu.h gtk/gtkoldeditable.c gtk/gtkoldeditable.h
	gtk/gtkoptionmenu.h gtk/gtkplug.c gtk/gtkplug.h gtk/gtkpreview.h
	gtk/gtkrange.h gtk/gtkselection.c gtk/gtkselection.h
	gtk/gtksocket.c gtk/gtksocket.h gtk/gtkstyle.c gtk/gtkstyle.h
	gtk/gtktextlayout.c gtk/gtktextlayout.h gtk/gtktreemodel.c
	gtk/gtktreemodel.h gtk/gtkwidget.h

	Trivial s/foo/foo_/ fixes to make gtk.h includable with -Wshadow
	without warnings. (#91680)
2002-11-08 19:41:50 +00:00
Owen Taylor
d2caca5e20 Don't try to use render if we can't get a picture for the drawable. (Fixes
Thu Nov  7 17:18:06 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkdrawable-x11.c (gdk_x11_draw_pixbuf):
        Don't try to use render if we can't get a picture for
        the drawable. (Fixes #97220, reported by
        Jamie Zawinski)

        * gtk/gtkimage.c: Force requisition calculation
        when we get a expose prior to size_request().
        (#91711, reported by Sven Neumann, debugging
        help from Matthias Clasen, Soeren Sandmann)
2002-11-07 22:27:22 +00:00
Owen Taylor
b56f96c98d Fix misplaced display_grab()/display_ungrab(); they shouldn't have been
Thu Nov  7 16:45:54 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkx.h: Fix misplaced display_grab()/display_ungrab();
        they shouldn't have been deprecated.
2002-11-07 21:49:13 +00:00
Owen Taylor
accc3a3365 Add startup notification hooks - mostly based on patch by Havoc Pennington
Sat Nov  2 00:22:33 2002  Owen Taylor  <otaylor@redhat.com>

        Add startup notification hooks - mostly based on patch
        by Havoc Pennington in #96772.

        * gdk/gdk.h gdk/x11/gdkdisplay-x11.c
        gdk/{win32,linux-fb}/gdkmain-*.c: (gdk_notify_startup_complete):
        new function that indicates an application has finished starting
        up.

        * gdk/x11/gdkmain-x11.c gdk/x11/gdkdisplay-x11.c
        (_gdk_windowing_set_default_display): store value of
        DESKTOP_STARTUP_ID on the default screen, and clear it from the
        environment.

        * gdk/x11/gdkdisplay-x11.c:
        Set _NET_STARTUP_ID hint on display's group leader window.

        * gtk/gtkwindow.c (gtk_window_set_auto_startup_notification):
        function to toggle whether we automatically broadcast that we've
        started up, after mapping the first toplevel window.
        (gtk_window_map): call gdk_screen_notify_startup_complete() by
        default, unless enabled by above.

        * gtk/gtkmain.c gtk/gtkcombo.c gtk/gtktoolbar.c:
        Couple of warning fixes.
2002-11-02 05:37:04 +00:00
Matthias Clasen
ca00536f34 More doc comments moved inline. 2002-11-01 00:45:32 +00:00
Owen Taylor
550bf181d2 Add a --screen option for setting the default screen. (Based on a patch
Thu Oct 31 12:40:39 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdk.[ch] gdk/gdkglobals.c gdk/gdkinternals.h
        gdk/{x11,win32,linux-fb}/gdkscreen-{x11,win32,linux-fb}.c:
        Add a --screen option for setting the default screen.
        (Based on a patch from Balamurali Viswanathan, #81145)

        * gdk/gdk.c gdkdisplay.h gtk/gtkmain.c: Add
        gdk_display_open_default_libgtk_only(), so gtk_init_check()
        and gdk_init_check() can share the same behavior w.r.t.
        --screen.

        * gdk/gdk.[ch]: Make gdk_get_display_arg_name() G_CONST_RETURN.

        * gdk/x11/gdkselection-x11.c (gdk_selection_property_get):
        Suppress a spurious warning.

        * tests/testgtkrc: Remove someleft-over commented out
        includes that could be confusing.
2002-10-31 21:12:23 +00:00
Matthias Clasen
d00b2b0a4a doc comment fixes. 2002-10-29 21:27:17 +00:00
Matthias Clasen
1a4c94b90b Fix doc comment.
* gdk/x11/gdkcursor-x11.c: Fix doc comment.

	* gdk/gdkdnd.c: Add missing includes.
2002-10-25 00:01:15 +00:00
Matthias Clasen
f607812226 More API docs moved inline. 2002-10-24 21:24:20 +00:00
Matthias Clasen
1f1f2e9127 Documentation updates. 2002-10-23 23:15:58 +00:00
Matthias Clasen
f900039c8f Gdk API doc updates. 2002-10-22 22:11:22 +00:00
Owen Taylor
5c91c3a08a Produce C-m, not C-j for return. Handle Escape.
Fri Oct 18 16:47:02 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkevents-x11.c (translate_key_event): Produce
        C-m, not C-j for return. Handle Escape.
2002-10-22 19:04:51 +00:00
Owen Taylor
a5803ca523 Handle Return and KP_Enter.
Fri Oct 18 16:47:02 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkevents-x11.c (translate_key_event): Handle
        Return and KP_Enter.
2002-10-18 20:49:35 +00:00
Owen Taylor
30faa38aec Fix use of uninitialized variable.
Thu Oct 17 17:17:05 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkcheckbutton.c (gtk_check_button_size_request):
        Fix use of uninitialized variable.

Thu Oct 17 14:38:37 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkaccellabel.c (gtk_accel_label_expose_event):
        Align the baseline of the accelerator label with the
        first baseline of the main label of the menu item. (#76593)

Wed Oct 16 18:25:24 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkevents-x11.c (translate_key_event):
        Use gdk_keymap_translate_keyboard_state() rather than
        XLookupString() to get the keysymbol, since XLookupString
        can confuse the input method handling. (#93575)

        * gdk/x11/gdkkeys-x11.c: Rewrite the handling of
        key translation for the non-XKB case to properly
        handle Shift_Lock, Caps_Lock, Num_Lock according
        to the Xlib spec. (#67066)
2002-10-18 19:26:43 +00:00
Havoc Pennington
727eb8afbd add g_return_if_fail for monitor number <= 0
2002-10-16  Havoc Pennington  <hp@redhat.com>

	* gdk/x11/gdkscreen-x11.c (gdk_screen_get_monitor_geometry): add
	g_return_if_fail for monitor number <= 0

	* gtk/gtkmenu.c (gtk_menu_position): handle case where pointer
	is outside the screen.

	* gtk/gtkwindow.c (get_monitor_center): factor out
	the code to position a window in center
	(gtk_window_compute_configure_request): use here
	(gtk_window_constrain_position): use here, the
	code here wasn't multihead-aware

	* gdk/x11/gdkevents-x11.c (get_real_window): function to
	return the window the event describes, rather than the window
	that received the event.
	(gdk_event_translate): use result of that function for
	filling in GdkEvent::window, which only matters for
	MapNotify/UnmapNotify and ConfigureNotify, in practice.

	Unbreaks various things using SubstructureNotifyMask.
2002-10-17 20:24:03 +00:00
Owen Taylor
79193611f4 Fix from Phil Blundell for compiling without Xkb. (#95909)
Wed Oct 16 15:19:44 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkkeys-x11.c: Fix from Phil Blundell for
        compiling without Xkb. (#95909)
2002-10-16 19:20:57 +00:00
Owen Taylor
209fd4cc5d Make 'filled' arguments for draw_arc/polygon/rectangle gboolean not gint.
Wed Oct 16 14:32:43 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkdrawable.h gdk/gdkdraw.c gdk/gdkpixmap.c
        gdk/gdkwindow.c gdk/x11/gdkdrawable-x11.c
        gdk/win32/gdkdrawable-win32.c gdk/linux-fb/gdkdrawable-fb2.c
        gdk/linux-fb/gdkprivate-fb.h:
        Make 'filled' arguments for draw_arc/polygon/rectangle
        gboolean not gint. (#94976)
2002-10-16 18:41:42 +00:00
Matthias Clasen
a9b71314ee Lots of trivial doc fixes. 2002-10-11 20:36:21 +00:00
Matthias Clasen
5591c434f8 Documentation updates. 2002-10-11 01:04:45 +00:00
Owen Taylor
f2313b63cd Move out of HAVE_XKB. (#95129, Phil Blundell)
Mon Oct  7 19:44:45 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkkeys-x11.c (_gdk_keymap_keys_changed): Move
        out of HAVE_XKB. (#95129, Phil Blundell)
2002-10-08 13:27:04 +00:00
Owen Taylor
f3f016d045 Add gdk_drag_find_window_for_screen(), so that we can interpret x_root /
Mon Oct  7 15:48:44 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkdnd.[ch] gdk/x11/gdkdnd-x11.c: Add
        gdk_drag_find_window_for_screen(), so that we can
        interpret x_root / y_root relative to the correct screen.

        * gdk/gdkdnd.c Makefile.am gdk/x11/gdkdnd-x11.c
        gdk/fb/gdkdnd-fb.c gdk/win32/gdkdnd-win32.c: New file.
        Move gdk_drag_find_window(), gdk_drag_get_protocol() here.

        * gtk/gtkdnd.c: Handle drags between screens; use
        a fallback icon for icons set as windows/pixmaps,
        move the drag icon between displays for icons set as
        pixbufs.

        * gdk/x11/gdkkeys-x11.c (update_keymaps): Fix infinite
        loop from last change.
2002-10-07 20:03:15 +00:00
Owen Taylor
253458ec52 - Replace GdkPointerHooks with a multihead-safe GdkDisplayPointerHooks,
Mon Oct  7 15:10:00 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkdisplay.[ch] gdk/gdkinternals.h
        gdk/gdkwindow.[ch] gdk/linux-fb/gdkwindow-fb.c
        gdk/win32/gdkwindow-win32.c gdk/x11/gdkwindow-x11.c:

        - Replace GdkPointerHooks with a multihead-safe
          GdkDisplayPointerHooks, leave GdkPointerHooks
          around for singlehead.
        - Add gdk_display_get_pointer() to get the pointer
          location with the screen it is on.

        * gdk/gdk.def gdk/gdkdisplay.[ch] gdk/gdkscreen.[ch]:
        Change gdk_screen_get_window_at_pointer() to
        gdk_display_get_window_at_pointer().

        * gtk/gtktreeview.c demos/gtk-demo/changedisplay.c
        tests/testgtk.c: Use gdk_display_get_window_at_pointer(),
        not gdk_screen_get_window_at_pointer().

        * gtk/gtkcolorsel.c: Fix grabbing color to be multihead
        safe.

        * gtk/gtkwidget.c: Allow gtk_widget_push_colormap (NULL).
        since it is useful for writing code that doesn't
        know the dcurrent state but needs a clean colormap.

        * gtk/gtkrc.c: When loading the settings for a particular
        screen, only reset toplevels on that screen.

        * gtk/gtkiconfactory.h: Fix #ifdef GTK_MULTIHEAD_SAFE
        that should have been #ifndef GTK_MULTIHEAD_SAFE.
2002-10-07 19:42:49 +00:00
Owen Taylor
c1fff202ed Fix some prototypes that had () instead of (void).
Mon Oct  7 14:51:21 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkx.h: Fix some prototypes that had
        () instead of (void).
2002-10-07 18:59:42 +00:00
Owen Taylor
b598a4344e If Mode_switch is used for a known modifier like Mod1, assume it won't be
Mon Oct  7 11:45:17 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkkeys-x11.c (update_keymaps): If Mode_switch
        is used for a known modifier like Mod1, assume it won't
        be used to switch group. (#94841, problem reported by
        Szekeres Istvan)
2002-10-07 16:06:31 +00:00
Bill Haneman
4494b086fd gdk_image_get_pixel, gdk_image_put_pixel: Fixed sense of bounds checks. 2002-10-07 15:16:06 +00:00