Commit Graph

327 Commits

Author SHA1 Message Date
Cody Russell
273c94e194 Win32 drop shadow goodness
svn path=/trunk/; revision=17643
2007-04-25 23:44:54 +00:00
Elijah Newren
9384ea655c Patch from Matthias to add support for the _NET_WM_USER_TIME_WINDOW EWMH
2007-03-31  Elijah Newren  <newren gmail com>

	* gdk/x11/gdkwindow-x11.c (setup_toplevel_window,
	  gdk_x11_window_set_user_time):
	Patch from Matthias to add support for the
	_NET_WM_USER_TIME_WINDOW EWMH protocol; see #354213.

	WARNING: This patch will make metacity <= 2.18.0 freeze on
	workspace switch.  This is due to a weird problem that should only
	affect window managers using gdk in-process for decoration drawing
	and which make an unsafe assumption relating to doing so (i.e. it
	should only affect metacity).  Upgrade your version of metacity if
	you hit this bug.

svn path=/trunk/; revision=17574
2007-04-01 03:38:34 +00:00
Emmanuele Bassi
87c28d778a Apply patch by Vytautas Liuolia for changing the startup notification id
2007-03-13  Emmanuele Bassi  <ebassi@gnome.org>

	Apply patch by Vytautas Liuolia for changing the startup
	notification id on a window in the X11 backend. (#347375)

	* gdk/gdk.h:
	* gdk/gdkx.h:
	* gdk/x11/gdkdisplay-x11.c: Add gdk_notify_startup_complete_wit_id()
	and gdk_x11_display_get_startup_notification_id().

	* gdk/gdkwindow.h:
	* gdk/x11/gdkwindow-x11.c: Add gdk_window_set_startup_id().

	* gtk/gtkwindow.h:
	* gtk/gtkwindow.c: Add gtk_window_set_startup_id(), used to
	change the startup notification id.
	
	(gtk_window_class_init), (gtk_window_init),
	(gtk_window_set_property): Add write-only "startup-id" property
	to GtkWindow.

	(gtk_window_realize): Set the startup notification id
	on a GtkWindow if it's valid.

	(gtk_window_map): If we have another valid startup notification
	id then finish the notification process.

svn path=/trunk/; revision=17508
2007-03-13 17:03:54 +00:00
Matthias Clasen
82ce59cd0f Remove unnecessary NULL checks before g_free(). (#369666, Morten Welinder,
2007-03-09  Matthias Clasen <mclasen@redhat.com>

        * Everywhere: Remove unnecessary NULL checks before
        g_free().  (#369666, Morten Welinder, Djihed Afifi)

        * configure.in: Check for ftw.h



svn path=/trunk/; revision=17444
2007-03-09 21:57:37 +00:00
Matthias Clasen
1a2274e7be Be more careful about toplevel possibly being NULL. (#402453, Sebastian
2007-01-30  Matthias Clasen  <mclasen@redhat.com>

        * gdk/x11/gdkwindow-x11.c (gdk_x11_window_move_to_current_desktop):
        (gdk_x11_window_set_user_time): Be more careful about toplevel
        possibly being NULL.  (#402453, Sebastian Bacher)



svn path=/trunk/; revision=17236
2007-01-30 18:36:44 +00:00
Matthias Clasen
1c2718400d Apply a patch by Chris Wilson to avoid spurious valgrind warnings from
2007-01-03  Matthias Clasen  <mclasen@redhat.com>

        * gtk/*.c:
        * gdk/x11/*.c: Apply a patch by Chris Wilson to
        avoid spurious valgrind warnings from XSendEvent()
        calls.  (#392532)

svn path=/trunk/; revision=17044
2007-01-04 01:28:07 +00:00
Matthias Clasen
241ff0b6bd Cleanups 2006-10-08 05:32:07 +00:00
Michael Natterer
06e446c60d Fix build.
2006-08-31  Michael Natterer  <mitch@imendio.com>

	* gdk/x11/gdkwindow-x11.c (gdk_window_beep): Fix build.
2006-08-31 08:41:32 +00:00
Matthias Clasen
e28876d95e Fix gdk_window_beep 2006-08-30 16:02:41 +00:00
Matthias Clasen
6760faeb4b Add a function to beep on a window. For X11, implement this with XkbBell.
2006-08-29  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdkwindow.h:
	* gdk/gdk.symbols:
	* gdk/directfb/gdkwindow-directfb.c (gdk_window_beep):
	* gdk/win32/gdkwindow-win32.c (gdk_window_beep):
	* gdk/quartz/gdkwindow-quartz.c (gdk_window_beep):
	* gdk/x11/gdkwindow-x11.c (gdk_window_beep): Add a function
	to beep on a window. For X11, implement this with
	XkbBell.  (#353455, Mariano Suárez-Alvarez)
2006-08-30 03:30:43 +00:00
Tor Lillqvist
1c816b805c Add Win32 detail to doc comments.
2006-08-23  Tor Lillqvist  <tml@novell.com>

	* gdk/x11/gdkwindow-x11.c (gdk_window_shape_combine_mask)
	(gdk_window_input_shape_combine_mask)
	gdk_window_shape_combine_region)
	(gdk_window_input_shape_combine_region): Add Win32 detail to doc
	comments.
2006-08-23 00:25:10 +00:00
Matthias Clasen
da54d67905 Use XAllocSizeHints to allocate the XSizeHints struct. (#249285, David
2006-08-15  Matthias Clasen  <mclasen@redhat.com>

        * gdk/x11/gdkwindow-x11.c (gdk_window_get_geometry_hints):
        Use XAllocSizeHints to allocate the XSizeHints struct.
        (#249285, David Baron)
2006-08-15 05:53:58 +00:00
Matthias Clasen
bb279057f3 Zero out some stack-allocated X structures, to avoid valgrind warnings
2006-08-15  Matthias Clasen  <mclasen@redhat.com>

        * gdk/x11/gdkdnd-x11.c (gdk_window_register_dnd):
        * gdk/x11/gdkwindow-x11.c (gdk_window_set_decorations):
        (gdk_window_set_functions): Zero out some stack-allocated
        X structures, to avoid valgrind warnings about uninitialized
        memory.  (#349382, David Baron)
2006-08-15 05:46:08 +00:00
Michael Natterer
8022523767 cast the return value of XGetWindowProperty() correctly so we don't return
2006-07-27  Michael Natterer  <mitch@imendio.com>

	* gdk/x11/gdkwindow-x11.c (gdk_window_get_type_hint): cast the
	return value of XGetWindowProperty() correctly so we don't return
	garbage type hints. Pointed out by Tommi Komulainen, patch taken
	from https://maemo.org/bugzilla/show_bug.cgi?id=724
2006-07-27 15:22:13 +00:00
Matthias Clasen
72c77cf67c Update the docs. (#345194, Yevgen Muntyan)
2006-06-20  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkwindow-x11.c (gdk_window_set_functions): Update
	the docs. (#345194, Yevgen Muntyan)
2006-06-20 04:30:11 +00:00
Matthias Clasen
02ed1e9bdb Make GTK+ work as an untrusted X client. (#136571, Ed Catmur)
2006-05-25  Matthias Clasen  <mclasen@redhat.com>

	Make GTK+ work as an untrusted X client. (#136571,
	Ed Catmur)
2006-05-25 05:30:14 +00:00
Søren Sandmann
6cb19cf3ad gtk/gtklayout.c (gtk_layout_realize), gtk/gtkiconview.c
Mon May 15 15:12:05 2006  Søren Sandmann  <sandmann@redhat.com>

	* gtk/gtklayout.c (gtk_layout_realize),
	* gtk/gtkiconview.c (gtk_icon_view_realize),
	* gtk/gtktreeview.c (gtk_tree_view_realize): Set the background of
	the clip windows to NULL, since they are generally invisible and
	don't have EXPOSURE set, which means they temp-unvlicker code
	doesn't apply to them.

	* gdk/x11/gdkgeometry-x11.c (_gdk_window_move_resize_child): Unset
	the background of the parent window during resizing. Invalidate
	the uncoered area of the parent window. Bug 341332.
2006-05-15 19:17:30 +00:00
Matthias Clasen
f22387f042 Remove extraneous ; 2006-05-14 03:58:06 +00:00
Søren Sandmann
b9d1a03440 Create 'composited' label.
Tue Apr 25 10:25:28 2006  Søren Sandmann  <sandmann@redhat.com>

	* tests/testgtk.c (create_alpha_window): Create 'composited' label.

	* tests/testgtk.c (on_composited_changed): New function, change
	the label to say whether the screen is composited or not.

	* gtk/gtkwindow.c (gtk_window_on_composited_changed): When
	composited status change, invalidate the window and propagate the signal;.

	* gtk/gtkwindow.c (gtk_window_map): Set the appropriate type hint
	if reset_type_hint is TRUE.

	* gtk/gtkwindow.c (gtk_window_set_type_hint): If hint is one of
	the old hints, store a shadow copy in the public window->type_hint
	bitfield, otherwise set this field to normal. Set the private
	field to the type hint.

	* gtk/gtkwindow.c (gtk_window_init): Initialize priv->type_hint.

	* gtk/gtkwindow.c (struct _GtkWindowPrivate): New field
	"reset_type_hint" indicating whether the type hint needs to be
	reset. New field type_hint containing a GdkWindowTypeHint.

	* gtk/gtkwidget.c (propagate_composited_changed): New function to
	propagate changes in composited status.
	(gtk_widget_class_init): Add composited_changed signal.

	* gtk/gtkwidget.h (struct _GtkWidgetClass): New signal composited-changed.

	* gtk/gtkwidget.c (gtk_widget_is_composited): New function.

	* gtk/gtktooltips.c (gtk_tooltips_draw_tips): Set transient for.

	* gtk/gtktooltips.c (gtk_tooltips_force_window): Set the type hint

	* gtk/gtkmenuitem.c (gtk_menu_item_position_menu): Compute whether
	the item belongs to a menubar. Set the type_hint appropriately
	depending on the outcome.

	* gtk/gtkmenu.c (gtk_menu_position): Set the default type hint here.

	* gtk/gtkmenu.c (gtk_menu_attach_to_widget): connect to hierarchy
	changed on the attach widget.

	* gtk/gtkmenu.c (attach_widget_hierarchy_changed): New function to
	set the transient_for property for menus.

	* gtk/gtkdnd.c (set_icon_stock_pixbuf): Set the appropriate type hint.

	* gtk/gtkcombo.c (gtk_combo_popup_list): Make the popup window
	transient for the toplevel.

	* gtk/gtkcombobox.c (gtk_combo_box_set_popup_widget): Set
	transient-for, for the popup window.

	* gdk/x11/gdkwindow-x11.c (gdk_window_get_type_hint): Support for
	new window types.

	* gdk/x11/gdkwindow-x11.c (gdk_window_set_type_hint): Add support
	for new window types.

	* gdk/x11/gdkscreen-x11.c (_gdk_x11_screen_process_owner_change):
	New function called whenever the compositing manager comes and goes.

	* gdk/x11/gdkscreen-x11.c (gdk_screen_is_composited): New function.

	* gdk/x11/gdkscreen-x11.c
	(_gdk_x11_screen_request_cm_notification, make_cm_atom,
	check_is_composited): New functions

	* gdk/x11/gdkevents-x11.c (gdk_event_translate): Call
	_gdk_x11_screen_process_owner_change when an
	XFixesSelectionNotifyEvent is received.

	* gdk/x11/gdkdisplay-x11.c (gdk_display_open): Call
	_gdk_x11_screen_request_cm_notification() on all screens.

	* gdk/quartz/gdkscreen-quartz.c (gdk_screen_is_composited): Dummy
	implementation.

	* gdk/gdkscreen.c (gdk_screen_class_init): New signal,
	'composited-changed'.

	* gdk/gdkwindow.h: Add new EWMH window types.

	* gdk/win32/gdkscreen-win32.c (gdk_screen_is_composited)
2006-04-25 14:27:32 +00:00
Matthias Clasen
dfc29f83ae Avoid a possible array overrun. (Coverity)
2006-04-16  Matthias Clasen <mclasen@redhat.com>

        * gdk/x11/gdkwindow-x11.c (set_initial_hints ): Avoid a
        possible array overrun.  (Coverity)
2006-04-16 05:05:49 +00:00
Matthias Clasen
10f0736ac7 Use G_DEFINE_TYPE.
2006-04-04  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdkdisplay.c:
	* gdk/gdkdisplaymanager.c:
	* gdk/gdkdraw.c:
	* gdk/gdkkeys.c:
	* gdk/gdkpixmap.c:
	* gdk/gdkscreen.c:
	* gdk/gdkwindow.c:
	* gdk/x11/gdkcolor-x11.c:
	* gdk/x11/gdkdisplay-x11.c:
	* gdk/x11/gdkdnd-x11.c:
	* gdk/x11/gdkdrawable-x11.c:
	* gdk/x11/gdkgc-x11.c:
	* gdk/x11/gdkimage-x11.c:
	* gdk/x11/gdkinput.c:
	* gdk/x11/gdkpixmap-x11.c:
	* gdk/x11/gdkscreen-x11.c:
	* gdk/x11/gdkwindow-x11.c: Use G_DEFINE_TYPE.

	* gdk/x11/gdkcolor-x11.c:
	* gdk/x11/gdkdnd-x11.c:
	* gdk/x11/gdkimage-x11.c: Use instance private data.
2006-04-04 14:02:03 +00:00
Matthias Clasen
1ad93a683b Support input shapes: (#331070)
2006-02-19  Matthias Clasen  <mclasen@redhat.com>

	Support input shapes:  (#331070)

	* gdk/gdk.symbols:
	* gdk/gdkdisplay.h:
	* gdk/gdkwindow.h:
	* gdk/x11/gdkdisplay-x11.c (gdk_display_supports_shapes)
	(gdk_display_supports_input_shapes): Functions to determine
	if a display supports shaped windows or input shapes.

	* gdk/x11/gdkwindow-x11.c (gdk_window_input_shape_combine_region):
	(gdk_window_input_shape_combine_mask):
	(gdk_window_set_child_input_shapes):
	(gdk_window_merge_child_input_shapes): Input shape versions
	of the window shape API.

	* gtk/gtk.symbols:
	* gtk/gtkwidget.h:
	* gtk/gtkwidget.c (gtk_widget_input_shape_combine_mask):
	New function to set an input shape on a widget.
2006-02-20 01:36:50 +00:00
Matthias Clasen
5453f11464 Clean up properly if the grab fails. (finish_drag): Don't leak a reference
2006-01-11  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkwindow-x11.c (create_moveresize_window): Clean
	up properly if the grab fails.
	(finish_drag): Don't leak a reference to moveresize_window
	here.
2006-01-11 14:54:05 +00:00
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
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
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
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
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
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
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
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
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
Matthias Clasen
424433f1a4 Add support for EWMH "Above" and "Below" window states. (105100, Manuel Clos) 2003-08-10 23:37:37 +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
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
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
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
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
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
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
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
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
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
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
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
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