Commit Graph

1988 Commits

Author SHA1 Message Date
Matthias Clasen
b19cda7c37 Add gdk_cairo_set_source_pixmap. (#318805, Alexander Larsson)
2005-12-30  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdk.symbols:
	* gdk/gdkcairo.h:
	* gdk/gdkcairo.c: Add gdk_cairo_set_source_pixmap.  (#318805,
	Alexander Larsson)
2005-12-30 07:16:35 +00:00
Matthias Clasen
7f414f6b69 Call gdk_display_manager_set_default_display() to change the default
2005-12-30  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdkdisplaymanager.c (gdk_display_manager_set_property): Call
	gdk_display_manager_set_default_display() to change the default
	display.  (#153623, Stefan Kost)
2005-12-30 06:32:30 +00:00
Matthias Clasen
1963c67c46 Fix a typo. (gdk_screen_get_setting): Avoid relocations for the settings
2005-12-27  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkevents-x11.c (check_transform): Fix a typo.
	(gdk_screen_get_setting): Avoid relocations for the settings
	map.
2005-12-27 07:57:52 +00:00
Matthias Clasen
3a46c7f11e Fix a typo.
2005-12-27  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkevents-x11.c (check_transform): Fix a typo.
2005-12-27 07:39:19 +00:00
Matthias Clasen
86838ffd06 Avoid relocations for the list of standard atoms.
2005-12-27  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkproperty-x11.c: Avoid relocations for the list
	of standard atoms.
2005-12-27 07:36:58 +00:00
Matthias Clasen
165b7ad3d3 Precache atoms before calling gdk_window_new().
2005-12-26  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkdisplay-x11.c (gdk_display_open): Precache atoms
	before calling gdk_window_new().
2005-12-27 04:38:31 +00:00
Matthias Clasen
8083b8ef6a Inline docs, use g_assert(), avoid extra allocation for rectangular
2005-12-24  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdkregion-generic.c:
	* gdk/gdkpolyreg-generic.c:
	* gdk/gdkregion.h:
	* gdk/gdkrectangle.c: Inline docs, use g_assert(), avoid
	extra allocation for rectangular regions.
2005-12-24 07:29:00 +00:00
Matthias Clasen
7f00877312 Inline docs.
2005-12-24  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdkrectangle.c: Inline docs.
2005-12-24 07:00:47 +00:00
Matthias Clasen
fe0fb8966d Use the slice allocator for regions. Still todo: avoid extra allocations
2005-12-21  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdkregion-generic.c: Use the slice allocator
	for regions. Still todo: avoid extra allocations for
	the single-rectangle case.
2005-12-21 21:10:41 +00:00
Matthias Clasen
d126427e67 Another doc update 2005-12-20 05:35:15 +00:00
Matthias Clasen
7fe23c05cf Documentation updates 2005-12-20 05:33:19 +00:00
Matthias Clasen
c7778a8600 Fix an oversight 2005-12-11 04:25:52 +00:00
Matthias Clasen
73696ef8be Don't ignore errors from g_option_context_parse().
2005-12-06  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdk.c (gdk_parse_args):
	* gtk/gtkmain.c (gtk_parse_args): Don't ignore errors
	from g_option_context_parse().
2005-12-06 16:44:31 +00:00
Tim Janik
83344dae85 fix missing hash table initialization.
Tue Dec  6 11:37:59 2005  Tim Janik  <timj@gtk.org>

        * gdk/gdkevents.c (gdk_event_new): fix missing hash table
        initialization.
2005-12-06 10:40:09 +00:00
Michael Natterer
40894e9a49 map the new GtkSettings properties "timeout-initial", "timeout-repeat",
2005-12-05  Michael Natterer  <mitch@imendio.com>

	* gdk/x11/gdkevents-x11.c: map the new GtkSettings properties
	"timeout-initial", "timeout-repeat", "color-scheme" and
	"enable-enimations" to X settings.
2005-12-05 21:06:57 +00:00
Matthias Clasen
3353d528b4 Use g_slice instead of mem chunks.
2005-12-05  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdkevents.c:
	* gdk/gdkcolor.c: Use g_slice instead of mem chunks.
2005-12-05 20:51:18 +00:00
Tor Lillqvist
2aadb2dff2 Implement the conditional use of FlashWindowEx() properly for MSVC
2005-11-28  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkwindow-win32.c (gdk_window_set_urgency_hint):
	Implement the conditional use of FlashWindowEx() properly for MSVC
	compilations. The code was confusingly assuming that if compiled
	with a "new" compiler, it will only be run on "new" Windows
	versions. We want it to run on "old" versions, too, even if
	compiled with a "new" compiler. There are two orthogonal issues:
	whether the compiler defines the necessary API in its headers, and
	whether it is present at run-time. (#318077)
2005-11-28 08:40:56 +00:00
Tor Lillqvist
3ff34d06e8 Once again rework Win32 window decoration code. Doesn't break #104514. The
2005-11-27  Tor Lillqvist  <tml@novell.com>

	Once again rework Win32 window decoration code. Doesn't break
	#104514. The dialogs in gtk-demo now have the same decorations and
	behaviour as on X11. Tried to fix #322516 but it seems very hard
	to make the trivial sample program there behave as expected. OTOH,
	simply moving the gtk_window_decorate() call in the #322516 sample
	program after the call to gtk_widget_show() helps...

	* gdk/win32/gdkwindow-win32.c (set_or_clear_style_bits): Revert to
	the correct semantics. Each call to gdk_window_set_decorations()
	which calls this function is supposed to affect all decorations.

	(decorate_based_on_hints): New function, looks at both geometry
	hints and type hint and sets window decorations based on
	that. Consolidate code from gdk_window_set_geometry_hints() and
	gdk_window_set_type_hint() here.

	(gdk_window_set_geometry_hints, gdk_window_set_type_hint): Call
	decorate_based_on_hints().
2005-11-27 02:58:09 +00:00
Tor Lillqvist
575149342b Revert to the correct semantics. (#322516)
2005-11-27  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkwindow-win32.c (set_or_clear_style_bits): Revert to
	the correct semantics. (#322516)
	(gdk_window_set_geometry_hints): Adjust call correspondingly.
2005-11-27 00:20:55 +00:00
Anders Carlsson
1097260aa7 Add quartz backend.
2005-11-21  Anders Carlsson  <andersca@imendio.com>

        * configure.in:
        * gtk/Makefile.am:
        * gdk/Makefile.am:
	* gdk/quartz/*:
	Add quartz backend.

        * docs/tools/Makefile.am:
	Only build docshooter when the X11 backend is used.

        * gtk/gtkplug-stub.c:
	Include gtkplug.h here.

        * gtk/gtksocket-stub.c:
	Include gtksocket.h here.
2005-11-22 10:03:32 +00:00
Michael Natterer
6e802acd48 new internal function which destroys the display's event source. Also
2005-11-16  Michael Natterer  <mitch@imendio.com>

	* gdk/x11/gdkevents-x11.c (_gdk_events_uninit): new internal
	function which destroys the display's event source. Also removes
	the source from the global display_sources list and unrefs it.

	* gdk/x11/gdkprivate-x11.h: declare the function.

	* gdk/x11/gdkdisplay-x11.c (gdk_display_x11_dispose): call it
	instead of half-destroying the source here.
2005-11-16 12:36:22 +00:00
Michael Natterer
1500848841 destroy display->xid_ht as late as possible (right before XCloseDisplay)
2005-11-15  Michael Natterer  <mitch@imendio.com>

	* gdk/x11/gdkdisplay-x11.c (gdk_display_x11_finalize): destroy
	display->xid_ht as late as possible (right before XCloseDisplay)
	because it still needs to be around when the display's screens are
	finalized. (#85715)
2005-11-15 14:42:48 +00:00
Matthias Clasen
c0b7b9e651 Documentation improvements. (#321338)
2005-11-13  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdkcolor.c (gdk_color_parse): Documentation
	improvements.  (#321338)
2005-11-14 04:34:43 +00:00
Matthias Clasen
6556787e0a Remove an erroneous semicolon.
2005-11-10  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkcolor-x11.c (gdkx_colormap_get): Remove an erroneous
	semicolon.
2005-11-10 17:42:48 +00:00
Matthias Clasen
83e2e23fe1 Don't corrupt odd keymaps (#316638, Kean Johnston)
2005-11-10  Matthias Clasen  <mclasen@redhat.com>

	Don't corrupt odd keymaps (#316638, Kean Johnston)

	* gdk/x11/gdkkeys-x11.c (set_symbol): Auxiliary function to
	handle frobbing keymaps with odd numbers of syms/code.

	* gdk/x11/gdkkeys-x11.c (update_keymaps): Use set_symbol() to
	frob the keymap.
2005-11-10 17:38:09 +00:00
Michael Natterer
8bdc0bf97c Applied patch from maemo-gtk that addresses many issues wrt display
2005-11-10  Michael Natterer  <mitch@imendio.com>

	Applied patch from maemo-gtk that addresses many issues wrt
	display migration and display closing (bug #85715).

	* gdk/gdkdisplay.c (gdk_display_dispose): don't just set the
	default display to NULL when it's closed. Instead set the most
	recently opened display as new default (if one exists).

	* gdk/gdkpango.c (on_renderer_display_closed): fixed signature
	of this callback.

	* gdk/gdkscreen.c (gdk_screen_dispose): check if the GCs still
	exist before unrefing them.

	* gdk/gdkwindow.c (_gdk_window_destroy_hierarchy): if the screen
	is closed, allow destruction of the root window.

	* gdk/x11/gdkdisplay-x11.c: moved some stuff from finalize() to
	dispose(), free stuff that was leaked before.

	* gdk/x11/gdkevents-x11.c (_gdk_x11_events_uninit_screen): check if
	the xsettings_client still exists before destroying it.

	* gdk/x11/gdkkeys-x11.c: added finalization and free the allocated
	X resources.

	* gdk/x11/gdkpixmap-x11.c: moved stuff from finalize() to new
	dispose() implementation.

	* gdk/x11/gdkscreen-x11.c: moved stuff from finalize() to
	dispose() and check if it still exists before unrefing it. Set
	their pointers to NULL/None *after* upchaining in dispose(),
	because X11 implementations of members of the parent class still
	need them for their own destruction.

	* gdk/x11/gdkvisual-x11.c: removed finalize() implementation which
	was g_error()ing when finalizing a visual.

	* gtk/gtkclipboard.c (gtk_clipboard_finalize): don't use
	get_clipboard_widget() because it would create the widget if it
	doesn't exist. Use g_object_get_data() directly instead.

	* gtk/gtktextdisplay.c (on_renderer_display_closed): fixed signature
	of this callback.
2005-11-10 12:09:42 +00:00
Tor Lillqvist
3b9a63ec6e gdk/gdkinternals.h Add new GDK_DEBUG_DRAW flag to the GdkDebugFlag enum.
2005-11-09  Tor Lillqvist  <tml@novell.com>

	* gdk/gdkinternals.h
	* gdk/gdk.c (gdk_debug_keys[]): Add new GDK_DEBUG_DRAW flag to
	the GdkDebugFlag enum.

	* gdk/win32/gdkdrawable-win32.c: Use DRAW to trigger GDK_NOTEs in
	this file instead of MISC. Now asking for MISC will give mainly
	window manipulation debugging output.
2005-11-09 13:10:27 +00:00
Tor Lillqvist
9b5c5f9db5 Remove unnecessary includes.
2005-11-09  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkwindow-win32.c: Remove unnecessary includes.

	(_gdk_win32_get_adjusted_client_rect): Remove this two-line
	function which was used only in one place.

	(get_outer_rect): Use _gdk_win32_adjust_client_rect().

	(gdk_window_set_geometry_hints): If we have identical minimum and
	maximum size hints, remove the resize and maximize
	decorations/functions. (#104514)

	If we have a maximum size hint, remove the maximize
	decoration/function but ensure the resize decoration/function is
	available. Otherwise ensure both resize and maximize
	decorations/functions are there.

	(set_or_clear_style_bits): Factored out common code from
	gdk_window_set_decorations() and gdk_window_set_functions().

	Hack the window style setting once more: Only touch the window
	style bits corresponding to the GdkWMDecoration or GdkWMFunction
	parameter bitmasks. Hopefully this finally is the correct thing to
	do. We used to clear all other bits than those that were being
	set, or set all other bits than those that were being cleared.

	Take into account that adding or removing decorations leaves the
	window's outer size unchanged, i.e., the client area's size and
	position change. This is apparently not what we want, so change
	also the window's (outer) position and size appropriately so that
	the client area's position and size stay constant.

	gtk-demo's color selector dialog is now non-resizable like on X11
	(I tested with metacity in GNOME). Torn off menus are shrinkable
	vertically but have a maximum size, and are not maximizable or
	minimizable, like on X11.

	(gdk_window_set_decorations, gdk_window_set_functions): Let
	set_or_clear_decorations() do most of the job.

	* gdk/win32/gdkprivate-win32.h: Remove declaration of
	_gdk_win32_get_adjusted_client_rect().
2005-11-09 12:35:56 +00:00
Tor Lillqvist
64f1e8378b gdk/win32/gdkwindow-win32.h (struct _GdkWindowImplWin32) Store the type
2005-11-09  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkwindow-win32.h (struct _GdkWindowImplWin32)
	* gdk/win32/gdkwindow-win32.c (gdk_window_impl_win32_init,
	gdk_window_get_type_hint, gdk_window_get_type_hint): Store the
	type hint. Implement gdk_window_get_type_hint() by just returning
	the hint stored.
2005-11-09 02:13:35 +00:00
Tor Lillqvist
d08d2c2bd4 Remove code that has been permanently ifdeffed out for two years.
2005-11-09  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkwindow-win32.c (gdk_window_set_geometry_hints):
	Remove code that has been permanently ifdeffed out for two years.
2005-11-08 22:27:47 +00:00
Matthias Clasen
15d5ffae32 Unref tile and stipple when finalizing a gc. (#320789, Nickolay V.
2005-11-08  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdkgc.c (gdk_gc_finalize): Unref tile and stipple when
	finalizing a gc.  (#320789, Nickolay V. Shmyrev)
2005-11-08 21:46:34 +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
Tor Lillqvist
90942c4fef Fix also the other place where maskstride was calculated. 2005-11-07 12:05:43 +00:00
Tor Lillqvist
449f16b238 Correct the calculation of maskstride. (#320152, Peter Zelezny)
2005-11-07  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkcursor-win32.c (pixbuf_to_hbitmaps_normal):
	Correct the calculation of maskstride. (#320152, Peter Zelezny)
2005-11-07 08:16:29 +00:00
Tor Lillqvist
bd9e367de7 (pixbuf_to_hbitmaps_alpha_winxp): Use an 1-bit mask bitmap, like
2005-11-06  Tor Lillqvist  <tml@novell.com>

	(pixbuf_to_hbitmaps_alpha_winxp): Use an 1-bit mask bitmap,
	like pixbuf_to_hbitmaps_normal().
	(_gdk_win32_pixbuf_to_hicon_supports_alpha): Check
	G_WIN32_IS_NT_BASED() first, so we can pretend being on Win9x by
	setting the G_WIN32_PRETEND_WIN9X environment variable.

2005-11-06  Tor Lillqvist  <tml@novell.com>

	Make icon masks work on Win98 (#320152, Peter Zelezny)

	* gdk/win32/gdkcursor-win32.c (create_color_bitmap): Take also a
	parameter for the depth of the bitmap, so that this function can
	be used to create 1-bit bitmaps, too.
	(pixbuf_to_hbitmaps_normal): Create an 1-bit bitmap for the mask,
	and initialize it properly.
2005-11-06 05:36:49 +00:00
Tor Lillqvist
72ea12fec0 As there is only one GdkDisplay in the Win32 backend, check that
2005-11-03  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkcursor-win32.c: As there is only one GdkDisplay in
	the Win32 backend, check that GdkDisplay* parameters are equal to
	_gdk_display instead of using the unnecessarily general
	GDK_IS_DISPLAY().
2005-11-03 13:44:37 +00:00
Tor Lillqvist
5551fc6754 Rename the variables for the color bitmap to have "color" in their name,
2005-11-03  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkcursor-win32.c (pixbuf_to_hbitmaps_alpha_winxp):
	Rename the variables for the color bitmap to have "color" in their
	name, for similarity with pixbuf_to_hbitmaps_normal(). Create a
	color bitmap for the mask, too, instead of creating a b&w bitmap
	with CreateBitmap(). Set up the mask bitmap's contents, ones for
	those pixels in the color bitmap where the alpha is zero, zero for
	other pixels. We used to use an unitialized mask bitmap! This
	meant that icons and cursors created presumably worked more or
	less by accident. Totally blank icons with zero alpha everywhere
	(as used by gtktrayicon.c) definitely did not work as expected.
2005-11-03 13:29:30 +00:00
Tor Lillqvist
c2c55f8385 gdk/win32/gdkcolor-win32.c gdk/win32/gdkscreen-win32.c Whitespace
2005-11-02  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkcolor-win32.c
	* gdk/win32/gdkscreen-win32.c
	* gdk/win32/gdkwindow-win32.c: Whitespace consistency
	fixes. Remove superfluous test for GdkWindow* parameters being
	non-NULL. Testing GDK_IS_WINDOW() is enough. As there is only one
	GdkScreen and one GdkDisplay in the Win32 backend, use those
	variables instead of the getter functions. For GdkDisplay* and
	GdkScreen* parameters, check that they are equal to the
	corresponding singleton variables instead of the more general
	GDK_IS_DISPLAY() or GDK_IS_SCREEN().
2005-11-02 13:33:27 +00:00
Tor Lillqvist
4d1b5589c5 gdk/win32/gdkprivate-win32.h gdk/win32/gdkglobals-win32.c Add more
2005-11-01  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkprivate-win32.h
	* gdk/win32/gdkglobals-win32.c
	* gdk/win32/gdkmain-win32.c (_gdk_windowing_init): Add more
	pre-interned GdkAtoms and pre-registered clipboard formats. Sort
	their declarations, definitions and assignments into a more
	logical and consistent order.

	* gdk/win32/gdkmain-win32.c (_gdk_win32_cf_to_string): Include the
	CF_ prefix for the predefined clipboard format names. Put quotes
	around registered format names to distinguish them.

	* gdk/win32/gdkproperty-win32.c (gdk_property_change): Return
	immediately with a warning if the property type is STRING, TEXT,
	COMPOUND_TEXT or SAVE_TARGETS, as these are X11-specific that we
	should never pretend to handle on Win32. Handle only UTF8_STRING
	here, other formats with delayed rendering. Use \uc1 instead of
	\uc0 when generating Rich Text Format for easier testability on
	XP, where WordPad misinterprets \uc0 encoded characters. Add more
	GDK_NOTE debugging output for Clipboard operations.

	* gdk/win32/gdkselection-win32.c: Debugging printout improvements.
	(gdk_selection_convert): Don't pretent to handle STRING, just
	UTF8_STRING. Streamline error handling, don't unnecessarily have a
	GError which then isn't used for anything anyway if it gets set.
	(gdk_win32_selection_add_targets): Skip also STRING, TEXT,
	COMPOUND_TEXT and SAVE_TARGETS in addition to UTF8_STRING.
2005-11-01 15:29:59 +00:00
Matthias Clasen
d2a58a39bd use $(GLIB_MKENUMS) instead of glib-mkenums. (#318582, Damien Carbery)
2005-10-26  Matthias Clasen  <mclasen@redhat.com>

        * */Makefile.am: use $(GLIB_MKENUMS) instead of
        glib-mkenums.  (#318582, Damien Carbery)
2005-10-26 18:01:05 +00:00
Matthias Clasen
653a6dd9db Fix #317844 2005-10-26 13:42:53 +00:00
Matthias Clasen
f10f85793d Make the initialization of screen_x11->xft_rgba more explicit. (#319627,
2005-10-25  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkxftdefaults.c (init_xft_settings): Make the
	initialization of screen_x11->xft_rgba more explicit.  (#319627,
	Bogdan Nicula)
2005-10-25 18:11:57 +00:00
Matthias Clasen
f2724a2515 Add settings to hide the input method and Unicode control character
2005-10-24  Matthias Clasen  <mclasen@redhat.com>

        Add settings to hide the input method and Unicode control character
        submenus in the context menus of GtkEntry and GtkTextView.

        * gdk/x11/gdkevents-x11.c: Map GTK+ settings to X settings.

        * gtk/gtksettings.c (gtk_settings_class_init): Declare GTK+ settings here.

        * gtk/gtktextview.c (popup_targets_received):
        * gtk/gtkentry.c (popup_targets_received): Use the settings here.
2005-10-24 20:01:57 +00:00
Tor Lillqvist
e6fa7394ba Remove the clipboard viewer code. It didn't really do anything useful, and
2005-10-14  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkdisplay-win32.c: Remove the clipboard viewer code.
	It didn't really do anything useful, and was just confusing and
	incomplete. Comments claimed we don't do delayed rendering, but in
	fact we do, for images. (The delayed rendering code has other
	problems, though, see #168173.) The clipboard viewer code was
	probably even buggy (the WM_CHANGECBCHAIN handled didn't propagate
	the message when necessary). It was just test code, it said so in
	a comment. Add something similar back later if necessary.

	(_win32_on_clipboard_change,
	_gdk_win32_register_clipboard_notification): Remove.

	(gdk_display_supports_selection_notification,
	gdk_display_request_selection_notification): Always just return
	FALSE. We didn't generate any GDK_OWNER_CHANGE events anywhere.
2005-10-14 00:08:14 +00:00
Tor Lillqvist
d297ff329f Don't treat Alt-Enter specially. It does not have any special meaning and
2005-10-13  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkevents-win32.c (gdk_event_translate): Don't treat
	Alt-Enter specially. It does not have any special meaning and
	should be passed on to the application. (#318378, Tim Evans)
2005-10-13 07:21:00 +00:00
Tor Lillqvist
b25e6c5b05 Set visual depth to 24 for 32 bits-per-pixel devices on Win32. This allows
2005-10-13  Tor Lillqvist  <tml@novell.com>

	Set visual depth to 24 for 32 bits-per-pixel devices on
	Win32. This allows gdk_drawable_real_draw_pixbuf() to use the
	optimized composite_0888() function rather than the slower image
	dithering functions to draw pixbufs (#313993, John Ehresman)

	* gdk/win32/gdkimage-win32.c (_gdk_win32_new_image): Use
	_gdk_windowing_get_bits_for_depth() to initialize
	GdkImage::bits_per_pixel.
	(_gdk_windowing_get_bits_for_depth): Return 32 bits for depth 24.

	* gdk/win32/gdkpixmap-win32.c (gdk_pixmap_new): Use
	_gdk_windowing_get_bits_for_depth() to initialize
	BITMAPINFOHEADER::biBitCount.

	* gdk/win32/gdkvisual-win32.c (_gdk_visual_init): Set
	GdkVisual::depth to 24 even if GetDeviceCaps(BITSPIXEL) returns
	32.
2005-10-13 07:08:49 +00:00
Tor Lillqvist
ef2c2326f0 In case BitBlt() fails with ERROR_INVALID_HANDLE, the most probable cause
2005-10-01  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkdrawable-win32.c (blit_from_pixmap): In case
	BitBlt() fails with ERROR_INVALID_HANDLE, the most probable cause
	is that the the desktop isn't visible because the session has been
	switched, the screen is locked, or a terminal server session
	disconnected, so no error message necessary. (#137796)

	It is of course remotely possible that BitBlt() failing with
	ERROR_INVALID_HANDLE might also be caused by some other
	problem. We could strive for perfection and track whether the
	desktop is visible by using WTSRegisterSessionNotification() and
	handling WM_WTSESSION_CHANGE. I think that's overdoing it just for
	this issue, though. If we would track desktop visibility, we
	should then avoid even trying to update the display at all while
	the desktop isn't visible.
2005-09-30 23:56:42 +00:00
Tor Lillqvist
bca0cefe1c Set the shaped flag here, too. (#316871)
2005-09-26  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkwindow-win32.c (gdk_window_shape_combine_mask): Set
	the shaped flag here, too. (#316871)
	(gdk_window_shape_combine_region): Currently unimplemented, so
	don't do anything to the shaped flag here.
2005-09-26 20:59:31 +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
Tor Lillqvist
67a0d5df3d Free return value from gdk_atom_name().
2005-09-21  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkselection-win32.c (gdk_selection_convert,
	gdk_text_property_to_text_list_for_display,
	gdk_text_property_to_utf8_list_for_display,
	gdk_win32_selection_add_targets,
	_gdk_win32_selection_convert_to_dib): Free return value from
	gdk_atom_name().
	(gdk_text_property_to_text_list_for_display): Drop GError variable
	that isn't actually used after being set.
2005-09-20 23:08:18 +00:00
Tor Lillqvist
d46d791df0 Do return the correct owner for CLIPBOARD (i.e., the owner of the Windows
2005-09-20  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkselection-win32.c
	(gdk_selection_owner_get_for_display): Do return the correct owner
	for CLIPBOARD (i.e., the owner of the Windows Clipboard, if it is
	a window GDK knows about). The reason to return NULL seems to have
	gone when in the fix for bug #163702 the artificial
	GDK_SELECTION_CLEAR event generation was removed from
	gdk_selection_send_notify_for_display(). Fixes bug #316552.
2005-09-20 07:59:19 +00:00
Matthias Clasen
cd63ed1eb4 *** empty log message *** 2005-09-20 05:28:34 +00:00
Hans Breuer
99b5586acc export _gdk_win32_pixbuf_to_hicon() as
2005-09-18  Hans Breuer  <hans@breuer.org>

	* gdk/gdk.symbols gdk/win32/gdkwin32.h gdk/win32/gdkcursorwin32.c : export
	_gdk_win32_pixbuf_to_hicon() as gdk_win32_pixbuf_to_hicon_libgtk_only()
	* gtk/gtktrayicon-win32.c : a lot of debug spew but it has started to show
	the icon and is blinking with teststatusicon. More to come ...
2005-09-18 17:46:55 +00:00
Hans Breuer
e5d06c7ca9 fix typo for GTK_VER; define HAVE_CONFIG_H cause gtkprogressbar.c has
2005-09-18  Hans Breuer  <hans@breuer.org>

	* gtk/makefile.msc.in : fix typo for GTK_VER; define HAVE_CONFIG_H
	cause gtkprogressbar.c has #include <config.h> conditionally; less
	noise from generated gtk.def
	* gtk/stock-icons/makefile.msc gdk/makefile.msc tests/makefile.msc : updated

	* gtk/gtktrayicon-win32.c : dummy implmentation to make gtk compile.
	For me it works as well as the *NIX implemenation, that is not at all.

	* gdk/win32/gdkproperty-win32.c : implement gdk_atom_intern_static_string()

	* gdk/win32/gdkwindow-win32.c(gdk_window_set_urgency_hint) : only use
	only use (WINVER >= 0x0500) when available from the SDK. Otherwise fall
	back to true dynamic linking of FlashWindowEx. Makes gtk+ work on NT4.0
	again - if compiled properly.

	* tests/teststatusicon.c : don't use GNOME icons for testing, but icons
	already coming with Gtk+. Makes it compile on win32.
2005-09-18 12:28:42 +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
797c2e6a45 New function to avoid pointless strdups when creating atoms from static
2005-09-11  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdk.symbols:
	* gdk/gdkproperty.h:
	* gdk/x11/gdkproperty-x11.c (gdk_atom_intern_static_string):
	New function to avoid pointless strdups when creating atoms
	from static strings.

	* gdk/x11/gdkdisplay-x11.c:
	* gdk/x11/gdkdnd-x11.c:
	* gdk/x11/gdkevents-x11.c:
	* gdk/x11/gdkmain-x11.c:
	* gdk/x11/gdkproperty-x11.c:
	* gdk/x11/gdkselection-x11.c:
	* gdk/x11/gdkwindow-x11.c: Use gdk_atom_intern_static_string()
	where appropriate.
2005-09-11 05:39:45 +00:00
Matthias Clasen
03aea1a3da Make it possible to determine if a key event is for a modifier key:
2005-09-09  Matthias Clasen  <mclasen@redhat.com>

	Make it possible to determine if a key event is for a
	modifier key:

 	* gdk/x11/gdkprivate-x11.h:
	* gdk/x11/gdkkeys-x11.c (_gdk_keymap_key_is_modifier):
	New function to determine if a keycode is mapped to a modifier.
	(get_xkb): Get the modmap.

	* gdk/x11/gdkevents-x11.c (translate_key_event): Set the
	is_modifier bit by calling _gdk_keymap_key_is_modifier().

	* gdk/gdkevents.h (struct _GdkEventKey): Add an is_modifier
	bit.
2005-09-09 22:50:15 +00:00
Tor Lillqvist
ef86d40384 Typo. 2005-09-08 23:50:52 +00:00
Tor Lillqvist
0905c73a88 Cache the display name. There is only one GdkDisplay on Win32, and
2005-09-09  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkdisplay-win32.c (gdk_display_get_name): Cache the
	display name. There is only one GdkDisplay on Win32, and
	constructing the display name isn't entirely trivial, so cacheing
	is probably worth it. For instance GIMP calls this function a lot.
	(gdk_display_open): Call gdk_display_get_name() to prime the
	cached name.
	(gdk_display_get_n_screens, gdk_display_get_screen,
	gdk_display_get_default_screen): Verify parameter correctness like
	the X11 backend does.

	* gdk/win32/gdkscreen-win32.c (gdk_screen_make_display_name):
	Return a freshly allocated string, as the API specifies. Fixes a
	heap corruption problem that caused random errors and crashes in
	GIMP, for instance.
2005-09-08 22:45:40 +00:00
Matthias Clasen
2726ffafe3 Make the modmap reflexive. (_gdk_keymap_add_virtual_modifiers): Don't add
2005-09-06  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkkeys-x11.c (update_modmap): Make the modmap reflexive.
	(_gdk_keymap_add_virtual_modifiers): Don't add both Alt and Meta
	if they are mapped to the same modifier.
2005-09-07 01:31:23 +00:00
Matthias Clasen
582af23699 Don't use GDK_ALT_MASK.
2005-09-06  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkaccelgroup.c (gtk_accelerator_parse):
	* gtk/gtkaccellabel.c (_gtk_accel_label_class_get_accelerator_label):
	Don't use GDK_ALT_MASK.

	* gdk/gdktypes.h: No need to introduce GDK_ALT_MASK
2005-09-06 19:25:47 +00:00
Matthias Clasen
543ce67477 Add support for extra virtual modifiers: (#85780, Owen Taylor)
2005-09-06  Matthias Clasen  <mclasen@redhat.com>

	Add support for extra virtual modifiers:  (#85780, Owen Taylor)

	* gdk/x11/gdkkeys-x11.c (struct _GdkKeymapX11): Add a
	modmap to maintain the information which X modifiers map to
	virtual modifiers.
	(get_xkb): Set up the modmap from the XKB tables.
	(update_keymaps): Set up the modmap from the information returned
	by XGetModifierMapping in the non-XKB case.

	* gdk/x11/gdkprivate-x11.h:
	* gdk/x11/gdkkeys-x11.c (_gdk_keymap_add_virtual_modifiers): New
	function to set the virtual modifiers in the state.

	* gdk/x11/gdkevents-x11.c (translate_key_event): Call
	_gdk_keymap_add_virtual_modifiers here.

	* gdk/gdktypes.h (GdkModifierType): Add bits for virtual Super,
	Hyper and Meta modifiers. Also add GDK_ALT_MASK as an alias
	for GDK_MOD1_MASK.
2005-09-06 17:56:01 +00:00
Tor Lillqvist
b2595c847c Keep track of cursor position also in root window coordinates. Prune out
2005-09-02  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkevents-win32.c (gdk_event_translate): Keep track of
	cursor position also in root window coordinates. Prune out
	superfluous WM_MOUSEMOVE messages even earlier, based on root window
	coordinates. Windows sends WM_MOUSEMOVE messages after a new
	window has ben mapped below the cursor even if the mouse doesn't
	move. We used to generate GDK_MOTION_NOTIFY in these cases. This
	confused at least gtk_menu_motion_notify(). (#314995)

	* gtk/gtkintl.h: No need to include config.h here. It caused
	warnings about GTK_LOCALEDIR being redefined on Win32 when
	compiling files where gtkintl.h is included after gtkprivate.h
	(which #undefines and re-#defines GTK_LOCALEDIR on Win32).

	* gtk/gtkplug.c: Include config.h.
2005-09-02 01:54:45 +00:00
Matthias Clasen
94eec04267 Intern some more strings.
2005-09-01  Matthias Clasen  <mclasen@redhat.com>

        * gdk/*.c: Intern some more strings.
        * gtk/gtkintl.h:
        * gtk/*.c: Define an I_() macro and use it instead of the
        bulky g_intern_static_string().
2005-09-01 05:11:46 +00:00
Matthias Clasen
c09cc89317 Intern type names in code generated by glib-mkenums, too.
2005-08-31  Matthias Clasen  <mclasen@redhat.com>

	* gdk/Makefile.am:
	* gtk/Makefile.am: Intern type names in code generated by
	glib-mkenums, too.

	* gtk/*.c:
	* gdk/x11/*.c:
	* gdk/*.c: Intern type names before registering the type to avoid
	unnecessary copies.
2005-08-31 16:53:43 +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
Matthias Clasen
d5a3a61c01 Free state.children in all cases. (#313862, Kjartan Maraas)
2005-08-29  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkasync.c (_gdk_x11_get_window_child_info): Free
	state.children in all cases.  (#313862, Kjartan Maraas)
2005-08-29 04:38:52 +00:00
Matthias Clasen
6663cc051d Don't warn when G_MAXLONG is passed as length.
2005-08-27  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkproperty-x11.c (gdk_property_get): Don't warn
	when G_MAXLONG is passed as length.
2005-08-27 04:25:28 +00:00
Matthias Clasen
b3a757762c Make the GdkScreen font options api public, and add properties
2005-08-26  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdk.symbols:
	* gdk/gdkscreen.h:
	* gdk/gdkscreen.c: Make the GdkScreen font options api
	public, and add properties GdkScreen::font-options and
	GdkScreen::resolution.  (#314004)

	* gdk/gdkpango.c:
	* gtk/gtksettings.c:
	* gtk/gtkwidget.c: Adjust all callers.

	* gdk/gdkintl.h: Simplify and use glib/gi18n-lib.h.
	* gdk/gdkpango.c: Include gdkintl.h, not gtkintl.h.
	* gdk/gdkscreen.c: Include gdkintl.h.
2005-08-26 18:49:52 +00:00
Owen Taylor
446ebe3a77 Handle theme == NULL.
2005-08-25  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkcursor-x11.c (gdk_x11_display_set_cursor_theme):
        Handle theme == NULL.
2005-08-25 19:22:29 +00:00
Owen Taylor
715b0e870a Use gdk_screen_init as instance_init, not base_init! (Fix from Frederic
2005-08-25  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkscreen.c (gdk_screen_get_type): Use gdk_screen_init
        as instance_init, not base_init! (Fix from Frederic Crozat,
        reported by Joe Marcus Clarke). Trivial cleanup: use -1.
        rather than -1 for a negative flag value.
2005-08-25 17:53:15 +00:00
Owen Taylor
7493cb7208 Add a note about cut-and-paste between here and Pango.
2005-08-24  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkpango.c (draw_error_underline): Add a note about
        cut-and-paste between here and Pango.
2005-08-24 20:05:54 +00:00
Owen Taylor
2b1bea02f2 Fix for #314004, reported by Michael Reinsch:
2005-08-23  Owen Taylor  <otaylor@redhat.com>

        Fix for #314004, reported by Michael Reinsch:

        * gdk/gdk.symbols:
        * gdk/gdkscreen.[ch]: Add gdk_screen_get/set_font_options_libgtk_only()
        Add gdk_screen_get/set_resolution_libgtk_only()

        * gdk/gdkpango.c (gdk_pango_context_get_for_screen): Set
        the options for the screen on the newly created context.

        * gtk/gtksettings.c (settings_update_font_options/dpi) gtkwidget.c:
        Move font options and dpi code from gtkwidget.c to gtksettings.c, set
        the font options on the screen.

        * gtk/gtkwidget.c (gtk_widget_update_pango_context): Just get
        the font options from the screen and set them on the context.
2005-08-24 03:29:06 +00:00
Matthias Clasen
933b1f4546 After checking XLib sources, XGetWindowProperty does set data to NULL. 2005-08-19 13:46:11 +00:00
Matthias Clasen
859126d546 Free data returned from XGetWindowProperty.
2005-08-19  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkdnd-x11.c (_gdk_drag_get_protocol_for_display)
	(xdnd_read_actions, get_client_window_at_coords_recurse):
	Free data returned from XGetWindowProperty.

	* gdk/x11/gdkevents-x11.c (fetch_net_wm_check_window)
	Free data returned from XGetWindowProperty.  (313867, Kjartan
	Maraas)

	* gdk/x11/gdkdnd-x11.c (get_client_window_at_coords_recurse): Free
	children in all cases.  (#313862, Kjartan Maraas)
2005-08-19 05:46:06 +00:00
Matthias Clasen
ba8fd4b9e2 Free children in all cases. (#313862, Kjartan Maraas)
2005-08-19  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkdnd-x11.c (get_client_window_at_coords_recurse): Free
	children in all cases.  (#313862, Kjartan Maraas)
2005-08-19 05:16:31 +00:00
Owen Taylor
013a0b0f11 Fix have_base_pc / have_base_x_pc typo.
2005-08-15  Owen Taylor  <otaylor@redhat.com>

        * configure.in: Fix have_base_pc / have_base_x_pc typo.

        * gdk/x11/gdkdrawable-x11.c gtk/gtksettings.c: Remove panoxft.h includes.
        (#313417, James Andrewartha)

        * configure.in: Add fontconfig to X_PACKAGES, since we use it for
        FcNameConstant(). (More of #313417)
2005-08-15 19:04:55 +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
J. Ali Harlow
3502a2a259 Make the last change compile.
2005-08-10  J. Ali Harlow  <ali@juiblex.co.uk>

        * gdk/win32/gdkfont-win32.c (gdk_font_from_description_for_display): Make
	the last change compile.
2005-08-10 11:02:29 +00:00
Owen Taylor
b1df326ab3 Remove superfluous call to gdk_window_get_offsets (). (#313051, Bertram
2005-08-09  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkwindow.c (gdk_window_ref_cairo_surface): Remove superfluous
        call to gdk_window_get_offsets (). (#313051, Bertram Felgenhauer)
2005-08-10 02:40:10 +00:00
Owen Taylor
bfd04045e5 Strip out all Xft, FreeType, and pangoxft checking. Rewrite X checks to
2005-08-09  Owen Taylor  <otaylor@redhat.com>

        * configure.in: Strip out all Xft, FreeType, and pangoxft checking.
        Rewrite X checks to use pkg-config as much as possible.

        * gdk/win32/gdkfont-win32.c (gdk_font_from_description_for_display): Make
        this return Arial always to avoid using PangoWin32FontMap. (X11 backend
        has always been returned "fixed" for a long time)

        * gdk/linux-fb/gdkdrawable-fb2.c: Remove draw_glyphs() implementations,
        fall through to the default implementation in terms of Cairo.

        * gdk/linux-fb/gdkdrawable-fb2.c (gdk_fb_draw_text): Use gdk_draw_glyphs()
        on the wrapper rather than gdk_fb_draw_glyphs()
2005-08-10 02:31:51 +00:00
Matthias Clasen
4494bd6ff8 Fix the build 2005-08-08 18:28:50 +00:00
Matthias Clasen
d40699c1b5 Tighten up ABI checking a bit 2005-08-07 13:46:06 +00:00
Matthias Clasen
6bd98ba0f9 Define the hint styles to make building against fc < 2.2.92 work.
2005-08-01  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkxftdefaults.c: Define the hint styles to make
	building against fc < 2.2.92 work.  (#311839, Damien Carbery)
2005-08-01 16:11:38 +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
Tor Lillqvist
2aec0359db Implement using FlashWindowEx(). (#309423)
2005-08-01  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkwindow-win32.c (gdk_window_set_urgency_hint):
	Implement using FlashWindowEx(). (#309423)
2005-08-01 07:19:15 +00:00
Tor Lillqvist
375cb32bc1 Cosmetics. 2005-07-29 00:35:21 +00:00
Tor Lillqvist
bdc7c892ca Remove ifdeffed out code relating to the gdk-ping message. Use the global
2005-07-29  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkevents-win32.c: Remove ifdeffed out code relating
	to the gdk-ping message. Use the global _gdk_display instead of
	calling gdk_display_get_default() which would return _gdk_display
	anyway.

	(append_event, apply_filters, gdk_event_translate): Drop any
	GdkDisplay parameter as we only have one display anyway. Use
	_gdk_display where needed.

	(gdk_event_apply_filters): Delete, move the code into its only
	caller, apply_filters().

	(generate_button_event): Factor out code from two places in
	gdk_event_translate().

	(gdk_event_translate): Call generate_button_event() in place of
	inline code.
2005-07-29 00:23:03 +00:00
Tor Lillqvist
8ac2c72f10 New static function to generate and append the GDK_GRAB_BROKEN events.
2005-07-29  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkevents-win32.c (generate_grab_broken_event): New
	static function to generate and append the GDK_GRAB_BROKEN events.

	(gdk_pointer_grab, gdk_keyboard_grab): Generate grab broken events
	when overriding a grab inside the application, like in the X11
	backend. Final bits of the fix for #107320, hopefully.

	(print_event): Handle also GDK_SETTING, GDK_OWNER_CHANGE and
	GDK_GRAB_BROKEN events.

	(gdk_event_translate): Call generate_grab_broken_event() in place
	of inline code.
2005-07-28 23:21:57 +00:00
Tor Lillqvist
c06f82f251 Rename from blit_inside_window(), as it now does blitting inside a bitmap,
2005-07-29  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkdrawable-win32.c (blit_inside_drawable): Rename
	from blit_inside_window(), as it now does blitting inside a
	bitmap, too. No code change, still just call BitBlt().
	(_gdk_win32_blit): Check for source equalling destination
	first. (#169508, #131977)
	Do away with the superfluous local draw_impl variable, the
	parameter to this function is already a GdkDrawableImplWin32*, no
	need to copy and cast it.
2005-07-28 22:24:19 +00:00
Robert Ögren
6702150903 Avoid spurious core pointer events when the tablet pen is lifted.
2005-07-28  Robert Ögren  <gtk@roboros.com>

	Avoid spurious core pointer events when the tablet pen is lifted.
	(#167000)

	* gdk/win32/gdkinput-win32.c (set_ignore_core): New static function,
	handles delayed unsetting of _gdk_input_ignore_core.
	(_gdk_input_other_event): Call set_ignore_core instead of setting
	_gdk_input_ignore_core directly.
2005-07-28 21:53:07 +00:00
Tor Lillqvist
23d233d937 Handle PS_ALTERNATE, too.
2005-07-27  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkmain-win32.c (_gdk_win32_psstyle_to_string): Handle
	PS_ALTERNATE, too.

	* gdk/win32/gdkmain-win32.c (gdk_screen_get_height_mm): Fix for
	multi-monitor cases. (#311677, Tim Evans)
2005-07-27 06:28:20 +00:00
Owen Taylor
8f3399d410 Change machinery for following font rendering xsettings to set cairo font
2005-07-19  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtksettings.c gtk/gtkwidget.c: Change machinery for
        following font rendering xsettings to set cairo font
        options on PangoContext

        * gdk/x11/gdkxftdefaults.c gdk/x11/gdkevents-x11.c gdkscreen-x11.h
        gdkprivate-x11.h: Get default values for rendering options
        (such as antialiasing, dpi) from the Xft resources for the
        display, borrowing a bit of code from Xft.

        * gtk/gtksettings.c (gtk_settings_class_init): Fix docs for
        values of gtk-xft-hintstyle.
2005-07-21 13:59:22 +00:00
Tor Lillqvist
aa49bb5089 Use wide-char API when available. (#311079, Peter Zelezny)
2005-07-21  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkwindow-win32.c (gdk_window_set_title): Use
	wide-char API when available. (#311079, Peter Zelezny)
2005-07-21 07:29:36 +00:00
Keith Packard
9917173c41 Follow change in cairo API to add Screen* to
2005-07-20  Keith Packard  <keithp@keithp.com>

	* gdk/x11/gdkdrawable-x11.c: (gdk_x11_ref_cairo_surface):

	Follow change in cairo API to add Screen* to
	cairo_xlib_create_surface_for_bitmap
2005-07-21 03:57:00 +00:00
Matthias Clasen
f6bc8ef13b Small formatting fixes in doc comments.
2005-07-18  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdkpixbuf-render.c: Small formatting fixes in doc comments.
2005-07-18 19:48:52 +00:00
Tor Lillqvist
80d2565d1c [Win32] Bypass libtool, use -Wl,-luuid. This avoids a libtool warning as
2005-07-18  Tor Lillqvist  <tml@novell.com>

	* configure.in (GDK_EXTRA_LIBS): [Win32] Bypass libtool, use
	-Wl,-luuid. This avoids a libtool warning as libuuid is static.

	* gdk/win32/gdkgc-win32.c (gdk_win32_hdc_get): Be sure to remove
	any possible leftover clipping region in the DC if we don't want
	any clipping. Thanks to Robert Ögren. (#309823)
2005-07-18 15:20:28 +00:00
Matthias Clasen
d585120eeb 2.7.3 2005-07-15 20:33:47 +00:00
Matthias Clasen
f1dd819cfe Don't assert if the xrootwin is invalid. (#309997, Barbie LeVille)
2005-07-14  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkevents-x11.c (set_screen_from_root): Don't assert if
	the xrootwin is invalid.  (#309997, Barbie LeVille)
	(gdk_event_translate): Ignore events with an invalid root field.
2005-07-14 14:37:34 +00:00
Robert gren
13596ab6bd Fix handling of Aiptek and Aiptek-like graphical tablets such as Trust on
2005-07-13  Robert gren  <gtk@roboros.com>

	Fix handling of Aiptek and Aiptek-like graphical tablets such as Trust
	on Windows. (#167004, thanks to	"pnohant" for testing)

	Code cleanup: Remove the unused and unmaintained code for using a
	non-system tablet context (USE_SYSCONTEXT ifdef:s), suggested
	by Tor Lillqvist.

	* gdk/win32/gdkinput-win32.c (_gdk_input_wintab_init_check): Handle
	tablet drivers that don't support WTI_DDCTXS/WTI_DSCTXS gracefully.
	Sligthly reorganize and simplify the code to support this.
	(_gdk_input_wintab_init_check, _gdk_input_other_event): Remove
	USE_SYSCONTEXT ifdef:s and the code for the case it was not defined.
	(gdk_input_window_find_within): Removed.
2005-07-13 13:00:22 +00:00
Matthias Clasen
216f923f70 Add Copyright/License information.
2005-07-13  Matthias Clasen  <mclasen@redhat.com>

	* gdk/win32/bdfcursor.c: Add Copyright/License information.
2005-07-13 12:32:02 +00:00
Matthias Clasen
6c30cdbd8d Fix cairo_content_t <-> cairo_format_t confusion. (#310086, Carlos
2005-07-12  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdkgc.c (make_stipple_tile_surface): Fix
	cairo_content_t <-> cairo_format_t confusion.  (#310086,
	Carlos Garnacho Parro)
2005-07-12 16:49:37 +00:00
Tor Lillqvist
251c0b4143 Forgot to commit this one. 2005-07-12 16:33:18 +00:00
Matthias Clasen
5f72921cc1 Add Copyright/License information. 2005-07-12 05:09:13 +00:00
Matthias Clasen
98f3942e64 Add Copyright/License information. 2005-07-12 04:38:51 +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
Tor Lillqvist
c0dace5fd9 Look for windres on Win32.
2005-07-09  Tor Lillqvist  <tml@novell.com>

	* configure.in: Look for windres on Win32.

	* gdk-pixbuf/Makefile.am
	* gdk/win32/rc/Makefile.am
	* gdk/Makefile.am
	* gtk/Makefile.am: Don't use the scripts in build/win32 to compile
	the rc files into resource object files. (This means we lose the
	build number increment magic, but I doubt it was that useful
	anyway.) Instead use windres directly. To pass a normal .o file
	produced by windres through libtool, which would want a .lo file,
	pass it directly to the linker using a -Wl option.

	* gdk-pixbuf/gdk_pixbuf.rc.in
	* gdk/win32/rc/gdk.rc.in
	* gtk/gtk-win32.rc.in: Replace BUILDNUMBER with 0.
2005-07-09 00:10:12 +00:00
Matthias Clasen
5a997f0f37 Don't generate events on destroyed windows.
2005-07-07  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkmain-x11.c (generate_grab_broken_event): Don't
	generate events on destroyed windows.
2005-07-07 19:05:33 +00:00
Tor Lillqvist
489f99911a Don't create the GdkPixbuf until we know that we have something to put in
2005-07-06  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkcursor-win32.c
	(gdk_win32_icon_to_pixbuf_libgtk_only): Don't create the GdkPixbuf
	until we know that we have something to put in it.
2005-07-06 15:30:10 +00:00
Tor Lillqvist
db343ee03d Add comment about the current named cursor implementation, and what it
2005-07-06  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkcursor-win32.c: Add comment about the current named
	cursor implementation, and what it maybe really should do.
	(gdk_win32_icon_to_pixbuf_libgtk_only): New function, code moved
	here from gtk/gtkfilesystemwin32.c:extract_icon().
	(gdk_cursor_get_image): Use
	gdk_win32_icon_to_pixbuf_libgtk_only().

	* gdk/gdk.symbols
	* gdk/win32/gdkwin32.h: Declare gdk_win32_icon_to_pixbuf_libgtk_only().

	* gtk/gtkfilesystemwin32.c (extract_icon): Use
	gdk_win32_icon_to_pixbuf_libgtk_only().
2005-07-05 22:50:54 +00:00
Matthias Clasen
7af9cc8f7c Add some missing files to EXTRA_DIST 2005-07-05 05:57:36 +00:00
Hans Breuer
19e9165d64 updated <io.h> for open() use G_PI instead of M_PI
2005-07-03  Hans Breuer  <hans@breuer.org>

	* **/makefile.msc[.in] : updated
	* gtk/gtkiconcache.c : <io.h> for open()
	* gtk/gtkstyle.c : use G_PI instead of M_PI

	* gdk/win32/gdkcursor-win32.c : implement gdk_cursor_new_from_name()
	by mapping the lower case win32 api name to the respective cursor.
	E.g. pass "wait" to get the IDC_WAIT cursor. Also allows to load
	cursors from named resources in the executable.
	(gdk_cursor_get_image) : just return NULL for now.

	* gdk/win32/gdkgeometry-win32.c : implement gdk_window_move_region()
	by delegation to ScollWindowEx(), untested.

	* gdk/win32/gdkwindow-win32.c : stub for gdk_window_set_urgency_hint()
2005-07-03 15:47:42 +00:00
Manish Singh
5cc0696de6 declare _gdk_xgrab_check_button_event.
Thu Jun 30 14:17:24 2005  Manish Singh  <yosh@gimp.org>

        * gdk/x11/gdkprivate-x11.h: declare _gdk_xgrab_check_button_event.

        * gtk/gtkbutton.c: fix signature of gtk_button_grab_broken.
2005-06-30 21:18:34 +00:00
Matthias Clasen
8833e0d3c3 Avoid infinite loop if a mask is zero. (#309222, David Saxton)
2005-06-30  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkvisual-x11.c (gdk_visual_decompose_mask): Avoid
	infinite loop if a mask is zero.  (#309222, David Saxton)
2005-06-30 19:11:58 +00:00
Matthias Clasen
87cafe5b4b Handle broken grabs.
2005-06-29  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkbutton.c (gtk_button_grab_broken): Handle broken
        grabs.

        * gtk/gtkrange.c (gtk_range_grab_broken): Handle broken
        grabs.

        * gdk/gdkevents.h: Add a boolean to specify wether the broken
        grab was implicit.

        * gdk/x11/gdkdisplay-x11.c (gdk_display_pointer_is_grabbed):
        As the documentation states, don't return TRUE for
        implicit grabs.

        * gdk/x11/gdkdisplay-x11.h (struct _GdkDisplayX11): Add
        a boolean field to store wether a pointer grab is implicit.

        * gdk/x11/gdkmain-x11.c (_gdk_xgrab_check_button_event):
        Track implicit grabs.

        * gdk/x11/gdkevents-x11.c (gdk_event_translate): Call
        _gdk_xgrab_check_button_event for button events.
2005-06-30 03:35:30 +00:00
Matthias Clasen
b2343762b1 Ignore GrabBroken events which are caused by overgrabbing inside the
2005-06-27  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkmenushell.c (gtk_menu_shell_grab_broken): Ignore
	GrabBroken events which are caused by overgrabbing inside
	the application; menus rely on these for their operation.

	* gdk/gdkevents.h (struct _GdkEventGrabBroken): Add a
	grab_window field.

	* gdk/win32/gdkevents-win32.c (gdk_event_translate): Set
	grab_window to NULL when generating GrabBroken events for
	WM_KILLFOCUS messages.

	* gdk/x11/gdkmain-x11.c (_gdk_xgrab_check_unmap)
	(_gdk_xgrab_check_destroy): Set grab_window to NULL when
	generating GrabBroken events when the grab window becomes
	unviewable or is destroyed.

	* gdk/x11/gdkmain-x11.c (gdk_pointer_grab, gdk_keyboard_grab):
	Generate GrabBroken events when overriding a grab inside
	the application. In this case, set grab_window to the new
	grab_window.
2005-06-27 21:06:33 +00:00
Matthias Clasen
c719b4bf3d Avoid a segfault. (#309054)
2005-06-27  Matthias Clasen  <mclasen@redhat.com>

	* modules/input/gtkimcontextxim.c (gtk_im_context_xim_finalize):
	Avoid a segfault. (#309054)

	* gdk/x11/gdkdisplay-x11.h (struct _GdkDisplayX11): Add
	fields for grab timestamps.

	* gdk/x11/gdkmain-x11.c (gdk_pointer_grab, gdk_keyboard_grab):
	Store grab timestamps when grabbing.

	* gdk/x11/gdkdisplay-x11.c (gdk_display_keyboard_ungrab)
	(gdk_display_pointer_ungrab): Don't unset the grab_window
	if the timestamps indicate that the ungrab will fails.
2005-06-27 18:37:41 +00:00
Tor Lillqvist
98a17d1462 gdk/Makefile.am Current GNU tools do understand the PRIVATE keyword, so no
2005-06-26  Tor Lillqvist  <tml@novell.com>

	* gdk/Makefile.am
	* gtk/Makefile.am: Current GNU tools do understand the PRIVATE
	keyword, so no need to remove those entries from the import
	library. libtool installs the .dll.a import library itself, so no
	need to do it here. Install the .def file.
2005-06-26 19:01:33 +00:00
Manish Singh
2f330b7737 add GDK_GRAB_BROKEN to the switch cases.
Sun Jun 26 00:04:36 2005  Manish Singh  <yosh@gimp.org>

        * gdk/gdkevents.c (gdk_event_get_time, gdk_event_get_state): add
        GDK_GRAB_BROKEN to the switch cases.

        * gtk/gtkmenushell.c (gtk_menu_shell_grab_broken): remove unused
        variables.

        * gtk/gtkpaned.c (gtk_paned_grab_broken): return TRUE.
2005-06-26 07:06:13 +00:00
Matthias Clasen
96cf099c47 Don't emit grab-broken for overgrabbing, until we figure out how to do
2005-06-25  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkmain-x11.c (gdk_keyboard_grab, gdk_pointer_grab):
	Don't emit grab-broken for overgrabbing, until we figure
	out how to do that without breaking the menu code.
2005-06-26 03:48:06 +00:00
Matthias Clasen
9b356ea0d8 Add a GrabBroken event to GDK, and a grab-broken-event signal to
2005-06-25  Matthias Clasen  <mclasen@redhat.com>

	Add a GrabBroken event to GDK, and a grab-broken-event
	signal to GtkWidget.  (#107320, Simon Cooke, initial patch
	by John Ehresman)

	* gdk/gdkevents.h: Add a GDK_GRAB_BROKEN event type,
	define a GdkEventGrabBroken event struct.

	* gdk/win32/gdkevents-win32.c (gdk_event_translate):
	Generate GrabBroken events in response to WM_KILLFOCUS.

	* gdk/x11/gdkmain-x11.c: Generate GrabBroken events
	when a grab is broken by the window becoming unviewable,
	or by another grab from the same client.

	* gtk/gtkwidget.h (GtkWidgetClass): Add grab_broken_event.

	* gtk/gtkwidget.c (gtk_widget_event_internal): Translate
	GrabBroken events into grab_broken_event signals.

	* gtk/gtkmain.c (gtk_main_do_event): Propagate GrabBroken
	events.

	* gtk/gtkmenushell.c (gtk_menu_shell_grab_broken): Deactivate
	the menu when the grab is broken.

	* gtk/gtkcolorsel.c (gtk_color_selection_grab_broken): Stop
	the color picker if the grab is broken.

	* gtk/gtkpaned.c (gtk_paned_grab_broken): Stop the drag if
	the grab is broken.
2005-06-25 07:10:40 +00:00
Owen Taylor
dd19f542db Fix up selection of conversion functions for MSB machines:
2005-06-24  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkrgb.c (gdk_rgb_select_conv): Fix up selection of
        conversion functions for MSB machines: convert_0888[_br]
        now work on bytes so are endian independent.
        (Reported by David Zeuthen)
2005-06-24 15:06:29 +00:00
Tor Lillqvist
baad14eee0 Improve and simplify line segment rendering on Win32, especially the
2005-06-23  Tor Lillqvist  <tml@novell.com>

	Improve and simplify line segment rendering on Win32, especially
	the implementation of GDK_CAP_NOT_LAST, and dashed lines. Fixes
	bug #306396.

	* gdk/win32/gdkprivate-win32.h (GdkGCWin32): Save the GdkGC's
	line_style, cap_style and join_style as such in the
	GdkGCWin32. Don't need to keep the pen_double_dash flag, we can
	check the line_style.

	* gdk/win32/gdkgc-win32.c (fixup_pen): New internal function. Sets
	up the GDI pen type, style, end cap and join attributes to use
	based on the pen width, GDK line style, end cap style, and join
	style.

	For a narrow (zero-width) GDK pen with the GDK_CAP_NOT_LAST end
	cap style, which typically are used for XOR drawing where it is
	essential that the last pixel is not drawn, use a GDI cosmetic
	pen. Only for a cosmetic pen does GDI not draw the last pixel. I
	deduced this by experimetation, the documentation is rather vague.

	For other GDK pens use a geometric GDI pen. If the width is 0 or 1
	and the GDK end cap style is GDK_CAP_BUTT, and the line style is
	GDK_LINE_SOLID, use PS_ENDCAP_ROUND. This ensures that also
	single-pixel length lines are drawn. (For sngle-pixel width lines
	roundness as such is of course irrelevant.) For dashed lines, use
	PS_ENDCAP_FLAT.

	For wide lines use PS_ENDCAP_FLAT, _ROUND or _SQUARE,
	respectively, for GDK_CAP_BUTT, GDK_CAP_ROUND and GDK_CAP_PROJECTING.

	For one pixel on-off dashed lines, use PS_ALTERNATE, it seems to
	work better than PS_USERSTYLE. For other dashed lines, use
	PS_USERSTYLE and the dashes as set by the user (or the default
	four-pixel on-off style).

	(gdk_win32_gc_values_to_win32values, gdk_win32_gc_set_dashes):
	Call fixup_pen() to do the pen settings after modifying some of
	the GDK GC attributes that affect pens.

	* gdk/win32/gdkdrawable-win32.c (render_line_horizontal,
	render_line_vertical, draw_segments): Check GdkGCWin32::line_style
	instead of the the removed pen_double_dash member. Don't use
	PATCOPY unconditionally in the PatBlt() call, use a raster ope
	code that depends on the GC function in use.

	(draw_rectangle, draw_segments, draw_lines): Be more careful in
	deciding when to do the manual dash rendering.

	(draw_segments): Don't do any manual "last point" drawing at
	all. The above changes takes care of narrow line segments being
	drawn correctly in most cases, at least on NT-based Windows.
2005-06-24 13:00:05 +00:00
Owen Taylor
3c4ffb12ab Fix the big endian case for 3-channel source. (Reported by David Zeuthen)
2005-06-23  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkcairo.c (gdk_cairo_set_source_pixbuf): Fix the
        big endian case for 3-channel source. (Reported by
        David Zeuthen)
2005-06-23 13:49:06 +00:00
Matthias Clasen
9c3aa23e08 Set the time field in the event. (#308573, Morten Welinder)
2005-06-22  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkdnd-x11.c (xdnd_finished_filter): Set the
	time field in the event.  (#308573, Morten Welinder)
2005-06-22 16:09:41 +00:00
Matthias Clasen
0f133f4f4b New function which can be used to implement scrolling in non-window
2005-06-21  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdk.symbols:
	* gdk/gdkwindow.h:
	* gdk/x11/gdkgeometry-x11.c (gdk_window_move_region): New
	function which can be used to implement scrolling in
	non-window widgets.  (#135165, Søren Sandmann)
2005-06-21 04:09:52 +00:00
Matthias Clasen
58a1af804c 2.7.0 2005-06-20 22:06:27 +00:00
Manish Singh
8e3ea42aba remove GDK_CURSOR and GDK_IS_CURSOR, instance checks don't work on boxed
Sat Jun 18 04:22:51 2005  Manish Singh  <yosh@gimp.org>

        * gdk/gdkcursor.h: remove GDK_CURSOR and GDK_IS_CURSOR, instance
        checks don't work on boxed types.

        * gdk/x11/gdkcursor-x11.c:
        * gdk/gdkcursor.c: make return_if_fail checks != NULL instead of
        GDK_IS_CURSOR.
2005-06-18 11:25:14 +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
Tor Lillqvist
9c8f987df7 Set the actions and suggested_action fields in the GdkDragContext to
2005-06-17  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkdnd-win32.c (gdk_dropfiles_filter): Set the actions
	and suggested_action fields in the GdkDragContext to
	GDK_ACTION_COPY. Otherwise apps that check the suggested_action
	field, like eog, won't accept dropped files.
2005-06-17 19:41:01 +00:00
Matthias Clasen
4e077183cc Define GDK_IS_CURSOR() and GDK_CURSOR().
2005-06-17  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdkcursor.h: Define GDK_IS_CURSOR() and GDK_CURSOR().
2005-06-17 19:37:29 +00:00
Matthias Clasen
3d6ed0595f Improve some return_if_fail checks, and add the missing non-Xcursor
2005-06-17  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkcursor-x11.c:
	* gdk/gdkcursor.c: Improve some return_if_fail checks,
	and add the missing non-Xcursor fallback for
	_gdk_x11_cursor_update_theme(), noticed by Jeroen
	Zwartepoorte.
2005-06-17 19:27:04 +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
Owen Taylor
c96795ffb3 Fix #if G_BYTE_ORDER == GDK_LSB_FIRST.
2005-06-17  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkcairo.c (gdk_cairo_set_source_pixbuf): Fix
        #if G_BYTE_ORDER == GDK_LSB_FIRST.
2005-06-17 14:17:43 +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
15161e3a11 Update all fields 2005-06-16 05:18:33 +00:00
Matthias Clasen
19b9451ce7 Get red and blue in place.
2005-06-15  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkcursor-x11.c (gdk_cursor_get_image): Get
	red and blue in place.
2005-06-15 21:22:54 +00:00
Matthias Clasen
df517cb1d5 Add two new settings, gtk-cursor-theme-name and gtk-cursor-theme-size to
2005-06-15  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtksettings.c: Add two new settings,
	gtk-cursor-theme-name and gtk-cursor-theme-size to
	control the cursor theme.

	* gdk/x11/gdkevents-x11.c: Add two new X settings,
	Gtk/CursorThemeName and Gtk/CursorThemeSize, and map
	these to the gtk settings.

	* tests/testgtk.c (create_cursors): Add a cursor theme
	testcase.
2005-06-15 19:25:49 +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
abb3b2e708 Make make check happier 2005-06-15 06:03:54 +00:00
Matthias Clasen
daab95c294 Add a stub for the no-Xcursor case. (noticed by Luis Villa)
2005-06-14  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkcursor-x11.c (gdk_cursor_new_from_name): Add a
	stub for the no-Xcursor case. (noticed by Luis Villa)
2005-06-14 20:43:20 +00:00
Matthias Clasen
2fad80a6bd Forgotten file 2005-06-14 16:05:52 +00:00
Matthias Clasen
6b5b269844 New functions to construct named cursors and to get the image used for a
2005-06-14  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdk.symbols:
	* gdk/gdkcursor.h:
	* gdk/x11/gdkcursor-x11.c (gdk_cursor_get_image)
	(gdk_cursor_new_from_name): New functions to construct named
	cursors and to get the image used for a cursor.
2005-06-14 15:10:13 +00:00
Kjartan Maraas
5ee5b7c4b5 Plug a leak. Closes bug #307281.
2005-06-12  Kjartan Maraas  <kmaraas@gnome.org>

	* gdk/x11/gdkasync.c: (send_event_handler): Plug
	a leak. Closes bug #307281.
2005-06-12 16:24:10 +00:00
Matthias Clasen
411241fb26 Cleanup. (#169648, Fabricio Barros Cabral)
2005-06-12  Matthias Clasen  <mclasen@redhat.com>

	* gdk/*.h: Cleanup.  (#169648, Fabricio Barros Cabral)
2005-06-12 05:32:25 +00:00
Matthias Clasen
28bebc863a Small doc additions.
2005-06-12  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdkcairo.c: Small doc additions.
2005-06-12 05:20:04 +00:00
Kjartan Maraas
3003d2edc4 Destroy the cairo surface when done with it. Plugs a fairly large leak in
2005-06-10  Kjartan Maraas  <kmaraas@gnome.org>

	* gdk/gdkcairo.c: (gdk_cairo_set_source_pixbuf): Destroy the
	cairo surface when done with it. Plugs a fairly large leak in
	some cases.
	==6014== 1999824 (115640 direct, 1884184 indirect) bytes in
	826 blocks are definitely lost in loss record 25239 of 25250
	Like this from nautilus.
2005-06-10 19:53:47 +00:00
Matthias Clasen
79d82223a2 Generate N_() calls for translatable key names.
2005-06-10  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gen-keyname-table.pl: Generate N_() calls for
	translatable key names.

	* gdk/keynames.txt: Mark some key names as translatable.

	* gdk/keyname-table.h: Regenerated.

	* gtk/gtkaccellabel.c (gtk_accel_label_class_init): Add
	some context to the msg ids for keyboard modifiers and
	key names.
	(_gtk_accel_label_class_get_accelerator_label): Try to
	translate key names.  (#300224, Christian Rose)
2005-06-10 06:41:04 +00:00
Matthias Clasen
0a8331150e Small markup fixes. 2005-06-10 03:35:30 +00:00
Matthias Clasen
13a9dd210a Update the user time on the window when a drop happens. (#169364,
2005-06-09  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkdnd-x11.c (motif_drop_start, xdnd_drop_filter): Update
	the user time on the window when a drop happens.  (#169364, Alexander
	Hunziker, patch by Elijah Newren)
2005-06-09 17:13:58 +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
Tor Lillqvist
cf670606aa Return NULL unless screen number is zero. We have only one screen on
2005-06-05  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkscreen-win32.c
	(_gdk_windowing_substitute_screen_number): Return NULL unless
	screen number is zero. We have only one screen on Win32.
	(gdk_screen_make_display_name): Call gdk_display_get_name() and
	return that.
2005-06-05 10:34:20 +00:00
Tor Lillqvist
d42fa02bc3 gdk/win32/gdkcursor-win32.c gdk/win32/gdkwindow-win32.c Support
2005-06-04  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkcursor-win32.c
	* gdk/win32/gdkwindow-win32.c
	* gdk/win32/gdkprivate-win32.h: Support full-colour cursors.
	Support cursors with alpha on XP. Use code in common with the
	support for alpha icons that already was present. (#306101, Tim
	Evans)
2005-06-04 21:43:03 +00:00
Tor Lillqvist
e7c9e7d8de If blitting from the root window, take the multi-monitor offset into
2005-05-26  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkdrawable-win32.c (_gdk_win32_blit): If blitting
	from the root window, take the multi-monitor offset into
	account. (#305511)
2005-05-26 07:56:00 +00:00
Tor Lillqvist
60c544e649 Handle gtk-alternative-button-order (setting it to TRUE).
2005-05-24  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkproperty-win32.c (gdk_screen_get_setting): Handle
	gtk-alternative-button-order (setting it to TRUE).
2005-05-24 17:49:15 +00:00
Tor Lillqvist
7f2ad4a885 Map VK_APPS to GDK_Menu. (#172383, Ivan Wong)
2005-05-23  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkkeys-win32.c (handle_special): Map VK_APPS to
	GDK_Menu. (#172383, Ivan Wong)
2005-05-22 22:28:39 +00:00
Tor Lillqvist
1abd7f7999 If the keysym isn't one of the special cases this function takes care of,
2005-05-23  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkkeys-win32.c (handle_dead): If the keysym isn't one
	of the special cases this function takes care of, us it as
	such. This takes care of for instance the Bengali Virama, see bug
	#165723.
2005-05-22 21:23:45 +00:00
Tor Lillqvist
ba7ee2270a gdk/win32/gdkevents-win32.c gdk/win32/gdkkeys-win32.c Check the
2005-05-18  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkevents-win32.c
	* gdk/win32/gdkkeys-win32.c
	* gdk/win32/gdkprivate-win32.h: Check the KF_EXTENDED bit in
	lParam of WM_KEY* messages to distinguish between left and right
	Control and Alt keys. Unfortunately, the right Shift key doesnt
	set KF_EXTENDED, so to distinguish between left and right Shift
	keys, check the scan code. (#304584)
2005-05-18 14:53:00 +00:00
Matthias Clasen
f6906b8272 Warn if length overflows. (#161520, Ian Wienand)
2005-05-18  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkproperty-x11.c (gdk_property_get): Warn if
	length overflows.  (#161520, Ian Wienand)
2005-05-18 14:46:14 +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
Matthias Clasen
f1a4c08002 Adjust offsets when recursing. (#153682, Felipe Heidrich)
2005-05-17  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdkwindow.c (gdk_window_set_bg_pattern): Adjust offsets
	when recursing.  (#153682, Felipe Heidrich)
2005-05-17 05:17:08 +00:00
Matthias Clasen
51881768c4 Fix a typo in the docs. (#303940, Masao Mutoh)
2005-05-16  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdkpango.c (gdk_pango_renderer_get_default): Fix a typo
	in the docs.  (#303940, Masao Mutoh)
2005-05-16 19:37:34 +00:00
Manish Singh
4849c70543 gdk/gdkdraw.c #include gdkcairo.h for gdk_cairo_create() declaration.
Sat May 14 00:07:46 2005  Manish Singh  <yosh@gimp.org>

        * gdk/gdkdraw.c
        * gdk/gdkpango.c: #include gdkcairo.h for gdk_cairo_create()
        declaration.

        * gtk/gtkiconview.c (gtk_icon_view_create_drag_icon): actually
        call gdk_cairo_set_source_color() with a color.

        * gtk/gtkimage.c (gtk_image_expose): remove unused stock_id variable.

        * tests/testiconview.c (main): cast args of drag functions to the
        appropriate type.
2005-05-14 07:19:48 +00:00
Owen Taylor
c2bd238e88 Update for cairo-xlib API change.
2005-05-13  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkdrawable-x11.c: Update for cairo-xlib API change.

        * gdk/x11/gdkpixmap-x11.[ch] gdk/gdk.symbols: Export
        gdk_pixmap_impl_x11_get_type(), needed in gdkdrawable-x11.c.
2005-05-14 01:04:15 +00:00
Owen Taylor
dda40ca71a Use a GtkAlignment rather than a GtkDrawingArea to draw the swatch in to
2005-05-11  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkcolorbutton.c: Use a GtkAlignment rather than a GtkDrawingArea
	to draw the swatch in to avoid having an extraneous window.

	* gtk/gtkcolorsel.c (color_sample_draw_sample): Actually se tthe
	color when !has_opacity.

2005-05-10  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkcairo.[ch] gdk/gdkcolor.[ch] gdk/Makefile.am: Add source
	files for Cairo convenience functionality.

	* gdk/gdkcairo.h (gdk_cairo_rectangle, gdk_cairo_region): Add a
	convenience functions to add GdkRectangle, GdkRegion to a cairo path.

	* gdk/gdkwindow.c gdk/gdkgc.c gtk/gtkcolorsel.c gtk/gtkiconview.c
	gtk/gtkstyle.c: Use gdk_cairo_rectangle/region().

	* gdk/gdkcairo.[ch] gdk/gdkdrawable.h gdk/gdkdraw.c: Rename
	gdk_drawable_create_cairo_context() to gdk_cairo_create().

	* gdk/gdkcairo.c gdk/gdkpixbuf.h gdk/gdkpixbuf-render.c:
	Rename gdk_pixbuf_set_as_cairo_source() to
	gdk_cairo_set_source_pixbuf().

	* gdk/gdkdraw.c gdk/gdkpango.c gtk/gtkcolorsel.c gtk/gtkhruler.c
	gtk/gtkhsv.c gtk/gtkiconview.c gtk/gtkstyle.c gtk/gtkvruler.c:
	Adjust for renames.

	* gdk/gdk.symbols: Update.

	* gtk/gtkwidget.c (gtk_widget_queue_shallow_draw): Fix
	coordinate system problem that was causing the wrong portions
	to be invalidated.

	* gtk/gtkcellrenderer.c (gtk_cell_renderer_render)
	gtk/gtkcellrendererpixbuf.c (gtk_cell_renderer_pixbuf_render)
	gtk/gtkcellrendererprogress.c (gtk_cell_renderer_progress_render)
	gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_render)
	gtk/gtkcellview.c (gtk_cell_view_expose)
	gtk/gtkdnd.c (gtk_drag_highlight_expose)
	gtk/gtkentry.c (gtk_entry_draw_text)
	gtk/gtktextview.c (text_window_invalidate_rect): Some cairoization.

	* gtk/gtkcalendar.[ch]: Beat into something roughly resembling
	GTK+ style ... use instance-private data and standard names for
	private structure, etc. Move function docs inline.

	* gtk/gtkcalendar.[ch]: Switch to drawing everything in
	expose. Switch drawing to Cairo.

	* gtk/gtkcalendar.c (gtk_calendar_freeze): Deprecate
	gtk_calendar_freeze/thaw
2005-05-11 19:16:19 +00:00
Tor Lillqvist
846972ba14 Check that GDK_IS_SCREEN(screen) (like the X11 backend does), not screen
2005-05-10  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkproperty-win32.c (gdk_screen_get_setting): Check
	that GDK_IS_SCREEN(screen) (like the X11 backend does), not screen
	== gdk_screen_get_default(), as that might return NULL when this
	function is called.
2005-05-10 06:51:44 +00:00
Owen Taylor
485fd85179 Fill in unused bits so they can be used for the depth-32 target case.
2005-05-09  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkrgb.c (gdk_rgb_convert_0888_br, gdk_rgb_convert_8880_br):
        Fill in unused bits so they can be used for the depth-32 target case.
        Rewrite so that that gives a marginal speedup rather than a
        marginal slowdown. (on x86)

        * gdk/gdkscreen.h gdk/x11/gdkscreen-x11.[ch] gdk/x11/gdkvisual-x11.c:
        Add gdk_screen_get_rgba_colormap/visual to get a visual for
        windows with an alpha channel, if one exists.

        * gdk/win32/gdkscreen-win32.c gdk/linux-fb/gdkscreen-fb.c:
        Stub out gdk_screen_get_rgba_colormap/visual.

        * gdk/x11/gdkcolor-x11.c (gdk_colormap_alloc_colors): computation of
        "unused" wasn't right for depth == 32, since it depended on
        shifting by 32.

        * gdk/gdkrgb.c: Fill in alpha bits with 1s. (Based on patch from
        Keith Packard,
        http://mail.gnome.org/archives/gtk-devel-list/2004-June/msg00080.html)

        * gdk/x11/gdkdrawable-x11.c (gdk_x11_drawable_get_picture):
        Implement again, without using Xft.

        * tests/testgtk.c: Add a test for windows with an alpha channel.
2005-05-09 22:54:10 +00:00
Matthias Clasen
ba20420e9f Small documentation additions.
2005-05-08  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdkcolor.c (gdk_cairo_set_source_color):
	* gdk/gdkimage.h:
	* gdk/gdkdraw.c:
	* gdk/gdkcolor.h:
	* gdk/gdkcursor.h:
	* gdk/x11/gdkcolor-x11.c: Small documentation additions.
2005-05-08 05:47:52 +00:00
Matthias Clasen
2d4d7f587c Forgotten fix. 2005-05-08 05:46:45 +00:00
Matthias Clasen
65903c3ae7 Fix typos in the docs. (#303389, Masao Mutoh)
2005-05-07  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkscreen-x11.c (gdk_screen_get_width_mm)
	(gdk_screen_get_height_mm): Fix typos in the docs.  (#303389,
	Masao Mutoh)
2005-05-08 03:18:09 +00:00
Owen Taylor
e60f060ea8 Get the foreground color, not the background color.
2005-05-07  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkgc.c (gc_get_foreground): Get the foreground color, not
        the background color.
2005-05-07 19:00:36 +00:00
Owen Taylor
274e49f37e Change prototype to match cairo_set_source_surface().
2005-05-07  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkpixbuf-render.c gdk/gdkpixbuf.h (gdk_pixbuf_set_as_cairo_source):
        Change prototype to match cairo_set_source_surface().

        * gdk/gdkdraw.c gdk/gdkgc.c gdk/gdkpixbuf-render.c gdk/gdkwindow.c
        gtk/gtkhsv.c tests/testcairo.c.
2005-05-07 18:51:18 +00:00
Owen Taylor
dcedc5bcef Fix a bug in focus tracking when we move between has_pointer_focus and
2005-05-04  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkevents-x11.c gdk/x11/gdkwindow-x11.h: Fix a bug
        in focus tracking when we move between has_pointer_focus and
        has_focus_window directly. (#109246, Billy Biggs, Niko Tyni
        and others)

        * gdk/x11/gdkevents-x11.c: Also fix some extremely confusion
        that could happen in the case of no window manager + keyboard grabs,
        by moving to a more consistent model of when we pay attention
        to mode=NotifyGrab/NotifyUngrab events.

        * docs/focus_tracking.txt: Extensive writeup about how to track
        focus under X11
2005-05-05 00:12:21 +00:00
Tor Lillqvist
a622843f4d gdk/win32/gdkdrawable-win32.c (generic_draw, blit_from_pixmap) Minor fixes
2005-05-04  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkdrawable-win32.c (generic_draw, blit_from_pixmap)
	* gdk/win32/gdkgc-win32.c (gdk_win32_gc_values_to_win32values,
	_gdk_win32_gc_new, _gdk_windowing_gc_set_clip_region,
	gdk_win32_hdc_get): Minor fixes to make Win32 backend compile
	again.
2005-05-04 11:43:44 +00:00
Owen Taylor
788bbf520a Add a draw-border style property to allow themes to draw outside the
2005-04-28  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkwidget.c: Add a draw-border style property to allow
	themes to draw outside the widget's allocation.

	* gdk/gdkwindow.c gtk/gtkstyle.c: Remove some save/restore pairs
	that were working around the clip-leakage bug in Cairo.

	* gtk/gtkstyle.c: Use cairo_fill_preserve() rathe than
	save/fill/restore.

	* gdk/gdkgc.c gdk/gdkinternals.h: Add _gdk_gc_update_context()
	That updates a Cairo context to match a GC.

	* gdk/gdkdraw.c: Use _gdk_gc_update_context() to add support
	for tiles/stipples/clipping to gdk_draw_glyphs(),
	gdk_draw_trapezoids().

	* gdk/gdkpango.c: Use _gdk_gc_update_context() instead of internal
	implementation of stipples. Use one cairo_t across the entire
	drawing operation. Replace cairo_matrix_create() with
	stack-allocated matrices.

	* gdk/gdkgc.c gdk/gdkinternals.h gdk/x11/gdkgc-x11.c
	gdk/win32/gdkgc-win32.c: Save various aspects of the
	GC state (fill, tile, stipple, foreground, background, clip region)
	in instance-private-data for future use. Add getters.
	Get rid of _gdk_windowing_gc_get_foreground() function implemented
	by the backends.

	* gdk/gdkgc.c gdk/gdkinternals.h gdk/x11/gdkgc-x11.c
	gdk/win32/gdkgc-win32.c gdk/linux-fb/gdkgc-fb.c: Add
	_gdk_gc_init() to do initial setup of the GC from values;
	fixes some problems from drawable redirection.

	* gdk/gdkgc.c gdk/gdkinternals.h gdk/x11/gdkgc-x11.c
	gdk/win32/gdkgc-win32.c gdk/linux-fb/gdkgc-fb.c: Move
	gdk_gc_copy() and gdk_gc_set_clip_{region,rectangle}() into
	the generic code, add _gdk_windowing_gc_copy(),
	_gdk_windowing_gc_set_clip_region() to do backend specific
	stuff.

	* gdk/x11/{gdkprivate-x11.h,gdkgc-x11.c.c,gdkdrawable-x11.c}
	gdk/win32/{gdkprivate-win32.h,gdkgc-x11.c.c,gdkdrawable-x11.c}
	gdk/linux-fb/{gdkprivate-fb.h,gdkgc-fb.c.c,gdkdrawable-fb.c}:
	Don't duplicate state that now is stored by the generic code.

	* gdk/gdk.symbols Update
2005-05-02 23:29:24 +00:00
Tor Lillqvist
20f9c58edb Take multi-monitor offset into account. (#302525)
2005-04-30  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkdnd-win32.c (gdk_dropfiles_filter): Take
	multi-monitor offset into account. (#302525)
2005-04-30 17:50:00 +00:00
Ivan, Wong Yat Cheung
e41ade967e Match character height instead of cell height. Fix #301228.
2005-04-19  Ivan, Wong Yat Cheung  <email@ivanwong.info>

	* gdk/win32/gdkfont-win32.c (gdk_font_load_internal): Match
	character height instead of cell height. Fix #301228.
2005-04-21 10:39:39 +00:00
Owen Taylor
9725c8d752 gtk/gtkstyle.c gtk/gtkcolorsel.c gtk/gtkhsv.c gtk/gtkiconview.c Update to
2005-04-18  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkstyle.c gtk/gtkcolorsel.c gtk/gtkhsv.c gtk/gtkiconview.c
        * gdk/gdkcolor.c gdk/gdkwindow.c gdk/gdkpixbuf-render.c
        gdk/gdkpango.c tests/testcairo.c: Update to new Cairo API for
        setting color and opacity. (#301066, Vincent Noel)
2005-04-18 15:11:01 +00:00
Ivan, Wong Yat Cheung
47b096e223 Fix #300218:
2005-04-11  Ivan, Wong Yat Cheung  <email@ivanwong.info>

	Fix #300218:

	* gdk/win32/gdkselection-win32.c (gdk_selection_convert): Fix
	C99ism.

	* gtk/updateiconcache.c: Guard inclusion of unistd.h and
	utime.h.
2005-04-11 18:59:05 +00:00
Matthias Clasen
324872e3b4 Some more fixes necessary to make building with gcc 4 work.
* gdk/x11/gdkinput-xfree.c:
	* gdk/x11/gdkinput-none.c:
	* gdk/gtk.symbols: Some more fixes necessary to
	make building with gcc 4 work.
2005-04-10 01:01:18 +00:00
Carl Worth
3d9f1d157a Simplify matrix manipulation now that cairo exposes the cairo_matrix_t
* gdk/gdkpango.c: (emboss_context): Simplify matrix manipulation
        now that cairo exposes the cairo_matrix_t structure.

        * gdk/gdkpixbuf-render.c: (gdk_pixbuf_set_as_cairo_source): Track
        cairo API change in signedness of data argument.
2005-04-08 17:21:09 +00:00
Tor Lillqvist
64f6d8cd7f Handle 16 colour display mode. For some reason, in this mode
2005-04-05  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkvisual-win32.c (_gdk_visual_init): Handle 16 colour
	display mode. For some reason, in this mode GetDeviceCaps(BITSPIXEL)
	returns 1 (but GetDeviceCaps(NUMCOLORS)	does return 16). (#143415)
2005-04-05 01:46:59 +00:00
Tor Lillqvist
8b388cd365 Don't force 24bpp GdkVisual on 32bpp displays. (#140706)
2005-04-05  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkvisual-win32.c (_gdk_visual_init): Don't force
	24bpp GdkVisual on 32bpp displays. (#140706)
2005-04-05 00:42:24 +00:00
Tor Lillqvist
0b2ac32cf5 New debugging function, to log a clipboard format name symbolically.
2005-04-04  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkmain.c (_gdk_win32_cf_to_string): New debugging
	function, to log a clipboard format name symbolically.
	(_gdk_win32_data_to_string): Also new, to log random data bytes.

	Implement delayed rendering on Win32, specifically for transfering
	images through the clipboard from GTK+ apps to other
	apps (#168173, implementation by Ivan Wong):

	* gdk/win32/gdkevents-win32.c (gdk_event_translate):
	Handle WM_RENDERFORMAT.

	* gdk/win32/gdkprivate-win32.h
	* gdk/win32/gdkglobals-win32.c: Add _format_atom_table,
	_delayed_rendering_data and _image_bmp.

	* gdk/win32/gdkmain-win32.c: Initialize _image_bmp.

	* gdk/win32/gdkproperty-win32.c (gdk_property_change):
	Accept formats other than GDK_TARGET_STRING or _utf8_string, and
	assume they are handled through delayed rendering.

	* gdk/win32/gdkselection-win32.c (gdk_selection_convert):
	Return all available formats (including those registered by GTK+
	apps) on request_targets.
	(gdk_selection_property_get): We should append a zero byte like
	X11 does.
	(gdk_win32_selection_add_targets): New function, for
	gtkselection's use. Win32 requires that the clipboard owner
	registers all valid formats even if the owner wants delayed
	rendering.
	(_gdk_win32_selection_convert_to_dib): New function. Convert
	images to DIB using gdk-pixbuf.

	* gdk/win32/gdkwin32.h: Declare gdk_win32_selection_add_targets().

	* gtk/gtkselection.c (gtk_selection_add_target,
	gtk_selection_add_targets): Call gdk_win32_selection_add_targets()
	to register target formats.

	* gdk/gdk.symbols: Add gdk_win32_selection_add_targets().
2005-04-04 00:12:26 +00:00
Hans Breuer
0ba6aed77e [merged from gtk-2-6 branch] let dash_offset shift the start of the line
2005-04-03  Hans Breuer  <hans@breuer.org>

	[merged from gtk-2-6 branch]
	* gdk/win32/gdkdrawable-win32.c : let dash_offset shift the start of
	the line pattern not the start of the line. Fixes bug #171641.

	* gtk/makefile.msc.in : follow .symbols changes

	* gdk/win32/gdkwindow-win32.c : declare and resolve GetAncestor()
	dynamically. (It is not available in _WIN_VER <= 0x0400)

	* gdk/win32/makefile.msc : removed gdkpango-win32.obj

	* gtk/gtkhsv.c gtk/gtkstyle.c : use G_PI instead of M_PI

	[also applied to gtk-2-6 branch]
	* gdk/makefile.msc gdk-pixbuf/makefile.msc : handle gdk*alias.def

	* gdk/makefile.msc.in : add gtkmnemonichash.obj

	* test/testgtk.c(set_parent_signal) : use g_message instead of
	g_print to keep the 'testgtk --bench=all' output clean
2005-04-03 21:03:08 +00:00
Matthias Clasen
bf5561d2f6 Include cairo.h
2005-03-30  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdkpixbuf.h: Include cairo.h
2005-03-30 17:40:39 +00:00
Tor Lillqvist
681afb7b6a Fix event filter handling. If an event filter (global, client message
2005-03-30  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkevents-win32.c (gdk_event_translate): Fix event
	filter handling. If an event filter (global, client message
	filter, of window-specific) returns GDK_FILTER_CONTINUE,
	continue as if nothing happened. If it returns
	GDK_FILTER_REMOVE or GDK_FILTER_TRANSLATE, return TRUE from
	gdk_event_translate() which means that DefWindowProc() will
	not be called.
	(gdk_event_translate): Fix client message handling. Append a
	GDK_CLIENT_EVENT unless there is a filter that matches and returns
	something other than GDK_FILTER_CONTINUE. (#135552)
2005-03-30 08:25:45 +00:00
Tor Lillqvist
3618011a5a The state field should represent the state before the event, like on X11.
2005-03-30  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkevents-win32.c (build_pointer_event_state): The
	state field should represent the state before the event, like on
	X11. (#169753)
2005-03-30 08:07:45 +00:00
Søren Sandmann
8e5713f3e0 Don't invalidate areas that are covered by mapped input-output child
Mon Mar 28 15:13:42 2005  Søren Sandmann  <sandmann@redhat.com>

	* gdk/gdkwindow.c (gdk_window_invalidate_maybe_recurse): Don't
	invalidate areas that are covered by mapped input-output child
	windows. Bug 141380.
2005-03-28 20:28:43 +00:00
Matthias Clasen
4c28ce0877 Use canonical names for g_object_notify() as well.
2005-03-26  Matthias Clasen  <mclasen@redhat.com>

	* gtk/*.c:
	* gdk/gdkdisplaymanager.c:
	Use canonical names for g_object_notify() as well.
2005-03-26 05:49:15 +00:00
Matthias Clasen
0660947018 Mark param spec strings as static.
2005-03-21  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdkpango.c (gdk_pango_renderer_class_init):
	* gdk/gdkdisplaymanager.c (gdk_display_manager_class_init): Mark
	param spec strings as static.
2005-03-21 05:17:10 +00:00
Tor Lillqvist
b459ef889c Return the Terminal Services session number, window station name (always
2005-03-20  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkdisplay-win32.c (gdk_display_get_name): Return the
	Terminal Services session number, window station name (always
	"WinSta0" in interactive processes), and desktop name (typically
	"Default"), concatenated with backslash separators.
	(gdk_display_open): Accept only NULL or the string
	gdk_display_get_name() returns as display name.
2005-03-20 21:39:55 +00:00
Owen Taylor
b8663e868f Call cairo_surface_finish()
2005-03-18  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkdrawable-x11.c (_gdk_x11_drawable_finish):
        Call cairo_surface_finish()

        * gdk/gdkinternals.c gdk/x11/gdkdrawable-x11.c: Remoev
        _gdk_windowing_set_surface_device_offset().
2005-03-18 23:51:31 +00:00
Tor Lillqvist
e4515f4dba On WM_MOUSEMOVE, don't check if this process owns the active window. This
2005-03-18  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkevents-win32.c (gdk_event_translate): On
	WM_MOUSEMOVE, don't check if this process owns the active
	window. This makes cross-application widget embedding work better.
	On WM_MOVE, don't bother checking for window visibility.

	* gdk/win32/gdkim-win32.c: Remove bogus empty doc comment. Remove
	unused variables. Add some casts to silence gcc.
2005-03-18 10:21:51 +00:00
Owen Taylor
368f15ca59 Use cairo_set_device_offset().
2005-02-24  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkwindow.c: Use cairo_set_device_offset().

	* gdk/win32/gdkdrawable-win32.[ch] gdk/win32/gdkwindow-win32.c
	gdk/win32/gdkpixmap-win32.c:
	Add_gdk_win32_drawable_acquire/release_dc() to get a DC for the
	drawable. Add _gdk_drawable_win32_finish() to clean up resources
	when a drawable is destroyed.

	* gdk/win32/gdkgc-win32.c gdk/win32/gdkdrawable-win32.c
	(blit_from_pixmap) gdk/win32/gdkprivate-win32.h : Use
	acquire/release_dc when getting a DC to use with a GC or for
	blitting from a pixmap.

	* gdk/win32/gdkdrawable-win32.[ch]: Implement ref_cairo_surface()

	* gdk/win32/gdkpango-win32.c gdk/win32/gdkdrawable-win32.c Makefile.am:
	Remove gdk_screen_get_pango_context(), draw_glyph[_transformed]
	implementations.

	* gdk/win32/gdkdrawable-win32.c: Remove
	gdk_draw_rectangle_alpha_libgtk_only()
2005-03-18 01:23:23 +00:00
Owen Taylor
d1bc66a20c Fix get_stipple_surface to actually work, set EXTEND_REPEAT on the stipple
2005-03-17  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkpango.c: Fix get_stipple_surface to actually work, set
        EXTEND_REPEAT on the stipple pattern.
2005-03-17 20:53:34 +00:00
Tor Lillqvist
691bea134f gdk_key is a typedef, not a struct tag.
2005-03-17  Tor Lillqvist  <tml@novell.com>

	* gdk/gdkkeynames.c: gdk_key is a typedef, not a struct tag.
2005-03-17 12:05:16 +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
Manish Singh
f0ce2b12a2 Shut up CVS 2005-03-16 04:36:05 +00:00
Manish Singh
9e7f4ff465 #include gdkaliasdef.c here too.
Tue Mar 15 20:34:33 2005  Manish Singh  <yosh@gimp.org>

        * gdk/x11/gdkinput-xfree.c: #include gdkaliasdef.c here too.
2005-03-16 04:35:33 +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
Tor Lillqvist
34bfd71279 gdk/win32/gdkprivate-win32.h Drop global variable _gdk_root_window, just
2005-03-16  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkprivate-win32.h
	* gdk/win32/*.c: Drop global variable _gdk_root_window, just call
	GetDesktopWindow(). Rename the GdkWindow* _gdk_parent_root to
	_gdk_root.

	* gdk/win32/gdkwindow-win32.h (GdkWindowImplWin32): Add
	toplevel_window_type field.

	* gdk/win32/gdkwindow-win32.c: As there is only one root
	window in GDK on Win32, we can compare directly to _gdk_root
	instead of checking the window type.
	(gdk_window_reparent): When reparenting a child of the desktop
	clear out the window decorations. Correspondingly, when
	reparenting to the desktop, add decorations. As in the X11
	backend, save the window type of a toplevel window when
	reparenting, in case it is reparented back to toplevel.
2005-03-16 02:21:14 +00:00
Tor Lillqvist
df9768cf3a Print debugging output only if asked for, not always.
2005-03-16  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkdisplay-win32.c (_win32_on_clipboard_change): Print
	debugging output only if asked for, not always.

	* gdk/win32/*.c: Use the %+d%+d format for coordinate pairs in
	debugging printout instead of +%d+%d. Misc other additions and
	cosmetic improvements to debugging printouts. Use API_CALL() and
	GDI_CALL() macros in more places.

	* gdk/win32/gdkwindow-win32.c (gdk_window_move, gdk_window_resize,
	gdk_window_move_resize): To detect child windows, check whether
	the real parent is not the desktop window, instead of relying on
	the GDK window type being GDK_WINDOW_CHILD. Foreign GtkPlug
	windows have a GDK window type GDK_WINDOW_FOREIGN, but are still
	de facto child windows.
2005-03-16 01:38:57 +00:00
Tor Lillqvist
7c12edeb93 New debugging function. As GetKeyNameText() returns a localized key name
2005-03-15  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkmain-win32.c (_gdk_win32_key_to_string): New
	debugging function. As GetKeyNameText() returns a localized key
	name we need to convert it to UTF-8.

	* gdk/win32/gdkprivate-win32.h: Declare it.

	* gdk/win32/gdkevents-win32.c: Use it.

	* gdk/win32/gdkwindow-win32.c (gdk_window_new_internal): Fix
	handling of children of foreign windows. They should be child
	windows from Windows's perspective, even if they are toplevel GDK
	windows.
2005-03-15 02:07:08 +00:00
Ivan, Wong Yat Cheung
706ff83a7d A further fix for big window support. Now also the test in testgtk works.
2005-03-13  Ivan, Wong Yat Cheung  <email@ivanwong.info>

	* gdk/win32/gdkgeometry-win32.c (gdk_window_scroll): A further fix
	for big window support. Now also the test in testgtk works.
2005-03-12 22:09:54 +00:00
Ivan, Wong Yat Cheung
ad24594d10 Big window fix for Win32. Big windows are still emulated within 16-bit
2005-03-12  Ivan, Wong Yat Cheung  <email@ivanwong.info>

	Big window fix for Win32. Big windows are still emulated within
	16-bit coordinate limits, though. Big windows now work on NT-based
	Windows. (#169989)

	* gdk/win32/gdkgc-win32.c (_gdk_win32_gdkregion_to_hrgn): Use
	32-bit coordinates.

	* gdk/win32/gdkgeometry-win32.c: Largely rewrite.

	* gdk/win32/gdkwindow-win32.c: Minor related changes.
2005-03-11 23:50:21 +00:00
Matthias Clasen
3c8b5b490c Convert the gdk keyval-keyname tables to a big string + offsets. (#168901)
2005-03-07  Matthias Clasen  <mclasen@redhat.com>

	Convert the gdk keyval-keyname tables to a big string
	+ offsets. (#168901)

	* gdk/gen-keyname-table.pl: Perl script inspired by
	pango/tools/gen-color-table.pl to create the
	gdk_keys_by_keyval and gdk_keys_by_name tables as lists
	of offsets pointing into a big const string.

	* gdk/keynames.txt: List of keyval-keyname pairs.
	* gdk/keyname-table.h: Generated tables.

	* gdk/gdkkeynames.c: Include keyname-table.h and don't
	generate the inverse table at runtime.
2005-03-08 04:35:29 +00:00
Manish Singh
de1e169e44 Cast to avoid const warnings on data structure seeding.
Tue Mar  1 14:04:08 2005  Manish Singh  <yosh@gimp.org>

        * gdk/x11/gdkproperty-x11.c (virtual_atom_check_init): Cast to avoid
        const warnings on data structure seeding.
2005-03-01 22:25:42 +00:00
Matthias Clasen
6da29b43a6 gdk/gdkkeyuni.c gdk/gdkpixbuf-drawable.c gdk/gdkrgb.c gdk/x11/gdkdnd-x11.c
2005-03-01  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdkkeyuni.c
	* gdk/gdkpixbuf-drawable.c
	* gdk/gdkrgb.c
	* gdk/x11/gdkdnd-x11.c
	* gdk/x11/gdkevents-x11.c
	* gdk/x11/gdkproperty-x11.c
	* gdk/x11/gdkvisual-x11.c
	* gdk-pixbuf/gdk-pixbuf.c
	* gtk/gtkaction.c
	* gtk/gtkbindings.c
	* gtk/gtkcolorbutton.c
	* gtk/gtkcombo.c
	* gtk/gtkcontainer.c
	* gtk/gtkfilechooserdefault.c
	* gtk/gtkfilesel.c
	* gtk/gtkgamma.c
	* gtk/gtkiconview.c
	* gtk/gtkinputdialog.c
	* gtk/gtkitemfactory.c
	* gtk/gtkmenu.c
	* gtk/gtktextview.c
	* gtk/gtktooltips.c
	* gtk/gtktreedatalist.c
	* gtk/gtkuimanager.c
	* gtk/tree_minus.xpm
	* gtk/tree_plus.xpm
	* gtk/xdgmime/xdgmime.c
	* gtk/xdgmime/xdgmime.h:
	Move constant data to .rodata.
2005-03-01 06:25:55 +00:00
Robert Ögren
81c1b1dade Implement better handling of Wintab tablet context overlap on Win32.
2005-02-24  Robert Ögren  <gtk@roboros.com>

	Implement better handling of Wintab tablet context overlap on
	Win32. (#167298)

	* gdk/win32/gdkinput-win32.c (_gdk_input_set_tablet_active): New
	function that brings any tablet contexts to the top of the overlap
	order.
	* gdk/win32/gdkinput-win32.h: Declare _gdk_input_set_tablet_active ()
	* gdk/win32/gdkevents-win32.c (gdk_event_translate):
	Call _gdk_input_set_tablet_active when a window is activated (on
	WM_ACTIVATE)
2005-02-25 00:12:32 +00:00
Tor Lillqvist
2fd6edba8d Workaround for bug in MapVirtualKey(VK_DIVIDE, 0) in some Windows
2005-02-23  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkkeys-win32.c (update_keymap): Workaround for bug in
	MapVirtualKey(VK_DIVIDE, 0) in some Windows versions. (#142998)
2005-02-23 22:06:38 +00:00
Federico Mena Quintero
9b3fb6c3bb Merged from gtk-2-6:
2005-02-22  Federico Mena Quintero  <federico@ximian.com>

	Merged from gtk-2-6:

	Fix #164940, patch by Ben Maurer and Tommi Komulainen.

	* gdk/gdkrgb.c (gdk_rgb_convert_565_d): Constify the "dmp" variable.
	(gdk_rgb_convert_565_d): Likewise.
	(DM_565): Made a static const precomputed array to avoid
	allocating it at runtime.
	(gdk_rgb_preprocess_dm_565): #ifdef out.
2005-02-22 19:30:20 +00:00
Matthias Clasen
5a7cb2374a Set have_render_with_trapezoids to GDK_YES when we have a new enough
2005-02-20  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkdrawable-x11.c (_gdk_x11_have_render_with_trapezoids):
	Set have_render_with_trapezoids to GDK_YES when we have
	a new enough Render extension.  (#167965,Billy Biggs)
2005-02-21 04:09:18 +00:00
Hans Breuer
4c1cab8dff build with Cairo dependency. The patch to acually use Cairo on win32 will
2005-02-05  Hans Breuer  <hans@breuer.org>

	* gdk/makefile.msc gdk/win32/makefile.msc gtk/makefile.msc.in :
	build with Cairo dependency. The patch to acually use Cairo
	on win32 will be on gtk-devel-list soon.
	* tests/makefile.msc : add testcairo building

	* gtk/stock-icons/makefile.msc : split command line into two to
	work with the shells default
2005-02-07 20:22:05 +00:00
Manish Singh
5c271537cb #include cairo-xlib.h
Thu Feb  3 19:15:55 2005  Manish Singh  <yosh@gimp.org>

        * gdk/x11/gdkdrawable-x11.c: #include cairo-xlib.h
2005-02-04 03:16:54 +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
64768cae2a Make the gdk_key array const (#166075, Tommi Komulainen)
2005-02-03  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdkkeynames.c: Make the gdk_key array const (#166075,
	Tommi Komulainen)
2005-02-03 15:41:08 +00:00
Tor Lillqvist
8c323acbae Implement lazy extended input initialization on Win32, by Robert Ögren.
2005-02-02  Tor Lillqvist  <tml@novell.com>

	Implement lazy extended input initialization on Win32, by Robert
	Ögren. Fixes #163163, possibly #162334. Lazy initialization would
	be a good idea in any case even if it didn't fix any visible
	problems, though.

	The Wacom tablet driver seems to get confused if Wintab is
	initialized but no window is shown before the process exits. This
	is the case for some GIMP plug-ins, for instance.

	* gdk/win32/gdkinput-win32.c (_gdk_input_wintab_init_check): Made
	non-static (and renamed).
	(_gdk_input_init): Don't call _gdk_input_wintab_init_check().

	* gdk/win32/gdkinput-win32.h: Declare _gdk_input_wintab_init_check().

	* gdk/win32/gdkinput.c (gdk_devices_list,
	gdk_display_list_devices, gdk_input_set_extension_events): Call
	_gdk_input_wintab_init_check() here instead.
2005-02-02 18:11:17 +00:00
Ivan, Wong Yat Cheung
c922869cdf Use a FIFO list for storing GdkSelProp of a single window so that
2005-02-02  Ivan, Wong Yat Cheung  <email@ivanwong.info>

	* gdk/win32/gdkselection.c: Use a FIFO list for storing GdkSelProp
	of a single window so that gtk_clipboard_request_contents() can be
	called inside a GtkClipboardReceivedFunc(). (#163844)
2005-02-02 17:31:47 +00:00
Matthias Clasen
1d0c7ea1bb Fix many instances of "the the" in docs and comments. (#165815, Masao
2005-02-01  Matthias Clasen  <mclasen@redhat.com>

	* */*.c: Fix many instances of "the the" in docs and
	comments.  (#165815, Masao Mutoh)
2005-02-01 18:15:09 +00:00
Tor Lillqvist
c4d19dfa21 Remove superfluous blank line. 2005-02-01 11:31:24 +00:00
Tor Lillqvist
7a2e34562c New functions, code blocks refactored out of update_keymap(). No
2005-02-01  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkkeys-win32.c (handle_special, set_shift_vks,
	reset_after_dead, handle_dead): New functions, code blocks
	refactored out of update_keymap(). No functionality change.

	(update_keymap): Use ToUnicodeEx() when available (on NT-based
	Windows) instead of ToAsciiEx(). Makes keyboard input work in
	Unicode-only input locales that don't have any ANSI codepage, for
	instance Hindi and Bengali. Use _gdk_input_codepage only on
	Win9x. (#165723)

	* gdk/win32/gdkevents-win32.c (gdk_event_translate): On
	WM_INPUTLANGCHANGE, use GetLocaleInfo() instead of
	TranslateCharsetInfo() to get the input locale's corresponding
	codepage, if any.
2005-02-01 11:26:05 +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
Matthias Clasen
06a19ba693 Initialize user_time from DESKTOP_STARTUP_ID. (#165131, Elijah Newren)
2005-01-24  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkdisplay-x11.c (_gdk_windowing_set_default_display):
	Initialize user_time from DESKTOP_STARTUP_ID.  (#165131,
	Elijah Newren)
2005-01-25 04:02:55 +00:00
Matthias Clasen
a7f083932d Remove the accidentally added prototype for this unimplemented
2005-01-22  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdkdisplay.h (gdk_display_add_client_message_filter_full):
	Remove the accidentally added prototype for this unimplemented
2005-01-23 04:26:41 +00:00
Tor Lillqvist
736f4c8758 Fix for #163702, from Ivan Wong:
2005-01-23  Tor Lillqvist  <tml@novell.com>

	Fix for #163702, from Ivan Wong:

	* gdk/win32/gdkprivate-win32.h
	* gdk/win32/gdkglobals-win32.c: New flag _ignore_destroy_clipboard.

	* gdk/win32/gdkevents-win32.c (gdk_event_translate): Handle
	WM_DESTROYCLIPBOARD. Unless _ignore_destroy_clipboard, generate a
	GDK_SELECTION_CLEAR event.

	* gdk/win32/gdkselection-win32.c
	(gdk_selection_owner_set_for_display): Set _ignore_destroy_clipboard
	when emptying the clipboard ourselves.

	(gdk_selection_send_notify_for_display): Remove the artifical
	GDK_SELECTION_CLEAR event generation.
2005-01-23 00:38:17 +00:00
Tor Lillqvist
26629f7a93 Handle Greek tonos dead accent key. (#164859, reported and fix verified by
2005-01-23  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkkeys-win32.c (update_keymap): Handle Greek tonos
	dead accent key. (#164859, reported and fix verified by Daniel
	Atallah.)

	* gtk/gtkimcontextsimple.c (gtk_compose_seqs): Handle
	GDK_Greek_accentdieresis (tonos and dialytika) combining with iota
	and upsilon.
2005-01-23 00:20:12 +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
Tor Lillqvist
d2b62140cd Handle keyboards with ShiftLock (and not CapsLock) correctly. (#161814)
2005-01-19  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkkeys-win32.c (update_keymap,
	gdk_keymap_translate_keyboard_state): Handle keyboards with
	ShiftLock (and not CapsLock) correctly. (#161814)
2005-01-19 22:48:30 +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
56e0ee04fc Add a function to obtain the last user interaction time. (#163119, Elijah
2005-01-19  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdk.symbols:
	* gdk/x11/gdkx.h:
	* gdk/x11/gdkdisplay-x11.c (gdk_x11_display_get_user_time):
	Add a function to obtain the last user interaction
	time.  (#163119, Elijah Newren)
2005-01-19 14:37:56 +00:00
Manish Singh
d73a8e0cad Tue Jan 18 13:46:46 2005 Manish Singh <yosh@gimp.org
* gdk/x11/gdkdrawable-x11.c (_gdk_x11_have_render_with_trapezoids):
        disambiguate nested if/else.
2005-01-18 21:47:51 +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
Matthias Clasen
014a347f00 Avoid X errors when running against servers which implement XRender < 0.4.
2005-01-18  Matthias Clasen  <mclasen@redhat.com>

	Avoid X errors when running against servers which
	implement XRender < 0.4.  (#164427, Albert Chin)

	* gdk/x11/gdkprivate-x11.h:
	* gdk/x11/gdkdrawable-x11.c (_gdk_x11_have_render_with_trapezoids):
	New function to check for trapezoid support in XRender.
	(gdk_x11_draw_trapezoids, _gdk_x11_drawable_draw_xtrapezoids):
	Use it here.

	* gdk/x11/gdkdisplay-x11.h (struct _GdkDisplayX11): Add a
	separate have_render_with_trapezoids field.

	* gdk/x11/gdkdisplay-x11.c (gdk_display_open): Initialize it.
2005-01-18 15:19:53 +00:00
Matthias Clasen
130b7826b5 Add an OS_LINUX conditional.
2005-01-13  Matthias Clasen  <mclasen@redhat.com>

	* configure.in: Add an OS_LINUX conditional.

	* gdk/Makefile.am (TESTS):
	* gdk-pixbuf/Makefile.am (TESTS):
	* gtk/Makefile.am (TESTS): Only run abicheck on Linux.  (#163917,
	Roger Leigh)
2005-01-13 15:19:27 +00:00
Tor Lillqvist
e34f0452b4 Fix for #162790, by Iwan Wong:
2005-01-12  Tor Lillqvist  <tlillqvist@novell.com>

	Fix for #162790, by Iwan Wong:

	* gdk/win32/gdkdrawable-win32.c: Implement dashed lines
	correctly. Simplify the interface to render_line_horizontal() and
	render_line_vertical(). Need to draw lines "manually" also on
	NT-based Windowses if we have a dash offset or are drawing
	double-dashed lines.

	* gdk/win32/gdkprivate-win32.h: Keep also the dash offset,
	double-dash flag, and a brush for the background colour (used by
	the odd dashes in the double-dash line style) in the GdkGCWin32
	struct.

	* gdk/win32/gdkgc-win32.c: Set up above new fields.
2005-01-12 21:28:03 +00:00
Tor Lillqvist
95ab1e7123 Set current cursor also when changing the cursor of a window that is the
2005-01-09  Tor Lillqvist  <tlillqvist@novell.com>

	* gdk/win32/gdkwindow-win32.c (gdk_window_set_cursor): Set current
	cursor also when changing the cursor of a window that is the first
	ancestor of the window containing the pointer that has a cursor
	defined. (#163035, Ivan Wong)
2005-01-09 19:26:25 +00:00
Tor Lillqvist
47806a7be3 Fix braino. (#163232, Arnaud Charlet)
2005-01-07  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkselection-win32.c (_gdk_selection_property_store):
	Fix braino. (#163232, Arnaud Charlet)
2005-01-07 14:36:08 +00:00
Matthias Clasen
7e4cf78803 Update the user time when receiving a WM_DELETE message. (#162980, Elijah
2005-01-05  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkevents-x11.c (gdk_wm_protocols_filter): Update
	the user time when receiving a WM_DELETE message.  (#162980,
	Elijah Newren)
2005-01-05 16:27:52 +00:00
Matthias Clasen
34982b41d2 Set x_root and y_root in button and motion events from extended input
2004-12-27  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkinput-x11.c (_gdk_input_common_other_event):
	Set x_root and y_root in button and motion events from
	extended input devices.  (#148715, Robert Ögren)
2004-12-28 01:09:45 +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
Tor Lillqvist
78e869fe97 Use wide character API when available. Use UTF-8 for filenames.
2004-12-19  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkdnd-win32.c (resolve_link, gdk_dropfiles_filter):
	Use wide character API when available. Use UTF-8 for filenames.

	* gdk/win32/gdkselection-win32.c (_gdk_dropfiles_store): Include
	the string's trailing zero byte in the property's length, just for
	safety.
2004-12-19 21:00:58 +00:00
Tor Lillqvist
55ef0b48c3 Indentation fix. Won't bother with a ChangeLog entry. 2004-12-15 22:27:40 +00:00
Matthias Clasen
00c069f2b6 2.5.6 2004-12-03 06:32:17 +00:00
Tor Lillqvist
5d90733686 gdk-pixbuf/Makefile.am (gdk_pixbuf.def) gdk/Makefile.am (gdk.def) Work
2004-12-03  Tor Lillqvist  <tml@iki.fi>

	* gdk-pixbuf/Makefile.am (gdk_pixbuf.def)
	* gdk/Makefile.am (gdk.def)
	* gtk/Makefile.am (gtk.def): Work around gcc misfeature. At least
	gcc 3.3.1 doesn't like to do -E on files that it thinks aren't
	source files. Use redirection and '-' instead.
2004-12-03 04:05:10 +00:00