Commit Graph

509 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Hans Breuer
8dcf7d1d8a remove the disputable memset at the end of gdk_pixmap_new() - on X11 the
2004-11-30  Hans Breuer  <hans@breuer.org>

	* gdk/win32/gdkpixmap-win32.c : remove the disputable memset at
	the end of gdk_pixmap_new() - on X11 the bits are not initialized
	either - fixes bug #145107

	* gtk/gtkfilesystemwin32.c : add an idle handler to emit "volumes-changed"
	when drives are plugged in or removed. Fixes bug #137815
2004-11-30 22:56:35 +00:00
Hans Breuer
6a3a2cd344 updated
2004-11-21  Hans Breuer  <hans@breuer.org>

	* gdk/makefile.msc.in gtk/stock-icons/makefile.msc
	  gtk/makefile.msc.in demos/gtk-demo/makefile.msc.in : updated

	* gdk/win32/gdkdrawable-win32.c : implement gdk_win32_draw_glyphs_transformed()
	* gdk/win32/gdkgc-win32.c : implement _gdk_windowing_gc_get_foreground()

	* demos/gtk-demo/rotated_text.c : use G_PI
2004-11-21 21:01:28 +00:00
Manish Singh
60b30ff513 gdk/linux-fb/gdkgc-fb.c gdk/win32/gdkgc-win32.c
Fri Nov 19 14:54:09 2004  Manish Singh  <yosh@gimp.org>

        * gdk/linux-fb/gdkgc-fb.c
        * gdk/win32/gdkgc-win32.c
        * gdk/win32/gdkwindow-win32.c
        * gtk/gtkaboutdialog.c
        * gtk/gtkaction.c
        * gtk/gtkactiongroup.c
        * gtk/gtkcellrendererprogress.c
        * gtk/gtkcellview.c
        * gtk/gtkcolorbutton.c
        * gtk/gtkcombobox.c
        * gtk/gtkcomboboxentry.c
        * gtk/gtkentrycompletion.c
        * gtk/gtkfilechooserbutton.c
        * gtk/gtkmenutoolbutton.c
        * gtk/gtkrc.c
        * gtk/gtksettings.c
        * gtk/gtkstyle.c
        * gtk/gtktoggletoolbutton.c
        * gtk/gtktoolbutton.c
        * gtk/gtktoolitem.c
        * gtk/gtktreemodelfilter.c
        * gtk/gtktreeselection.c
        * gtk/gtktreeviewcolumn.c
        * gtk/gtkuimanager.c: get rid of unnecessary casts.

        * gtk/gtkfilechooserbutton.c (gtk_file_chooser_button_set_property):
        cast away the const for g_value_set_enum. This is after the g_warning,
        so this is a hack to begin with.

        * gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_set_property):
        add a cast to GTK_FILE_CHOOSER for impl here.
2004-11-19 23:18:38 +00:00
Matthias Clasen
d7e3747b49 Fix a copy-and-paste error. (#158459)
2004-11-16  Matthias Clasen  <mclasen@redhat.com>

	* gdk/win32/gdkevents-win32.c (gdk_event_translate): Fix a
	copy-and-paste error.  (#158459)
2004-11-16 17:32:15 +00:00
Tor Lillqvist
430a02d854 Fix for #137551, by Robert Ögren:
2004-11-11  Tor Lillqvist  <tml@iki.fi>

	Fix for #137551, by Robert Ögren:

	* gdk/win32/gdkevents-win32.c (generate_focus_event): New function.

	(gdk_keyboard_grab, gdk_keyboard_ungrab): Generate focus change
	events.

	(gdk_event_translate): Check for keyboard grabs and not pointer
	grabs when handling WM_{SET,KILL}FOCUS. Use generate_focus_event().
2004-11-11 22:00:11 +00:00
Tor Lillqvist
34cbb87cc3 Event timestamps don't have to be unique. As long as they are
2004-11-10  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkevents-win32.c (_gdk_win32_get_next_tick):
	Event timestamps don't have to be unique. As long as they are
	nondecreasing we should be fine. Solves problems with for instance
	long menus not staying up on first click. (#152035, Robert Ögren)
2004-11-10 22:04:47 +00:00
Tor Lillqvist
a841d12888 gdk/win32/gdkprivate-win32.h gdk/win32/gdkglobals-win32.c Remove
2004-10-31  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkprivate-win32.h
	* gdk/win32/gdkglobals-win32.c
	* gdk/win32/gdkmain-win32.c: Remove _windows_version and the
	IS_WIN_NT() macro.

	* gdk/win32/*.c: Use G_WIN32_IS_NT_BASED() from GLib instead.
2004-10-31 14:47:15 +00:00
Robert Ögren
819e36e5cb Implement these on win32, currently only for button 1. Fixes the resize
2004-10-29  Robert Ögren  <gtk@roboros.com>

	* gdk/win32/gdkwindow-win32.c (gdk_window_begin_resize_drag),
	(gdk_window_begin_move_drag): Implement these on win32, currently
	only for button 1. Fixes the resize grip of GtkStatusbar on
	win32. (#143285)
2004-10-30 18:04:49 +00:00
Hans Breuer
9002d5c310 updated
2004-10-29  Hans Breuer  <hans@breuer.org>

	* gdk/makefile.msc gtk/makefile.msc.in : updated

	* gdk/win32/gdkdisplay-win32.c : dummy implementations for
	gdk_display_supports_clipboard_persistence, gdk_display_store_clipboard

	* gtk/gtkmodules.c : #include "gtkprivate.h" for GTK_LIBDIR
2004-10-29 21:44:53 +00:00
Tor Lillqvist
8439956a9c Set _gdk_input_ignore_wintab to FALSE, thus enabling tablet input by
2004-10-01  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkglobals-win32.c: Set _gdk_input_ignore_wintab to
	FALSE, thus enabling tablet input by default.

	* gdk/win32/gdkmain-win32.c (_gdk_windowing_args): Accept the
	--use-wintab option again (but without effect, as this is now the
	default, see above). (#153788)

	* modules/input/gtkimcontextime.c: Numerous changes.

	Remove the ifdef UNICODE conditionals. Always use the
	wide-character Imm* API. It is present also in Windows 98 and
	Me. (Not Windows 95, but I think we don't care about that.) Using
	the multibyte API wouldn't work anyway on systems where the system
	codepage doesn't support the language the user uses an IME for, so
	for instance I wouldn't be able to test this module on my English
	Windows 2000 although I do have C, J and K IMEs available.

	Guard against IMM not being active, always check ImmGetContext()
	returning NULL. Work to some extent even without any IME. Fixes
	#153800 at least partially.

	* modules/input/imime.c (ime_info): Rename to "ime" to match the
	naming pattern of other input modules. Make it default for
	ja:ko:zh only.
2004-10-01 19:53:55 +00:00
Robert Ögren
f47afed1ff Set lcSysOrgX and lcSysOrgY from device instead of hardcoding to 0, a
2004-09-25  Robert Ögren  <gtk@roboros.com>

	* gdk/win32/gdkinput-win32.c (gdk_input_wintab_init): Set
	lcSysOrgX and lcSysOrgY from device instead of hardcoding to 0,
	a further fix for bug #145467.
2004-09-25 20:24:04 +00:00
Matthias Clasen
542a674e7c 2.5.3 2004-09-19 05:40:00 +00:00
Tor Lillqvist
a96d0b38c6 Remove bogus code that tried to do what the X11 backend does in its
2004-09-15  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkwindow-win32.c (gdk_window_get_frame_extents):
	Remove bogus code that tried to do what the X11 backend does in
	its version of this function. There are no "frame windows" (for
	toplevel window decoration) on Windows. The desktop ("root")
	window is not the parent of a toplevel window. (#152481)
2004-09-15 18:37:45 +00:00
Matthias Clasen
e1077caf36 Add descriptions for the commandline arguments. The actual descriptions
Sun Sep  5 17:14:16 2004  Matthias Clasen  <maclas@gmx.de>

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

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

	* tests/testtreemodel.c: (main):
	Use gtk_init_with_args.
2004-09-05 15:09:55 +00:00
Tor Lillqvist
f8ef369e78 List the three theme gtkrc files separately, zip doesn't do anything if
2004-09-03  Tor Lillqvist  <tml@iki.fi>

	* gtk-zip.sh.in: List the three theme gtkrc files separately, zip
	doesn't do anything if one of the files on its command line
	doesn't exist.

	Handle changes of screen resolution on Win32. (#151581, reported by
	Arjohn Kampman)

	* gdk/win32/gdkwindow-win32.c (_gdk_windowing_window_init,
	_gdk_root_window_size_init): Factor out setting the root window's
	size (as the size of the union of all monitors) to a new function.

	* gdk/win32/gdkdisplay-win32.c (gdk_display_open,
	_gdk_monitor_init): Factor out the monitor query to a new
	function.

	* gdk/win32/gdkprivate-win32.h: Declare above new functions.

	* gdk/win32/gdkevents-win32.c (gdk_event_translate,
	handle_display_change): Handle WM_DISPLAYCHANGE by calling the
	above two functions, and emitting the "size_changed" signal on our
	(only) GdkScreen.
2004-09-03 01:27:57 +00:00
Matthias Clasen
f5ffc36e35 Make "ms-windows" the default theme on Win32.
Tue Aug 31 23:40:29 2004  Matthias Clasen  <maclas@gmx.de>

	* gdk/win32/gdkproperty-win32.c (gdk_screen_get_setting): Make
	"ms-windows" the default theme on Win32.
2004-09-01 03:41:35 +00:00
Robert Ögren
c0ba86bc81 On Win32, do not produce tablet motion or button events while a window is
2004-08-28  Robert Ögren  <gtk@roboros.com>

	On Win32, do not produce tablet motion or button events while a
	window is being moved or resized. (#151090, reported by Shaneyfelt)

	* gdk/win32/gdkprivate-win32.h
	* gdk/win32/gdkglobals-win32.c
	* gdk/win32/gdkevents-win32.c: Rename the variable resizing to
	_sizemove_in_progress and make it extern.

	* gdk/win32/gdkinput-win32.c (_gdk_input_other_event): Ignore
	motion and button events if _sizemove_in_progress is true.
2004-08-31 19:13:24 +00:00
Tor Lillqvist
eb388dfcfe Add drop_failed, like in the X11 backend. Nothing sets it, though.
2004-08-27  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkdnd-win32.c (GdkDragContextPrivateWin32): Add
	drop_failed, like in the X11 backend. Nothing sets it, though.
	(gdk_drag_drop_succeeded): Copy from X11 backend.
2004-08-27 23:38:06 +00:00
Robert Ögren
eee651cc91 On Win32, make graphical tablets work on multi-monitor systems. (#145467,
2004-08-22  Robert Ögren  <gtk@roboros.com>

	On Win32, make graphical tablets work on multi-monitor systems.
	(#145467, reported by buttknock1@ya...)

	* gdk/win32/gdkinput-win32.c (gdk_input_translate_coordinates):
	Use dimensions of _gdk_parent_root as screen size.
	(gdk_input_get_root_relative_geometry): Get coordinates relative
	to GDK root window instead of Win32 coordinates.
	(_gdk_input_other_event): Updated accordingly.
2004-08-26 00:57:40 +00:00
Tor Lillqvist
7ed263a266 Don't show TEMP windows in the Task Manager. Implement by calling
2004-08-22  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkwindow-win32.c (gdk_window_new_internal,
	gdk_window_new, gdk_window_set_skip_taskbar_hint): Don't show TEMP
	windows in the Task Manager. Implement by calling
	gdk_window_set_skip_taskbar_hint(TRUE) on them. (#145481, Tim
	Evans)
2004-08-22 19:16:22 +00:00
Tor Lillqvist
a63a44ff3b Report whole of (primary) monitor, including any taskbars. Excluding the
2004-08-22  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkdisplay-win32.c (enum_monitor, gdk_display_open):
	Report whole of (primary) monitor, including any taskbars.
	Excluding the taskbar area from the "root window" reported to GDK
	doesn't seem to be that useful although gdk/win32 had been doing it
	for a very long time. (#149013, see also #145467 and #148526)
2004-08-22 16:59:14 +00:00
Hans Breuer
2c3388b72f autogenerate gtk.def, cleanup
2004-08-09  Hans Breuer  <hans@breuer.org>

	* gtk/makefile.msc.in : autogenerate gtk.def, cleanup

	* gdk/win32/gdkwindow-win32.c gdk/win32/gdkevents-win32.c :
	removed long time unused ifdef/ed code (WITHOUT_WM_CREATE),
	removed duplicated call to gdk_window_set_cursor()
2004-08-09 21:32:58 +00:00
Hans Breuer
794776640b take targets into account again to allow dnd of other things than text
2004-08-07  Hans Breuer  <hans@breuer.org>

	* gtk/gtkdnd.c (gtk_drag_dest_set) : take targets into
	account again to allow dnd of other things than text

	* gdk/win32/gdkselection-win32.c : offer windows bitmap to
	be pasted from clipboard (makes The GIMP 2.1's
	"File/Acquire/Paste as New" work, only using gtk+ API)
2004-08-08 22:31:12 +00:00
Tor Lillqvist
2fdbd4e878 Don't hardcode mapping of VK_DECIMAL to GDK_KP_Decimal. Instead, let
2004-08-07  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkkeys-win32.c (update_keymap): Don't hardcode
	mapping of VK_DECIMAL to GDK_KP_Decimal. Instead, let ToAsciiEx()
	map it to what's printed on the keypad decimal key for the current
	input locale (keyboard layout). (#149404)
2004-08-07 23:35:41 +00:00
Tor Lillqvist
5f7fbb27c2 WM_WINDOWPOSCHANGED): Add _gdk_offset_{x,y} to top-level window
2004-08-07  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkevents-win32.c (handle_configure_event,
	gdk_event_translate:WM_WINDOWPOSCHANGED): Add _gdk_offset_{x,y} to
	top-level window coordinates, not just in generated
	events. (#148526, Robert Ögren)
2004-08-07 21:46:28 +00:00
Hans Breuer
7405177690 make it compile and more similar to the X11 implementation [backward
2004-08-06  Hans Breuer  <hans@breuer.org>

	* gdk/win32/gdkwindow-win32.c : make it compile and more
	similar to the X11 implementation [backward compatibility
	for GDK_WINDOW_TEMP, GDK_INPUT_ONLY (fixes bug #148702),
	use the *screen* function variants, dont reparent already
	destroyed]
	(get_visible_region) : take the win32 part into account
	(_gdk_windowing_window_destroy) : remove from handle table

	* gdk/win32/gdkdisplay-win32.c : added
	gdk_display_(request|supports)_selection_notification ()
	with a currently mostly pointless implementation ;-)

	* gtk/gtkfilesystemwin32.c (*_to_path) : same changes as on *NIX,
	plugs memory leak
	(gtk_file_system_win32_render_icon) : use new GTK_STOCK_DIRECTORY

	* gtk/makefile.msc.in demos/gtk-demo/makefile.msc.in
	  gtk/stock-icons/makefile.msc tests/makefile.msc : updated

	* gdk/gdk.def gtk/gtk.def : updated externals

	* tests/testiconview.c : remove unneeded dirent.h inclusion
2004-08-06 19:20:42 +00:00
Robert Ögren
b65449a7e8 Set x_root and y_root in button and motion events from the tablet.
2004-07-28  Robert Ögren  <gtk@roboros.com>

	* gdk/win32/gdkinput-win32.c (_gdk_input_other_event): Set x_root
	and y_root in button and motion events from the tablet. (#148715)
2004-08-06 01:56:22 +00:00
Anders Carlsson
564ab37a07 Add gdk_draw_rectangle_alpha_libgtk_only which uses XRenderFillRectangle
2004-07-27  Anders Carlsson  <andersca@gnome.org>

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

	* gtk/gtkiconview.c:
	(gtk_icon_view_paint_rubberband):
	Use gdk_draw_rectangle_alpha_libgtk_only here.
2004-07-27 21:58:09 +00:00
Soeren Sandmann
1a5e92dd61 Bug 143330, support update counter spec.
Sun Jul 11 15:24:03 2004  Soeren Sandmann  <sandmann@daimi.au.dk>

	Bug 143330, support update counter spec.

	* configure.in: Add check for the Sync extension

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

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

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

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

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

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

	* gdk/linux-fb/gdkwindow-fb.c, gdk/win32/gdkwindow-win32.c: Add
	stubs for enable_synchronized_configure() and configure_finished()
2004-07-11 13:26:57 +00:00
Tor Lillqvist
d8b2f46c18 gdk/win32/gdkdrawable-win32.c (gdk_win32_draw_text)
2004-07-07  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkdrawable-win32.c (gdk_win32_draw_text)
	* gdk/win32/gdkfont-win32.c (gdk_text_extents)
	* gdk/win32/gdkproperty-win32.c (find_common_locale,
	gdk_property_change)
	* gdk/win32/gdkselection-win32.c (gdk_selection_convert): Use
	g_utf8_to_utf16() instead of the removed _gdk_utf8_to_ucs2() (see
	below).

	* gdk/win32/gdkglobals-win32.c
	* gdk/win32/gdkmain-win32.c (_gdk_windowing_init)
	* gdk/win3/gdkprivate-win32.h: Add a variable for the TARGETS
	atom. Initialize it. Declare it. Drop the variable for the
	COMPOUND_TEXT atom.

	* gdk/win32/gdkim-win32.c (gdk_wcstombs): Don't return UTF-8. This
	function is supposed to return the string in the locale's charset
	and encoding. Use g_convert().

	(gdk_mbstowcs): Similarily, don't take an UTF-8 string, but a
	string in the locale's charset. Use g_convert().

	(_gdk_ucs2_to_utf8, _gdk_utf8_to_wcs, _gdk_utf8_to_ucs2):
	Delete. The UCS-2 functions didn't handle surrogates anyway. Use
	GLib's UTF-16 functions instead. Windows uses UTF-16.

	* gdk/win32/gdkprivate-win32.h: Remove declarations of the deleted
	functions mentioned above.

	* gdk/win32/gdkproperty-win32.c (gdk_property_change): Use CF_TEXT
	also if the string is of type STRING, i.e. ISO-8859-1, and the
	current codepage is 1252, and contains no C1 chars. Accept
	also UTF8_STRING.

	* gdk/win32/gdkselection-win32.c (_gdk_selection_property_store):
	Mark as static. When storing STRING data, convert to
	Latin-1. (#140537)
	(gdk_selection_owner_set_for_display): Now that STRING is always
	ISO-8859-1, use UTF8_STRING when sending the selection request
	to ourselves.

	(gdk_selection_convert): Handle also UTF8_STRING. (#140537, John
	Ehresman)

	(gdk_text_property_to_text_list_for_display): Make work more like
	X11 version. Do obey the encoding parameter.

	(gdk_string_to_compound_text_for_display,
	gdk_utf8_to_compound_text_for_display): Don't even pretend
	supporting COMPOUND_TEXT.

	(gdk_utf8_to_string_target): Convert to ISO-8859-1, like on X11.

	(sanitize_utf8): Zero-terminate string.
2004-07-07 00:10:03 +00:00
J. Ali Harlow
2e85ab0743 Fix win32 build problem w/o wintab. Fixed #145242
2004-07-01  J. Ali Harlow  <ali@juiblex.co.uk>

	* gdk/win32/gdkinput-win32.c (_gdk_input_ungrab_pointer): Fix
	win32 build problem w/o wintab.  Fixed #145242
2004-07-01 10:05:15 +00:00
Robert Ögren
7c200f8a9c Send key modifiers (shift, ctrl etc) in button and motion events from the
2004-05-26  Robert Ögren  <gtk@roboros.com>

	* gdk/win32/gdkinput-win32.c (_gdk_input_other_event): Send key
	modifiers (shift, ctrl etc) in button and motion events from the
	tablet. (#143240)

2004-05-26  Robert Ögren  <gtk@roboros.com>

	* gdk/win32/gdkinput-win32.c (gdk_device_get_state): Simple
	implementation for extended input devices using last known
	device state (#143237)
2004-05-27 02:15:42 +00:00
Robert Ögren
fb88ec7208 Don't propagate mouse events to windows that want extended input events.
2004-05-11  Robert Ögren  <gtk@roboros.com>

	* gdk/win32/gdkevents-win32.c (propagate): Don't propagate mouse
	events to windows that want extended input events. (#142943)
	(gdk_event_translate): Move check for extended input devices to
	propagate, new parameter to propagate.
	(gdk_pointer_grab, gdk_display_pointer_ungrab): Enable calls to
	_gdk_input_(un)grab_pointer. (#142943)

	* gdk/win32/gdkinput-win32.c (_gdk_input_other_event): Check for
	input grab. [Fix missing update of impl in "dijkstra" event
	propagation loop] Drop the parallel "impl" pointer, just use a
	cast. Don't propagate beyond windows that want normal input
	events. (#142943)
	(gdk_input_grab_pointer, gdk_input_ungrab_pointer): Limited
	implementation of input grab. (#142943)
2004-05-24 22:34:55 +00:00
Tor Lillqvist
cd1f697ce1 Remove duplicated line. (Spotted by Benoît Carpentier.)
2004-05-22  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkinput-win32.c (print_lc): Remove duplicated
	line. (Spotted by Benoît Carpentier.)
2004-05-22 04:38:43 +00:00
Tor Lillqvist
b99e54f2dd Put back the ref_count field in the GdkDragContextPrivateWin32 struct (but
2004-05-15  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkdnd-win32.c: Put back the ref_count field in the
	GdkDragContextPrivateWin32 struct (but inside ifdef OLE2_DND this
	time). It is used by the OLE2_DND code, which is unfinished and
	presumably horribly broken, but still, let's not make it not
	compile on purpose. Silence some gcc warnings in the OLE2_DND
	code.
2004-05-15 04:18:08 +00:00
Robert Ögren
c4f723597b Add missing call to g_object_ref in Wintab code. (#138341)
2004-05-11  Robert Ögren  <gtk@roboros.com>

	* gdk/win32/gdkevents-win32.c (gdk_event_translate): Add missing
	call to g_object_ref in Wintab code. (#138341)

	* gdk/win32/gdkinput-win32.c: Fix numerous Wintab problems
	including unallocated buffers for event->motion.axes and
	event->button.axes, unsigned wraparound problem in the code for
	detecting missing press/release events and assigning min instead
	of max when setting up axes.
2004-05-12 23:30:27 +00:00
Hans Breuer
805abff3cf finally also create the correct mask for 'pseudo mime' icons
2004-05-08  Hans Breuer  <hans@breuer.org>

	* gtk/gtkfilesystemwin32.c (extract_icon) : finally also
	create the correct mask for 'pseudo mime' icons

	* gdk/win32/gdkwindow-win32.c(show_window_internal) : also
	take focus_on_map into account

	* gtk/gtkselection.c : g_message() only with DEBUG_SELECTION

	* gtk/gtkactiongroup.c gtk/gtkcombobox.c :
	... must return a value

	* gdk/gdk.def gtk/gtk.def demos/gtk-demo/makefile.msc.in : updated
2004-05-08 16:25:15 +00:00
Elijah Newren
5502f77eaf Changes to support do-not-focus-on-map hint in conjunction with
2004-05-05  Elijah Newren  <newren@math.utah.edu>

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

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

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

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

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

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

	* gdk/x11/gdkwindow-x11.h:
	* gdk/x11/gdkevents-x11.c (set_user_time):
	* gdk/x11/gdkinput-x11.c (_gdk_input_common_other_event):
	* gdk/x11/gdkwindow-x11.c (gdk_x11_window_set_user_time):
	s/_gdk_x11_window_set_user_time/gdk_x11_window_set_user_time/,
	since we want that function to be part of the public API.
2004-05-06 02:57:01 +00:00
Tor Lillqvist
25f3824e61 Add multi-monitor offset. (#141842, John Ehresman)
2004-05-05  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkdnd-win32.c (gdk_drag_find_window_for_screen): Add
	multi-monitor offset. (#141842, John Ehresman)
2004-05-05 02:18:21 +00:00
Hans Breuer
6efc9a6a12 don't modify the passed in GdkSegment(s) in place, we may get them again
2004-05-02  Hans Breuer  <hans@breuer.org>

	* gdk/win32/gdkdrawable-win32.c (draw_segments) : don't
	modify the passed in GdkSegment(s) in place, we may get
	them again to draw at the same place. Fixes bug #129095,
	bug #137177, ...
	(draw_segments) draw the end pixel again to get the
	pixmap mask right, fixes bug #126710, #130202

	* gdk/win32/gdkwindow-win32.c : use SetForegroundWindow,
	fixes bug #106013, John Ehresman

	* gtk/makefile.msc.in : don't try to link gtk.res but
	use gtk-win32.res (as supposed to be fixed below :)
2004-05-02 13:20:49 +00:00
Tor Lillqvist
f215db2b12 Plug memory leak. (#140775, John Ehresman)
2004-04-29  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkgc-win32.c (gdk_win32_gc_set_dashes): Plug memory
	leak. (#140775, John Ehresman)
2004-04-29 10:06:12 +00:00
Hans Breuer
e9ec1e81b1 workaround for bug #137496, the real fix would involve just another small
2004-04-11  Hans Breuer  <hans@breuer.org>

	* gdk/win32/gdkspawn-win32.c : workaround for bug #137496,
	the real fix would involve just another small API breakage,
	i.e. gdk_spawn_* using GPid not just gint.

	* gtk/makefile.msc.in : build gtk-win32.res, not gtk.res
2004-04-11 15:25:06 +00:00
Tor Lillqvist
47b6f521d2 If both Shift and CapsLock pressed, ignore the shift only for letters
2004-04-10  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkkeys-win32.c (gdk_keymap_translate_keyboard_state):
	If both Shift and CapsLock pressed, ignore the shift only for
	letters (that would have been affected by the CapsLock). (#139095)

	* gdk/win32/gdkglobals-win32.c: Disable tablet support by default,
	seems to be even buggier now than it used to be. (#138341)
	Initialize _gdk_input_ignore_wintab to TRUE.

	* gdk/win32/gdkmain-win32.c: Add --use-wintab switch and
	GDK_USE_WINTAB environment variable to turn on tablet support.
2004-04-10 08:43:36 +00:00
Tor Lillqvist
0ddaed29e9 Use X11 semantics for angles. Thanks to Tim Newsham.
2004-03-31  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkdrawable-win32.c (draw_arc): Use X11 semantics for
	angles. Thanks to Tim Newsham.
2004-03-31 00:50:13 +00:00
Hans Breuer
f0afa3a497 applied the undisputable and required [due to recent gtkfilesystem
2004-03-20  Hans Breuer  <hans@breuer.org>

	* gtk/gtkfilesystemwin32.c : applied the undisputable and
	required [due to recent gtkfilesystem internal api semantic
	changes] part of patches to fix bug #137543 (Tor Lillqvist,
	J. Ali Harlow)

	* gdk/gdkevents-win32.c (handle_configure_event) :
             (gdk_event_translate), WM_WINDOWPOSCHANGED : initialize
	GdkWindowObject::x, y with screen coords to make
	gdk_window_get_position () return the right thing and thus fix
	drag and drop positioning (e.g. Gimp tabs, fixes bug #137192)
2004-03-20 23:45:35 +00:00
Tor Lillqvist
de2332ee9a Don't just copy the whole GdkGCWin32 with a single assignment, that
2004-03-15  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkgc-win32.c (gdk_gc_copy): Don't just copy the whole
	GdkGCWin32 with a single assignment, that overwrites GObject's
	private data (for instance ref_count). (#137012, John Ehresman)
2004-03-15 11:55:55 +00:00
Tor Lillqvist
f6d1307a01 Don't undefine HAVE_MONITOR_INFO when compiling with gcc. Mingw's headers
2004-03-13  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkdisplay-win32.c: Don't undefine HAVE_MONITOR_INFO
	when compiling with gcc. Mingw's headers do have the required
	definitions.

	* gdk/win32/gdkdrawable-win32.c (draw_polygon): When drawing
	filled polygons, don't draw the outline, similarily as
	draw_rectangle(). Apparently GTK and GIMP don't use
	gdk_draw_polygon() much (or always draw the outline, too), as this
	has gone undetected for so long. Thanks to Bruce Hochstetler.
2004-03-13 22:26:05 +00:00
Owen Taylor
ef5915da35 Make this a total no-op when the new or old parent is destroyed. (#134230,
Sat Mar 13 12:17:16 2004  Owen Taylor  <otaylor@redhat.com>

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

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

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

        * gdk/x11/gdkwindow-x11.c (gdk_window_impl_x11_finalize):
        Call GDK_WINDOW_DISPLAY() on the wrapper not on the
        impl. (Also from Soeren's patch)
2004-03-13 18:27:56 +00:00
Tor Lillqvist
6e5d959730 Set also the pointer button bits. (#136636, Dave Neary)
2004-03-10  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkevents-win32.c (build_key_event_state): Set also
	the pointer button bits. (#136636, Dave Neary)

	* gdk/win32/gdkwindow-win32.c (show_window_internal): Show
	transparent (input only) windows using SetWindowPos(). (#132331,
	John Ehresman)

	(gdk_window_set_type_hint): For splash screens, remove the resize
	handles, menu, and minimize/maximize/close buttons. (#132896)
2004-03-10 22:20:36 +00:00
Hans Breuer
985e3a24a3 some more settings from system, also reflect some name changes done a
2004-03-07  Hans Breuer  <hans@breuer.org>

	* gdk/win32/gdkproperty-win32.c (gdk_screen_get_setting) :
	some more settings from system, also reflect some name changes
	done a while ago in the x11 backend

	* gdk/win32/makefile.msc : build gdkspawn-win32.c

	* gtk/gtkdnd.c : gtk_drag_source_[gs]et_target_list, added "Since: 2.4"

	* gtk/makefile.msc.in : build gtkpathbar, link shell32.lib

	* tests/makefile.msc : some more tests get build
2004-03-07 13:40:19 +00:00
Federico Mena Quintero
80581c3011 Fixes #136082 and #135265, patch by Morten Welinder.
2004-03-05  Federico Mena Quintero  <federico@ximian.com>

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

	* configure.in: Use AC_SYS_LARGEFILE.

	* */*.c: #include <config.h>
2004-03-06 03:38:59 +00:00
Tor Lillqvist
72d622fcf5 Add missing entries, thanks to J. Ali Harlow.
2004-03-05  Tor Lillqvist  <tml@iki.fi>

	* gdk/gdk.def: Add missing entries, thanks to J. Ali Harlow.

	* gdk/win32/gdkcursor-win32.c (color_is_white): const-correctness.

	(gdk_cursor_new_from_pixbuf): Copy of the non-Xcursor X11
	implementation.

	(gdk_display_supports_cursor_alpha,
	gdk_display_supports_cursor_color): Dummy implementations.

	(gdk_display_get_default_cursor_size,
	gdk_display_get_maximal_cursor_size): Implement.

	* gdk/win32/gdkdisplay-win32.c (gdk_display_get_default_group):
	Dummy implementation.

	* gdk/win32/gdkevents-win32.c (gdk_net_wm_supports): Dummy
	implementation.

	* gdk/win32/gdkfont-win32.c (gdk_font_get_display): Implement.

	* gdk/win32/gdkinput-win32.c (gdk_input_motion_events): Remove,
	not in API.

	* gdk/win32/gdkwindow-win32.c (gdk_window_get_group): Dummy
	implementation.
2004-03-05 23:26:07 +00:00
Hans Breuer
75aa148d97 set current_dest_drag to NULL when destroying, fixes bug #120007. Also
2004-02-28  Hans Breuer  <hans@breuer.org>

	* gdk/win32/gdkdnd-win32.c : set current_dest_drag to NULL
	when destroying, fixes bug #120007. Also removed the mirrored
	ref counting for deprecated gdk_drag_context_<ref|unref>()
	cause it wasn't reliable anymore anyway.

	* gdk/win32/gdkdisplay-win32.c : fix typo, which should
	have broken the win32 build for everyone not using msvc

	* gdk/win32/gdkevents-win32.c : WM_GETMINAMXINFO ensure not to
	return negative values for ptMaxTrackSize, it caused snapping
	windows to their minimum size
2004-02-28 13:21:25 +00:00
Owen Taylor
04ebfe9465 Return GDK_FILTER_CONTINUE for unhandled message types.
Thu Feb 26 17:29:04 2004  Owen Taylor  <otaylor@redhat.com>

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

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

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

        * gdk/win32/gdkevents-win32.c (gdk_add_client_message_filter):
        Append to the filter list not prepend, since order now matters.
2004-02-26 22:53:50 +00:00
Tor Lillqvist
db2440ed55 Set the cursor in all cases. If no grab cursor specified, use the grabbing
2004-02-02  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkevents-win32.c (gdk_pointer_grab): Set the cursor
	in all cases. If no grab cursor specified, use the grabbing
	window's cursor. If the grabbing window has no cursor, use the
	default arrow cursor. (#118025)
2004-02-02 22:26:15 +00:00
Tor Lillqvist
4263ea1502 Don' generate enter or leave events if the pointer is grabbed with
2004-01-28  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkevents-win32.c (synthesize_leave_event,
	synthesize_enter_event): Don' generate enter or leave events if
	the pointer is grabbed with owner_events off, and the grab event
	mask doesn't ask for them. (#129242)

	(gdk_event_translate): Ditto for focus change events.
2004-01-28 02:10:07 +00:00
Federico Mena Quintero
5ebb6b04f2 Fix #105497; constify uses of GdkColor.
2004-01-26  Federico Mena Quintero  <federico@ximian.com>

	Fix #105497; constify uses of GdkColor.

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

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

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

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

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

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

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

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

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

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

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

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

	* gtk/gtkwidget.c (gtk_widget_modify_color_component): Constify.
	(gtk_widget_modify_fg): Constify.
	(gtk_widget_modify_bg): Constify.
	(gtk_widget_modify_text): Constify.
	(gtk_widget_modify_base): Constify.
2004-01-26 20:21:09 +00:00
Tor Lillqvist
15567341f1 If the WM_TRANSIENT_FOR property is being deleted, set the owner of the
2004-01-25  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkproperty-win32.c (gdk_property_delete): If the
	WM_TRANSIENT_FOR property is being deleted, set the owner of the
	window to the root window (i.e., effectively unset it). (#132411)

	* gdk/win32/gdkprivate-win32.h
	* gdk/win32/gdkglobals-win32.c
	* gdk/win32/gdkmain-win32.c: Declare, define and initialize
	_wm_transient_for, a GdkAtom for WM_TRANSIENT_FOR.

	* acconfig.h: Remove HAVE_WINSOCK_H, not used any longer.
2004-01-25 22:19:40 +00:00
Hans Breuer
5f98762951 use SWP_NOACTIVATE in gdk_window_set_keep_(above|below) to make DND work
2004-01-04  Hans Breuer  <hans@breuer.org>

	* gdk/win32/gdkwindow-win32.c : use SWP_NOACTIVATE in
	gdk_window_set_keep_(above|below) to make DND work again.
	Thanks to Alif Wahid for noticing.

	* gdk/gdk.def : update externals

	* gtk/gtkfilesystemwin32.c : adapt to GtkFileSystemIFace changes

	* gtk/gtk-stock.[hc] gtk/gtkiconfactory.c
	  gtk/stock-icons/Makefile.am gtk/stock-icons/makefile.msc :
	  gtk/stock-icons/stock_harddisk_16.png
	  gtk/stock-icons/stock_harddisk_24.png
	Harddisk stock icons for file system implementations. Beside
	FLOPPY and CDROM there is now HARDDISK, probably some
	GTK_STOCK_NETWORK would be useful, but I could not find one.
2004-01-04 15:45:56 +00:00
Hans Breuer
4acd98a836 handle GTK_DATADIR similar as the other filesystem placement 'constants'
2003-12-14  Hans Breuer  <hans@breuer.org>

	* gtk/gtkprivate.h gtk/gtkmain.c : handle GTK_DATADIR
	similar as the other filesystem placement 'constants' (dynamic
	resolving on win32)

	* gtk/gtkfilechooserwidget.c : handle file system to win32
	renaming here as will
	* gtk/gtkfilesystemwin32.c : implement render_icon

	* gtk/gtk.def gdk/gdk.def : updated externals

	* gdk/win32/gdkdisplay-win32.c : make it compile without
	<multimon.h> - i.e. even older sdk

	* gdk/win32/gdkevents-win32.c : match resize_timer_proc
	with TIMERPROC prototype

	* gdk/win32/gdkwindow-win32.c : older msvc does not know
	BITMAPV5HEADER (from win xp) either

	* gtk/gtkimmodule.c : make it compile even if GTK_LOCALEDIR is
	not defined

	* tests/testfilechooser.c : recent GLib crashes on
	g_print ("%s", NULL) so avoid this
2003-12-14 19:03:02 +00:00
Tor Lillqvist
5ad2fd918a Calls to OpenClipboard() must be followed by calls to CloseClipboard().
2003-12-14  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkselection-win32.c: Calls to OpenClipboard() must be
	followed by calls to CloseClipboard(). Add a missing call to
	CloseClipboard(). Found by Adam Wright, fixes #104944. Use
	API_CALL macro in more places.
2003-12-14 02:20:14 +00:00
Tor Lillqvist
5cd59c1cbc Merge from stable:
2003-12-14  Tor Lillqvist  <tml@iki.fi>

	Merge from stable:

	* gdk/gdkdisplaymanager.c: Mark default_display static.

	* gdk/win32/gdkdnd-win32.c: Mark current_dest_drag static.

	* gdk/win32/gdkkeys-win32.c: Disable some overly verbose debugging
	output.

	* gdk/win32/gdkevents-win32.c: Clean up the debugging output from
	--gdk-debug=events. In general, output just one line of debugging
	output for each Windows message, plus one line for each GDK event
	generated. Indent all lines according to window procedure nesting
	level.

	(inner_window_procedure): Rename from real_window_procedure.

	(find_real_window_for_grabbed_mouse_event): Don't get misled when
	the point is in the non-client (decoration) area of the window
	returned by WindowFromPoint(). Return the root window in that
	case.

	(build_pointer_event_state): Test also MK_XBUTTON1 and
	MK_XBUTTON2 (buttons 4 and 5).

	(synthesize_enter_event): Track the mouse leaving the window in
	the event being generated, not the one mentioned in the Windows
	message.

	(propagate): Test for NULL parent earlier. Improves event
	generation from a grabbed pointer. Part of fix for #107320.

	(handle_stuff_while_moving_or_resizing): New function, to
	dispatch the main loop (once).

	(resize_timer_proc): New function, set to be called by an inerval
	timer during resizes/moves. Calls handle_stuff_while_moving_or_resizing().

	(gdk_event_translate): Drop unused return_exposes parameter.

	Handle WM_XBUTTONDOWN and UP messages (buttons 4 and 5).

	On WM_SYSKEYUP, generate a key release event also for just the Alt
	key.

	On WM_MOUSELEAVE, generate a leave event of type
	GDK_NOTIFY_ANCESTOR (and not UNKNOWN) if the mouse left a
	top-level window, and left the app completely.

	On WM_ENTERSIZEMOVE, set a flag, and start an interval timer that
	calls resize_timer_proc() at regular intervals. On
	WM_EXITSIZEMOVE, kill the timer.

	On WM_WINDOWPOSCHANGED, generate a configure event if necessary,
	and dispatch the main loop (by calling
	handle_stuff_while_moving_or_resizing()). Fixes #99540, idea by
	Herman Bloggs.

	* gdk/win32/gdkmain-win32.c (_gdk_win32_message_to_string): Handle
	also wintab messages.

	* gdk/win32/gdkwindow-win32.c (gdk_window_set_skip_taskbar_hint):
	Instead of using WS_EX_TOOLWINDOW, implement by setting/unsetting
	the window's owner. Fixes #118093, reported by Maxime Romano.
2003-12-14 01:57:54 +00:00
Tim Evans
d858f3b514 Implement gdk_window_set_icon_list() for Win32, with support for big and
Tue Dec  8 09:41:00 2003  Tim Evans  <t.evans@aranz.com>

	* gdk/win32/gdkwindow-win32.[ch]: Implement
	gdk_window_set_icon_list() for Win32, with support for big and
	small icons and support for alpha-channel icons under Windows
	XP. Replaces the previous implementation of gdk_window_set_icon().
	(#128762)
2003-12-14 01:06:56 +00:00
Matthias Clasen
5fb61f3075 Changes to allow "no input" windows (#64613):
Thu Dec 11 00:35:12 2003  Matthias Clasen  <maclas@gmx.de>

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

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

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

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

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

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

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

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

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

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

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

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

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

        * gdk/win32/Makefile.am,
          gdk/win32/gdkspawn-win32.c: win32 impl.
2003-12-10 13:49:58 +00:00
Tor Lillqvist
dfddc20628 Use <multimon.h> when compiling with MSVC and old headers. (#126933, John
2003-12-08  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkdisplay-win32.c: Use <multimon.h> when compiling
	with MSVC and old headers. (#126933, John Ehresman)
2003-12-08 22:43:51 +00:00
Tor Lillqvist
4b328c4753 Don't use the return value from SendMessage(WM_SETICON). That is the old
2003-12-07  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkwindow-win32.c (gdk_window_set_icon): Don't use the
	return value from SendMessage(WM_SETICON). That is the old
	icon. Fixes GDI resource leak. (#128559, Tim Evans)
2003-12-07 11:03:08 +00:00
Tor Lillqvist
4e4748bc37 If we already have a pointer grab active with a grab cursor set, destroy
2003-12-07  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkevents-win32.c (gdk_pointer_grab): If we already
	have a pointer grab active with a grab cursor set, destroy that
	cursor to avoid a GDI resource leak. (#128410, Tim Evans)
2003-12-07 06:56:30 +00:00
Hans Breuer
947b32b7dc updated added all the new tests
2003-11-15  Hans Breuer  <hans@breuer.org>

	* gdk/makefile.msc gdk/gdk.def
            gtk/gtk.def gtk/makefile.msc.in : updated
	* tests/makefile.msc : added all the new tests

	* gtk/gtkfilefilter.c(finalize) : initialize filter
	from object not from itself

	* gtk/gtkfilesystemwin32.[hc] : copied from gtkfilesystemunix.[hc]
	modified as less as posible to have aworking implementation
	on win32. There maybe the desire to merge the unchanged pats into
	a common base class.
	Also implemented a simple glib based bookmark handling, which
	is currently missing in gtkfilesystemunix.[hc] but can be copied
	over there.
	* gtk/gtkfilechooserwidget.c : conditional include gtkfilesystemwin32.h

	* gdk/win32/gdkwindow-win32.c : implement
	gdk_window_set_keep_above() and gdk_window_set_keep_below()

	* tests/testmerge.c : don't include unistd.h unconditionally,
	#define STDOUT_FILENO if it isn't defined

	* tests/testfilechooser.c : make it compile on win32
2003-11-15 20:35:55 +00:00
Tor Lillqvist
4c860a0d3d If the window is maximized, use SW_SHOWMAXIMIZED. (#126986, John Ehresman)
2003-11-15  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkwindow-win32.c (gdk_window_focus): If the window is
	maximized, use SW_SHOWMAXIMIZED. (#126986, John Ehresman)
2003-11-15 04:22:16 +00:00
Tor Lillqvist
4a2de86c44 Don't use hardcoded DEMOCODEDIR on Windows.
2003-09-25  Tor Lillqvist  <tml@iki.fi>

	* demos/gtk-demo/main.c: Don't use hardcoded DEMOCODEDIR on Windows.

2003-09-21  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkevents-win32.c (handle_wm_paint): New
	function. Code split out from gdk_event_translate(). Needed
	because gdk_event_get_graphics_expose() couldn't do anything
	sensible otherwise. (Not that I think graphics exposes work anyway
	in gdk/win32, but at least now the code could work.)

	(gdk_event_get_graphics_expose): Call handle_wm_paint() instead of
	gdk_event_translate(), which couldn't have worked as it doesn't
	take any pre-allocated GdkEvent parameter any longer.

	(gdk_event_translate): Handle WM_MOUSEACTIVATE: Don't let
	GDK_WINDOW_TEMP windows be activated. (#122578, John Ehresman)
2003-09-25 18:48:06 +00:00
Tor Lillqvist
c1aa7651b4 Handle dead keysyms present on the US-International keyboard. For clarity,
2003-09-19  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkkeys-win32.c (update_keymap): Handle dead keysyms
	present on the US-International keyboard. For clarity, order
	keysyms in case statement according to numeric value.

	(gdk_keymap_translate_keyboard_state): Handle Caps Lock
	correctly. (#120176, Ken Rastatter and Owen Taylor)
2003-09-19 00:30:35 +00:00
Tor Lillqvist
b4d13a212e Remove special-case code for WS_EX_TRANSPARENT (GDK_INPUT_ONLY) windows,
2003-09-14  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkwindow-win32.c (show_window_internal): Remove
	special-case code for WS_EX_TRANSPARENT (GDK_INPUT_ONLY) windows,
	the usefulness of which was already in doubt. Removing it fixes
	bugs #118575 and #121851.
2003-09-14 13:43:45 +00:00
Tor Lillqvist
fafe735f13 Don't call CloseHandle() on the HMODULE returned from GetModuleHandle().
2003-09-02  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkdisplay-win32.c (gdk_display_open): Don't call
	CloseHandle() on the HMODULE returned from GetModuleHandle().
	Didn't cause any harm, but didn't do anything useful either. When
	running a GTK+ program under MS's debugger, the CloseHandle() call
	would cause a "first-chance exception" in ntdll.dll to show up.
	(The exception is caught appropriately if you let it proceed, but
	it confuses the person using the debugger). Thanks to Bruce
	Hochstetler for noticing.
2003-09-02 23:33:02 +00:00
Tor Lillqvist
ad24b9cad6 Print also the root coordinates for events that have such. Print
2003-08-08  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkevents-win32.c (print_event): Print also the root
	coordinates for events that have such. Print coordinates for enter
	and leave events.

	(gdk_event_translate): Don't use event uninitialixed in the
	return_exposes branch of the WM_PAINT handler.

	* gdk/win32/gdkwindow-win32.c (gdk_window_new,
	_gdk_windowing_window_get_pointer, _gdk_windowing_window_at_pointer):
	Must offset top-level window coordinates here, too.
2003-08-08 07:16:16 +00:00
Tor Lillqvist
5155f3ca66 gdk/win32/gdkinput-win32.h Drop the GdkEvent* parameter, it wasn't used.
2003-08-07  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkinput-win32.h
	* gdk/win32/gdkinput-win32.c (_gdk_input_configure_event,
	_gdk_input_enter_event): Drop the GdkEvent* parameter, it wasn't
	used.

	* gdk/win32/gdkevents-win32.c (gdk_event_translate): Adapt caller
	accordingly, in fact an uninitialised variable was dereferenced.


	[Win32] Add support for multiple monitors.

	* gdk/win32/gdkprivate-win32.h
	* gdk/win32/gdkglobals-win32.c: New global variables for
	multiple-monitor info: _gdk_num_monitors, _gdk_monitors, and
	_gdk_offset_x and _gdk_offset_y.

	* gdk/win32/gdkdisplay-win32.c (count_monitor, enum_monitor): New
	functions, enumeration functions passed to EnumDisplayMonitors().

	(gdk_display_open): If the EnumDisplayMonitors() and
	GetMonitorInfo() API is present (on Win98, Win2000 and newer), use
	if to find out monitor info.

	Calculate the offset between Win32 coordinates (relative to the
	primary monitor's origin (and thus negative on monitors to the
	left of or above it), and GDK's (visible coordinates should be
	non-negative).

	* gdk/win32/gdkscreen-win32 (gdk_screen_get_n_monitors,
	gdk_screen_get_monitor_geometry): Use information collected above.

	(gdk_window_move, gdk_window_move_resize_window_get_geometry):
	Subtract _gdk_offset_{x,y} from GDK root window coordinates.

	(gdk_window_get_geometry, gdk_window_get_origin,
	gdk_window_get_frame_extents): For top-level windows, add
	_gdk_offset_{x,y} to GDK root window coordinates

	Still need to handle multiple monitors in
	gdk_window_fullscreen(). Probably should make the window
	fullscreen on the monitor where the cursor is?

	* gdk/win32/gdkevents-win32.c: Add _gdk_offset_{x,y} to all GDK
	root window coordinates in GdkEvents.


	[Win32] Fix geometry hint handling. Add support for resize
	increment and base size, and aspect ratio geometry hints. The
	"gridded geometry" test in testgtk now works beautifully.

	* gdk/win32/gdkwindow-win32.c (gdk_window_set_geometry_hints):
	Turns out this function shouldn't actually ever modify the
	window's size, just store the hints. (Old code kept for a while
	inside #if 0.)

	(gdk_window_set_hints): Remove presumably broken code that handles
	the position hints, this function is obsolete anyway.

	* gdk/win32/gdkevents-win32.c: Drop the current_{x,y}_root
	variables, not used.

	(adjust_drag): New function, used to implement resize increment
	hints.

	(gdk_event_translate): Handle WM_SIZING, implement resize
	increment and base size, and aspect ratio geometry hints here. The
	WM_GETMINMAXINFO handler takes care of the minimum and maximum
	size hints as before. Fix the WM_GETMINMAXINFO handler to take
	into account window decorations. No need to modify the
	ptMaxPosition and ptMaxSize fields in the MINMAXINFO struct,
	the defaults are fine.

	* gdk/win32/gdkprivate-win32.h
	* gdk/win32/gdkwindow-win32.c (_gdk_win32_adjust_client_rect,
	_gdk_win32_get_adjusted_client_rect): New helper functions.
2003-08-07 22:17:18 +00:00
Hans Breuer
1ea3b45078 finally use TrackMouseEvent (only if the new window not known to Gdk) to
2003-08-07  Hans Breuer  <hans@breuer.org>

	* gdk/win32/gdkevents-win32.c : finally use TrackMouseEvent
	(only if the new window not known to Gdk) to get proper
	leave notification, and get rid of the wrong placed
	tooltips, bug #102283

	(gdk_event_translate) : small code reordering to not get
	GDK_MOTION_NOTIFY for still mouse and get back tooltips on
	menus, bug #117367
2003-08-07 15:10:16 +00:00
Tor Lillqvist
209dc33b3b gdk/gdk.def Add missing function, trivially implement.
2003-08-07  Tor Lillqvist  <tml@iki.fi>

	* gdk/gdk.def
	* gdk/win32/gdkfont-win32.c (gdk_fontset_load_for_display): Add
	missing function, trivially implement.
2003-08-07 03:30:38 +00:00
Hans Breuer
8bc4568fa8 initialize bits to 0 (probably default on NT)
2003-08-06  Hans Breuer  <hans@breuer.org>

	* gdk/win32/gdkpixmap-win32.c (gdk_pixmap_new) :
	initialize bits to 0 (probably default on NT)

	now really ...
2003-08-06 22:13:48 +00:00
Hans Breuer
d3b962ce0f initialize bits to 0 (probably default on NT)
2003-08-06  Hans Breuer  <hans@breuer.org>

	* gdk/win32/gdkpixmap-win32.c (gdk_pixmap_new) :
	initialize bits to 0 (probably default on NT)
2003-08-06 22:08:33 +00:00
Hans Breuer
76cb03f43f now it works as intended ;-)
2003-08-06  Hans Breuer  <hans@breuer.org>

	* gdk/win32/gdkwindow-win32.c (gdk_window_set_icon) :
	now it works as intended ;-)
2003-08-06 21:01:00 +00:00
Hans Breuer
d2c64e305c set HWND_NOTOPMOST for modal==FALSE, fixes bug #118435
2003-08-04  Hans Breuer  <hans@breuer.org>

	* gdk/win32/gdkwindow-win32.c(gdk_window_set_modal_hint) :
	set HWND_NOTOPMOST for modal==FALSE, fixes bug #118435

	* gdk/win32/gdkwindow-win32.c : implement gdk_window_[un]fullscreen
	(gdk_window_{move,resize,move_rezize})) : noop if FULLSCREEN

	* gdk/win32/gdkwindow-win32.c (gdk_window_set_icon) :
	against all expectations it is basically ony a call with WM_SETICON
	needed (the visual effect is there, though colors or mask are
	still somewhat wrong).
	* gdk/win32/gdkwindow-win32.h : place to store the HICON

	* gdk/win32/gdkdrawabke.win32.c : readded the conditional end
	pixel drawing as it was fixed at 1999-08-23

	gtk/gtk.def : updated
2003-08-05 22:24:35 +00:00
Tor Lillqvist
b9987ad725 2003-08-04 Tor Lillqvist <tml@iki.fi
* gdk/win32/gdkevents-win32.c (apply_filters): Fix braino:
	actually use the passed-in filter list. The function also needs a
	GdkWindow parameter, as filter functions expect
	GdkEvent::any.window to be valid. (#119034, Hans Breuer)
2003-08-04 15:27:49 +00:00
Tor Lillqvist
3dc24f5893 Fix gdk/win32 window geometry handling again. The window position in a
2003-08-02  Tor Lillqvist  <tml@iki.fi>

	Fix gdk/win32 window geometry handling again. The window position
	in a GDK_CONFIGURE event should be that of the client area, not of
	the window decorations. (I was confused by the term "window
	border" in X11. It does *not* mean the window manager
	decorations. There are no X11-style window borders in Win32.)
	Also, this time do take the geometry hints into account
	appropriately when moving windows. Now testgtk's gravity test's
	move buttons work OK. There are stil problems with taking gravity
	into account when showing a hidden window.

	* gdk/win32/gdkwindow-win32.h: Keep a whole GdkGeometry as hints
	instead of separate fields.

	* gdk/win32/gdkevents-win32.c (handle_configure_event): Don't
	adjust for decorations.

	* gdk/win32/gdkwindow-win32.c (get_outer_rect,
	adjust_for_gravity_hints): New functions.
	(gdk_window_move, gdk_window_resize, gdk_window_move_resize): Use
	above functions, take geometry hints into account.
	(gdk_window_set_geometry_hints): Size hints specicy client area,
	not including decorations.
2003-08-02 02:05:12 +00:00
Tor Lillqvist
09f777e5ea Fix for #108007, #112402, #117042: There was confusion in gdk/win32 at
2003-07-29  Tor Lillqvist  <tml@iki.fi>

	Fix for #108007, #112402, #117042: There was confusion in
	gdk/win32 at various places whether a window position refers to
	the decoration position or the client area position. Also whether
	window size includes decorations or not.

	The correct interpretation apparently is that in GDK (like in
	X11), a top-level window position means the decoration's position,
	but size means the window's inner size (client area size). In the
	Win32 API, the window size usually includes the decorations,
	though.

	* gdk/win32/gdkevents-win32.c (decode_key_lparam): Move inside
	#ifdef G_ENABLE_DEBUG.
	(handle_configure_event): New function, generates GDK_CONFIGURE
	events from WM_SIZE and WM_MOVE messages. Even if no event is
	generated because of the event mask, still set the private
	position and size fields. Calculate position and size correctly.
	(gdk_event_translate): Call handle_configure_event().

	* gdk/win32/gdkgeometry-win32.c: Cosmetics.

	* gdk/win32/gdkwindow-win32.c: Use GDI_CALL() and API_CALL()
	macros. Cosmetic debugging output changes.
	(SafeAdjustWindowRectEx): Remove. If an application wants to
	locate a window outside of the screen, it's not GDK's business to
	prevent it. And anyway, with multiple monitors, negative
	coordinates are perfectly normal.
	(gdk_window_new): Adjust the window size for decorations after
	_gdk_window_init_position() has done its job. (But the big window
	code currently is presumably broken on Win32 anyway.)
	(gdk_window_move): The position passed in is supposed to be that
	of the window border, so don't need to adjust for decorations.
	(gdk_window_resize, gdk_window_move_resize): Simplify somewhat.
2003-07-29 23:35:40 +00:00
Tor Lillqvist
165375eb5c On Win9x, the keyboard state returned by GetKeyboardState() doesn't
2003-07-27  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkevents-win32.c (build_key_event_state): On Win9x,
	the keyboard state returned by GetKeyboardState() doesn't
	distinguish between the left and right Control and Alt keys. Thus
	we cannot detect AltGr (which is supposed to be left Control +
	right Alt) the same way as on NT-based systems, but have to accept
	either Control + either Alt as AltGr.
2003-07-27 21:58:44 +00:00
Tor Lillqvist
63f745738d gdk/win32/gdkprivate-win32.h New flags _gdk_input_locale_is_ime and
2003-07-25  Tor Lillqvist  <tml@iki.fi>

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

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

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

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

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

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

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

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

	(gdk_window_is_ancestor): Renamed from gdk_window_is_child().

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

	* gdk/win32/gdkkeys-win32.c (update_keymap): Make dead keys
	visible to GDK and GTK. Store the corresponding GDK_dead_* keysym
	for those, so that the GtkIMContextCimple compose tables will
	work. Deduce if the keyboard layout has the AltGr key, and set the
	above flag accordingly.
2003-07-26 01:54:59 +00:00
Hans Breuer
364272b5b9 new file to build it all ... added to EXTRA_DIST
2003-07-20  Hans Breuer  <hans@breuer.org>

	* makefile.msc : new file to build it all
	* Makefile.am : ... added to EXTRA_DIST

	* gdk/makefile.msc gtk/stock-icons/makefile.msc
	  gtk/makefile.msc.in tests/makefile.msc : updated

	* gdk/gdk.def gtk/gtk.def : export a bunch of new
	functions

	* gtk/gtkbbox.c : use g_return_val_if_fail() if
	there is a value to return

	* gtk/gtkfontsel.c gtk/gtkiconfactory.c :
	static correctness

	* gtk/gtkicontheme.c : ported to use GTimeVal instead of
	struct timeval and GTK_DATA_PREFIX instead of GTK_DATADIR

	* gtk/gtkicontheme.c : use HAVE_LC_MESSAGES

	* gtk/gtkimmulticontext.c : use gtkprivate.h

	* gtk/stock-icons/stock_color_picker_25.png
	  gtk/stock-icons/stock_jump_to_rtl_16.png
	  gtk/stock-icons/stock_jump_to_rtl_24.png
	  gtk/stock-icons/stock_redo_rtl_16.png
	  gtk/stock-icons/stock_redo_rtl_24.png
	  gtk/stock-icons/stock_undelete_rtl_16.png
	  gtk/stock-icons/stock_undelete_rtl_24.png
	  gtk/stock-icons/stock_undo_rtl_16.png :
	  gtk/stock-icons/stock_undo_rtl_24.png :
	readded as binary
2003-07-20 15:50:14 +00:00
Owen Taylor
9bedbf662d Use asynchronously _gdk_x11_set_input_focus_safe to avoid having to trap
Fri Jul  4 15:57:52 2003  Owen Taylor  <otaylor@redhat.com>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

	* configure.in: Fix misplaced comma that was resulting
	in XShm always being disabled.
2003-07-05 01:54:05 +00:00
Tor Lillqvist
aac21b6f6a We can calculate the width and height of the bounding rectangle only after
2003-07-04  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkdrawable-win32.c (gdk_win32_draw_polygon,
	gdk_win32_draw_segments, gdk_win32_draw_lines): We can calculate
	the width and height of the bounding rectangle only after the
	minumum x and y have been found, and need a separate loop for
	it. Thanks to Bruce Hochstetler for providing a sample program
	exhibiting the bug.
2003-07-04 00:23:03 +00:00
Tor Lillqvist
f976beaf41 WindowFromPoint() wants screen coordinates (#115422, Tim Evans).
2003-07-01  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkwindow-win32.c (_gdk_windowing_window_get_pointer):
	WindowFromPoint() wants screen coordinates (#115422, Tim Evans).
2003-07-01 11:14:46 +00:00
Tor Lillqvist
33902a67f0 New function, callback proc for EnumWindows().
2003-06-30  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkdnd-win32.c (find_window_enum_proc): New function,
	callback proc for EnumWindows().
	(gdk_drag_find_window_for_screen): Actually take the drag_window
	argument into account: Instead of using WindowFromPoint(), use
	EnumWindows(), to be able to skip the drag_window. (#116320, Tony
	M Brown, Herman Bloggs)

	* gdk/win32/*.c: Replace gdk_drawable_ref()/unref() and
	gdk_window_ref()/unref() calls with g_object_ref()/unref().
	Consistently use %p format in debugging output of pointers and
	HANDLEs.
2003-06-30 21:58:24 +00:00
Tor Lillqvist
323bcc614d Fix for #111028, thanks to J. Ali Harlow, who writes: I found that the
2003-06-28  Tor Lillqvist  <tml@iki.fi>

	Fix for #111028, thanks to J. Ali Harlow, who writes:
	I found that the GdkPixmap->GdkImage reference really isn't
	important. It's only really there to have somewhere convenient to
	store the location of the pixel data in the pixmap and as an easy
	way of accessing the dimensions of that data. I have therefore put
	together a fix which removes this reference entirely which seems
	to solve the problem.

	* gdk/win32/gdkpixmap-win32.h (struct _GdkPixmapImplWin32):
	Instead of a pointer to a GdkImage, keep a pointer to the pixels
	directly.

	* gdk/win32/gdkimage-win32.c (_gdk_win32_setup_pixmap_image): Remove.
	(_gdk_win32_new_image): New function, replacing the above. Creates
	a GdkImage without any associated GdkPixmap.
	(gdk_image_new_bitmap, _gdk_image_new_for_depth): Use it instead.

	* gdk/win32/gdkprivate-win32.h: Remove from here, too.

	* gdk/win32/gdkcursor-win32.c (gdk_cursor_new_from_pixmap)
	* gdk/win32/gdkdrawable-win32.c (blit_from_pixmap)
	* gdk/win32/gdkgc-win32.c (_gdk_win32_bitmap_to_hrgn)
	* gdk/win32/gdkmain-win32.c (_gdk_win32_drawable_description):
	* gdk/win32/gdkpixmap-win32.c (gdk_pixmap_impl_win32_finalize,
	gdk_pixmap_new, gdk_bitmap_create_from_data, gdk_pixmap_foreign_new)
	Corresponding changes.
2003-06-28 01:12:51 +00:00
Tor Lillqvist
25359a2a06 When emulating X11's automatic grab on button down, pass owner_events as
2003-06-21  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkevents-win32.c (gdk_event_translate): When
	emulating X11's automatic grab on button down, pass owner_events
	as FALSE. According to the XLib spec, automatic grabs use True for
	owner_events when OwnerGrabButtonMask is selected, and I don't see
	the X11 backend doing that. (#110271)
	(find_window_for_pointer_event): Improve debugging output.
2003-06-22 00:21:03 +00:00
Tor Lillqvist
f91ae98003 Fix typo.
2003-06-06  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkprivate-win32.h: Fix typo.
2003-06-06 23:06:29 +00:00
Tor Lillqvist
37ccf562d7 Set graphics_exposures and subwindow_mode, too, even if they aren't
2003-06-06  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkgc-win32.c (_gdk_win32_gc_new): Set
	graphics_exposures and subwindow_mode, too, even if they aren't
	currently used.
2003-06-06 22:55:55 +00:00
Tor Lillqvist
72a70cb646 Handle global filters.
2003-06-05  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkevents-win32.c (gdk_event_translate): Handle global
	filters.
2003-06-05 22:05:14 +00:00
Matthias Clasen
83c626bbe0 Remove dubious bitfields of unspecified signedness. (#112919, Morten
2003-05-27  Matthias Clasen  <maclas@gmx.de>

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

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

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

	* gtk/queryimmodules.c (escape_string):
	* gtk/gtktextbtree.c (_gtk_text_btree_get_text):
	* gtk/gtksettings.c (_gtk_settings_parse_convert):
	* gtk/gtkrc.c (gtk_rc_parse_assignment):
	* gtk/gtkinputdialog.c (gtk_input_dialog_set_key):
	* gdk/x11/gdkdisplay-x11.c (escape_for_xmessage): Replace all
	occurances of g_string_new ("") by g_string_new (NULL). (#106975,
	Morten Welinder)
2003-05-27 21:21:00 +00:00
Owen Taylor
629a0e1424 Patch from James Henstridge to update to automake-1.7 (#109542)
Tue May  6 16:50:52 2003  Owen Taylor  <otaylor@redhat.com>

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

        * autogen.sh: update to call newer tools.

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

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

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

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

        ===

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

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

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

        * configure.in: Update versions to 2.3.0.
2003-05-06 21:55:41 +00:00
Tor Lillqvist
2e58122c79 Fix for #110165 (thanks to Arnaud Charlet):
2003-05-06  Tor Lillqvist  <tml@iki.fi>

	Fix for #110165 (thanks to Arnaud Charlet):

	* gdk/win32/gdkevents-win32.c (build_keypress_event,
	build_keyrelease_event): For unshifted control char, use
	lowercase ASCII keyval.
	(gdk_event_translate): Similarily, when handling WM_SYSKEYDOWN and
	UP (i.e. Alt-something), if it's an unshifted ASCII letter, use
	lowercase keyval. Use build_key_event_state() here, too, instead
	of minor code duplication.
2003-05-06 21:44:55 +00:00
Tor Lillqvist
935dca854e Use the signed GET_X_LPARAM() and GET_Y_LPARAM() to extract x and y
2003-03-14  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkevents-win32.c: Use the signed GET_X_LPARAM() and
	GET_Y_LPARAM() to extract x and y coordinates from an LPARAM or
	DWORD, and not the unsigned HIWORD() and LOWORD(). Systems with
	multiple monitors can have negative coordinates on some of the
	monitors. (partial fix for #99496, Arnaud Charlet)
2003-03-15 00:02:42 +00:00
Tor Lillqvist
b2698b3a58 On WM_MOUSEMOVE, the test whether we have actually moved (and thus
2003-03-13  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkevents-win32.c (gdk_event_translate): On
	WM_MOUSEMOVE, the test whether we have actually moved (and thus
	shouldn't generate an GDK event) moved after the call to
	propagate() and translate_mouse_coords(). Otherwise we were
	testing wrong values. (#108115, Allin Cottrell)
	(gdk_event_translate): On WM_?BUTTONUP, set current_{x,y} the same
	way as in WM_?BUTTONDOWN and WM_MOUSEMOVE.
2003-03-13 01:44:27 +00:00
Tor Lillqvist
1e072f625c if a grab cursor is used, must copy the HCURSOR with CopyCursor(), as it
2003-03-13  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkevents-win32.c (gdk_pointer_grab): if a grab cursor
	is used, must copy the HCURSOR with CopyCursor(), as it is OK to
	destroy the GdkCursor after calling gdk_pointer_grab(). Set the
	cursor right away with SetCursor(), as we won't get any
	WM_SETCURSOR messages while the mouse is captured.
	(gdk_display_pointer_ungrab): Correspondingly, destroy the copy
	with DestroyCursor() when no longer used. (#108114, Allin Cottrell)

	* gdk/win32/gdkevents-win32.c (gdk_event_translate): On
	WM_SYSCHAR, return FALSE from the window procedure to prevent the
	DefWindowProc from being called. Otherwise Windows would beep,
	thinking you are tring to access a (nonexistent) menu when you
	press Alt-something. Don't do this for Alt-Space,
	though. (#107454, Martyn Russell)

	* gdk/win32/gdkcursor-win32.c: Minor spacing and debug print fixes.
2003-03-13 00:57:14 +00:00
Tor Lillqvist
ae90aab7ff Don't try to compensate for LineTo() not drawing the end pixel. It causes
2003-03-09  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkdrawable-win32.c (draw_segments): Don't try to
	compensate for LineTo() not drawing the end pixel. It causes more
	harm than benefits, see bug #81895.
2003-03-09 17:15:48 +00:00
Matthias Clasen
3db24eb81c Bug #107664 continued:
2003-03-08  Matthias Clasen  <maclas@gmx.de>

	Bug #107664 continued:

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

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

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

	* gtk/gtktextiter.c (_gtk_text_iter_get_indexable_segment):
	(_gtk_text_iter_get_any_segment):
	(_gtk_text_iter_get_segment_byte):
	(_gtk_text_iter_get_segment_char):
	(_gtk_text_iter_get_text_line):
	(_gtk_text_iter_get_btree): Fix 0/NULL confusion.
	* gdk/x11/gdkdnd-x11.c (motif_target_table_check): Return gint.
	* gdk/win32/gdkfont-win32.c (gdk_font_equal):
	* gdk/linux-fb/gdkwindow-fb.c (gdk_window_get_deskrelative_origin):
	(gdk_window_get_origin):
	* gdk/linux-fb/gdkcolor-fb.c (gdk_colors_alloc): Fix 0/FALSE confusion.
2003-03-08 21:11:39 +00:00
Matthias Clasen
d03b2741ad Trivial cleanups (bug #107664) 2003-03-08 20:49:00 +00:00