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-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-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-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-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 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-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-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-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-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 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-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-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 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-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-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-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-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 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-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-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 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-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-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)
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-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-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-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-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-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-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-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-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)
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-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.
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.