Commit Graph

254 Commits

Author SHA1 Message Date
Matthias Clasen
3514077069 Ignore icons if they would make the request large enough to cause Xlib to
2005-11-08  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkwindow-x11.c (gdk_window_set_icon_list): Ignore
	icons if they would make the request large enough to cause
	Xlib to loose the connection.  (#320909, Claudio Saavedra)
2005-11-08 18:26:37 +00:00
Michael Natterer
8cec420a71 gdk/gdk.symbols gdk/gdkwindow.h added gdk_window_get_type_hint() (patch
2005-11-08  Michael Natterer  <mitch@imendio.com>

	* gdk/gdk.symbols
	* gdk/gdkwindow.h
	* gdk/x11/gdkwindow-x11.c: added gdk_window_get_type_hint() (patch
	extracted from maemo-gtk). Fixes bug #320872.
2005-11-08 14:45:32 +00:00
Matthias Clasen
4401280405 Fix #316871, reported by Dan Winship:
2005-09-26  Matthias Clasen  <mclasen@redhat.com>

	Fix #316871, reported by Dan Winship:

	* gdk/gdkwindow.h (struct _GdkWindowObject): Add a shaped flag.

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

	* gdk/gdkwindow.c (gdk_window_invalidate_maybe_recurse): Don't
	remove the child area for shaped windows.
2005-09-26 20:27:44 +00:00
Matthias Clasen
9a5d4a2ff9 Various cleanups. (#315359, Kjartan Maraas)
2005-09-13  Matthias Clasen  <mclasen@redhat.com>

	* gdk/*.c: Various cleanups.  (#315359, Kjartan Maraas)
2005-09-13 19:14:51 +00:00
Matthias Clasen
1f700be359 Broken pipe 2005-09-11 05:40:51 +00:00
Matthias Clasen
476e138db0 Intern type names before registering the type to avoid unnecessary copies.
2005-08-31  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkwindow-x11.c (gdk_window_impl_x11_get_type):
	* gdk/x11/gdkscreen-x11.c (_gdk_screen_x11_get_type):
	* gdk/x11/gdkpixmap-x11.c (gdk_pixmap_impl_x11_get_type):
	* gdk/x11/gdkkeys-x11.c (gdk_keymap_x11_get_type):
	* gdk/x11/gdkinput.c (gdk_device_get_type):
	* gdk/x11/gdkimage-x11.c (gdk_image_get_type):
	* gdk/x11/gdkgc-x11.c (_gdk_gc_x11_get_type):
	* gdk/x11/gdkdrawable-x11.c (_gdk_drawable_impl_x11_get_type):
	* gdk/x11/gdkdnd-x11.c (gdk_drag_context_get_type):
	* gdk/x11/gdkdisplay-x11.c (_gdk_display_x11_get_type):
	* gdk/x11/gdkcolor-x11.c (gdk_colormap_get_type):
	* gdk/gdkwindow.c (gdk_window_object_get_type):
	* gdk/gdkscreen.c (gdk_screen_get_type):
	* gdk/gdkrectangle.c (gdk_rectangle_get_type):
	* gdk/gdkpixmap.c (gdk_pixmap_get_type):
	* gdk/gdkkeys.c (gdk_keymap_get_type):
	* gdk/gdkfont.c (gdk_font_get_type):
	* gdk/gdkevents.c (gdk_event_get_type):
	* gdk/gdkdraw.c (gdk_drawable_get_type):
	* gdk/gdkdisplaymanager.c (gdk_display_manager_get_type):
	* gdk/gdkdisplay.c (gdk_display_get_type):
	* gdk/gdkcursor.c (gdk_cursor_get_type):
	* gdk/gdkcolor.c (gdk_color_get_type): Intern type names before
	registering the type to avoid unnecessary copies.
2005-08-31 15:14:26 +00:00
Owen Taylor
42dc0241f3 Handle pixmap == NULL when checking for a colormap. (Allin Cottrell).
2005-08-15  Owen Taylor  <otaylor@redhat.com>

        * gdk/linux-fb/gdkwindow-fb.c (gdk_window_set_back_pixmap):
        * gdk/win32/gdkwindow-win32.c (gdk_window_set_back_pixmap):
        * gdk/x11/gdkwindow-x11.c (gdk_window_set_back_pixmap):
        Handle pixmap == NULL when checking for a colormap.
        (Allin Cottrell).
2005-08-15 12:35:04 +00:00
Owen Taylor
c24e5e2890 gdk/linux-fb/gdkwindow-fb.c (gdk_window_set_back_pixmap)
2005-08-12  Owen Taylor  <otaylor@redhat.com>

        * gdk/linux-fb/gdkwindow-fb.c (gdk_window_set_back_pixmap)
        * gdk/win32/gdkwindow-win32.c (gdk_window_set_back_pixmap)
        * gdk/x11/gdkwindow-x11.c (gdk_window_set_back_pixmap): Warn if
        gdk_drawable_get_colormap (pixmap) is NULL and return.
2005-08-12 13:13:54 +00:00
Matthias Clasen
5d7b721b27 Make tracking the on_all_desktops state work better.
2005-08-01  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkevents-x11.c (gdk_check_wm_desktop_changed): Make
	tracking the on_all_desktops state work better.

	* gdk/x11/gdkwindow-x11.c (gdk_x11_window_move_to_current_desktop):
	Don't do anything if the window is on all desktops.  (#311803,
	Elijah Newren)
2005-08-01 16:01:24 +00:00
Matthias Clasen
e5f444e9a8 Make gdk_window_present() move the window to the current desktop, instead
2005-07-11  Matthias Clasen  <mclasen@redhat.com>

	Make gdk_window_present() move the window to the current
	desktop, instead of letting the WM change the current
	desktop to where the window is.  (#166379, Elijah Newren)

	* gdk/gdk.symbols:
	* gdk/x11/gdkx.h:
	* gdk/x11/gdkwindow-x11.c (gdk_x11_window_move_to_current_desktop):
	New function to move a window to the current desktop.

	* gtk/gtkwindow.c (gtk_window_present_with_time): Move the
	window to the current desktop before giving it focus.
2005-07-11 18:28:23 +00:00
Matthias Clasen
23fabedc9d Support the ICCCM urgency hint. (#61858, Havoc Pennington)
2005-06-17  Matthias Clasen  <mclasen@redhat.com>

	Support the ICCCM urgency hint.  (#61858, Havoc Pennington)

	* gtk/gtk.symbols:
	* gtk/gtkwindow.[hc]: Add a GtkWindow::urgency-hint property
	with getter and setter.

	* gdk/gdk.symbols:
	* gdk/gdkwindow.h:
	* gdk/x11/gdkwindow-x11.c (gdk_window_set_urgency_hint):
	Add a setter for the urgency hint.

	* gdk/x11/gdkwindow-x11.h (struct _GdkToplevelX11): Store
	urgency hint here.

	* gdk/x11/gdkwindow-x11.c (update_wm_hints): Set the urgency
	hint in the WM_HINTS property when appropriate.
2005-06-17 20:19:32 +00:00
Matthias Clasen
beb73ece8f Handle cursor theme changes for cached cursors which are not associated
2005-06-17  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkprivate-x11.h:
	* gdk/x11/gdkcursor-x11.c: Handle cursor theme changes
	for cached cursors which are not associated with a window
	at the time of the theme change, by storing a serial
	number in each cursor, and updating the theme_serial
	counter whenever the cursor theme changes.

	* gdk/x11/gdkcursor-x11.c (_gdk_x11_cursor_update_theme):
	Private function to update a cursor to the current
	cursor theme if necessary.

	* gdk/x11/gdkmain-x11.c (gdk_pointer_grab):
	* gdk/x11/gdkwindow-x11.c (gdk_window_set_cursor): Call
	_gdk_x11_cursor_update_theme() here.
2005-06-17 17:26:24 +00:00
Manish Singh
be53636ec1 remove unused variable.
Thu Jun 16 15:33:42 2005  Manish Singh  <yosh@gimp.org>

        * gdk/x11/gdkcursor-x11.c (update_cursor): remove unused variable.

        * gdk/x11/gdkwindow-x11.c (_gdk_x11_window_get_cursor): use
        g_return_val_if_fail.

        * gtk/gtkdnd.c (gtk_drag_get_cursor): initialize hot_x and hot_y
        for all cases.

        * gtk/gtkfilechooserdefault.c (button_new): gtk_button_set_image
        takes a GtkWidget, not a GtkImage.
2005-06-16 22:35:45 +00:00
Matthias Clasen
3c96358fd1 Keep a reference to the GdkCursor and add a private getter for it, so that
2005-06-15  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkwindow-x11.[hc]: Keep a reference to the
	GdkCursor and add a private getter for it, so that we can
	update the cursor when the cursor theme changes.

	* gdk/gdk.symbols:
	* gdk/x11/gdkx.h:
	* gdk/x11/gdkcursor-x11.c (gdk_x11_display_set_cursor_theme):
	New function to change the cursor theme.
2005-06-15 18:37:18 +00:00
Matthias Clasen
cd87226986 Remove a lot of pointless g_return_if_fail() non-NULL checks.
2005-06-15  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkwindow-x11.c: Remove a lot of pointless
	g_return_if_fail() non-NULL checks.
2005-06-15 16:59:20 +00:00
Matthias Clasen
0a8331150e Small markup fixes. 2005-06-10 03:35:30 +00:00
Matthias Clasen
92690fa3c2 Small markup fixes.
2005-06-09  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkwindow-x11.c: Small markup fixes.
2005-06-09 16:40:42 +00:00
Owen Taylor
df1cc88424 Update to changed cairo interface.
2005-05-17  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkdrawable-x11.c (gdk_x11_ref_cairo_surface):
        Update to changed cairo interface.

        * gdk/x11/gdkdrawable-x11.[ch]:
        Add _gdk_x11_drawable_update_size()

        * gdk/x11/gdkwindow-x11.c (gdk_window_resize)
        (gdk_window_move_resize)
        * gdk/x11/gdkevents-x11.c (gdk_event_translate):
        Call _gdk_x11_drawable_update_size().
2005-05-17 17:35:22 +00:00
Owen Taylor
09d7eafb15 Switch set_cairo_target() virtual function to ref_cairo_surface()
2005-03-15  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkdrawable.h gdk/gdkdraw.c gdk/gdkpixmap.c gdk/gdkwindow.c
	gdk/x11/gdkdrawable-x11.c gdk/x11/gdkpixmap-x11.c gdk/x11/gdkwindow-x11.c
	gdk/gdkinternals.h: Switch set_cairo_target() virtual function to
	ref_cairo_surface()

	* gdk/gdkdrawable.h gdk/gdkdraw.h: Switch set_cairo_target() virtual
	function to create_cairo_context()

	* gdk/gdkwindow.c: Clear double buffer pixmaps with Cairo.

	* gdk/x11/gdkwindow-x11.c: Keep all components in GdkWindowObject.bg_color,
	not just the pixel.

	* tests/testcairo.c: Update for create_cairo_context()

	* gdk/gdkdraw.c (gdk_draw_trapezoids, gdk_draw_glyphs[_transformed]):
	Reimplement in terms of Cairo, bypass the vtable entries.

	* gdk/x11/gdkdrawable-x11.[ch] gdk/x11/gdkdisplay-x11.[ch]
	gdk/x11/gdkgc-x11.c gdk/x11/gdkpango-x11.c
	gdk/x11/gdkprivate-x11.h gdk/x11/Makefile.am: Remove
	implementation of draw_trapezoids / draw_glyphs[_transformed].

	* gdk/gdkpango.c: Switch GdkPangoRenderer to use Cairo

	* gdk/gdkpango.c gdk/x11/gdkpango-x11.c: Move
	gdk_pango_context_get_for_screen() into the backend independent code.

	* gdk/x11/gdkdrawable-x11.[ch]: Remove Xft use, use RENDER directly
	for drawing images.

	* gdk/gdkdrawable.h gdk/x11/gdkdrawable-x11.c: Remove
	gdk_draw_rectangle_alpha_libgtk_only.

	* gdk/gdkpixbuf.h gdk/gdkpixbuf-render.c: Add
	gdk_pixbuf_set_as_cairo_source()

	* gdk/gdk.symbols: Update

	* gtk/gtkcolorsel.c gtk/gtkhsv.c gtk/gtkiconview.c gtk/gtkruler.[ch]
	gtk/gtk[hv]ruler.c: Convert to Cairo rendering.

	* gtk/gtkstyle.c (gtk_default_draw_check, gtk_default_draw_focus,
	gtk_default_draw_option): Switch to Cairo. Simplify the checkbutton,
	radio button style for now to get something more scalable.

	*  gtk/gtksettings.c: #if 0 out the code to use PangoXft for hinting/
	antialiasing/dpi settings.
2005-03-17 01:54:40 +00:00
Matthias Clasen
2a2d769d42 Make PLT-reduction work with gcc4, and don't include everything in
2005-03-15  Matthias Clasen  <mclasen@redhat.com>

	Make PLT-reduction work with gcc4, and don't include
	everything in gdkalias.h:

	* gdk/gdk.symbols: Group symbols by header and source file.
	* gdk/makegdkalias.pl: Protect definitions by the same
	preprocessor symbols used to guard the headers. Move
	the alias declarations to a separate file which is
	produced when calling makegdkalias.pl -def
	* gdk/Makefile.am (gdkaliasdef.c): Add a rule to generate this
	file.
	* gdk/*.c, gdk/x11/*.c: Include gdkalias.h after the other
	headers, include gdkaliasdef.c at the bottom.
2005-03-16 03:17:27 +00:00
Owen Taylor
93344f6dfe Add gdk_drawable_set_cairo_target().
2005-02-03  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkdrawable.[ch] gdkpixmap.c gdkwindow.c: Add
        gdk_drawable_set_cairo_target().

        * tests/testtreeflow.c (enum): Use grand not rand as a variable
        name because one of the cairo headers is pulling in stdlib.h.

        * tests/testcairo.c tests/Makefile.am: Add a simple cairo based
        example.

        * configure.in: Bump release to 2.7.0, gtk_binary_version to 2.7.0.

        * Require libpangocairo for all backends.
2005-02-03 23:29:02 +00:00
Matthias Clasen
a54f709c98 Fix docs. (#165163, Jeff Franks)
2005-01-25  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkwindow-x11.c (gdk_window_configure_finished): Fix
	docs.  (#165163, Jeff Franks)
2005-01-25 18:50:38 +00:00
Manish Singh
b37e0373ef Call GDK_DISPLAY_XDISPLAY with a display, not a window. Clean up the
Wed Jan 19 18:57:02 2005  Manish Singh  <yosh@gimp.org>

        * gdk/x11/gdkwindow-x11.c (gdk_window_get_frame_extents): Call
        GDK_DISPLAY_XDISPLAY with a display, not a window. Clean up the
        function a bit too.
2005-01-20 02:58:03 +00:00
Manish Singh
85c6f6eb76 Squash strict aliasing warning in _NET_VIRTUAL_ROOTS code.
Wed Jan 19 17:17:31 2005  Manish Singh  <yosh@gimp.org>

        * gdk/x11/gdkwindow-x11.c (gdk_window_get_frame_extents): Squash
        strict aliasing warning in _NET_VIRTUAL_ROOTS code.
2005-01-20 01:19:45 +00:00
Matthias Clasen
fbe8255db6 Precache the _NET_VIRTUAL_ROOTS atom.
2005-01-19  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkdisplay-x11.c: Precache the _NET_VIRTUAL_ROOTS
	atom.

	* gdk/x11/gdkwindow-x11.c (gdk_window_get_frame_extents):
	Support _NET_VIRTUAL_ROOTS.  (#163910, Carsten Haitzler)
2005-01-19 19:53:12 +00:00
Matthias Clasen
3f8461b769 Add pointer warping to GDK. (#160437)
2005-01-18  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdkdisplay.h:
	* gdk/x11/gdkwindow-x11.c (gdk_display_warp_pointer):
	* gdk/win32/gdkwindow-win32.c (gdk_display_warp_pointer): Add
	pointer warping to GDK.  (#160437)

	* gtk/gtkcolorsel.c (key_press): Use gdk_display_warp_pointer.
2005-01-18 20:59:31 +00:00
Søren Sandmann
63f2fd9614 Add sensitivity-changing timeout. Written by Christian Persch.
Wed Dec 22 14:22:19 2004  Søren Sandmann  <sandmann@redhat.com>

	* tests/testtoolbar.c (timeout_cb): Add sensitivity-changing
	timeout. Written by Christian Persch.

Wed Dec 22 14:14:02 2004  Søren Sandmann  <sandmann@redhat.com>

	Bug #161561

	* gdk/x11/gdkwindow-x11.c (tmp_{re,un}set_bg): Only set/reset the
	background for windows that get expose events.

	* gdk/gdkwindow.c (gdk_window_process_updates_internal): Remove
	hack to repaint !expose windows.
2004-12-22 19:25:24 +00:00
Owen Taylor
f266788e19 Squash strict aliasing warnings.
Tue Nov 16 19:26:30 2004  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkdnd-x11.c (_gdk_drag_get_protocol_for_display):
        Squash strict aliasing warnings.
2004-11-17 00:55:10 +00:00
Matthias Clasen
494a2271a2 Add a hint about using gdk_drawable_get_size() instead.
2004-11-09  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkwindow-x11.c (gdk_window_get_geometry): Add
	a hint about using gdk_drawable_get_size() instead.
2004-11-09 20:10:23 +00:00
Matthias Clasen
d5f92150d4 Fix many sparse warnings. 2004-10-28 15:00:05 +00:00
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
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
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
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
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
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
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
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
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
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