2007-07-12 Cody Russell <bratsche@gnome.org>
* gdk/win32/gdkevents-win32.c
* gdk/win32/gdkwindow-win32.[ch]: Fix transient windows on Win32
so that when a transient child window is closed (particularly when
there are 3 or more levels of transient windows), the correct window
receives focus rather than a seemingly random window. (#112404)
svn path=/trunk/; revision=18461
2007-06-15 Hans Breuer <hans@breuer.org>
* gtk/makefile.msc.in tests/makefile.msc : updated
* gdk/win32/gdkwindow-win32.c : explicit usage of RegisterClassExW
to match the WNDCLASSEXW.
True dynamic linking of SetLayeredWindowAttributes
* tests/testprint.c tests/testnouiprint.c : use G_PI
svn path=/trunk/; revision=18140
2007-06-14 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkwindow-win32.c (RegisterGdkClass): Use
g_win32_get_windows_version() instead of _winver so that this
compiles on Cygwin, too. Not that I know if it makes sense to
build GTK+ with the Win32 backend for Cygwin, but some people want
to.
svn path=/trunk/; revision=18132
2007-04-30 Tor Lillqvist <tml@novell.com>
Add functionality to set overall opacity of a top-level
window. (#405316)
* gdk/gdk.symbols: Add gdk_window_set_opacity.
* gdk/x11/gdkwindow-x11.c
* gdk/win32/gdkwindow-win32.c: Implement
gdk_window_set_opacity(). On X11 use the _NET_WM_WINDOW_OPACITY
property. On Win32 use SetLayeredWindowAttributes(LWA_ALPHA).
* gdk/gdkwindow.h: Declare gdk_window_set_opacity().
* gdk/x11/gdkscreen-x11.c (gdk_screen_get_rgba_colormap): Document
that this is not implemented in the Windows backend. Add reference
to gdk_window_set_opacity().
svn path=/trunk/; revision=17730
2007-02-26 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkwindow-win32.c (gdk_window_set_icon_name): Add
comment clarifying that "icon name" here is not related to the
freedesktop.org icon naming stuff.
svn path=/trunk/; revision=17351
2006-10-29 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkwindow-win32.c (RegisterGdkClass): Improve handling
of the small icon of the window class. (#152620, Kazuki Iwamoto)
2006-09-10 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkprivate-win32.h
* gdk/win32/gdkmain-win32.c
* gdk/win32/gdkwindow-win32.c: Define WINVER and _WIN32_WINNT as
0x0500 in gdkprivate-win32.h instead of doing it in two source
files. (#355212, Mike Edenfield)
* gdk/win32/gdkwindow-win32.c: We can also remove the ersatz
GetAncestor() for the _MSC_VER && WINVER < 0x0500 case, I hope.
2006-09-04 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkevents-win32.c
* gdk/win32/gdkwindow-win32.c: Use wide-char API for message and
window handling (PeekMessage, PostMessage, SendMessage,
DispatchMessage, DefWindowProc, RegisterClassEx,
CreateWindowEx). (#321597)
2006-09-03 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkwindow-win32.c (gdk_window_beep): No
GDK_WINDOW_DISPLAY in the Win32 backend.
* gtk/gtkfilesystemwin32.c: Copy what Kris did to
gtkfilesystemunix.c
2006-08-29 Matthias Clasen <mclasen@redhat.com>
* gdk/gdkwindow.h:
* gdk/gdk.symbols:
* gdk/directfb/gdkwindow-directfb.c (gdk_window_beep):
* gdk/win32/gdkwindow-win32.c (gdk_window_beep):
* gdk/quartz/gdkwindow-quartz.c (gdk_window_beep):
* gdk/x11/gdkwindow-x11.c (gdk_window_beep): Add a function
to beep on a window. For X11, implement this with
XkbBell. (#353455, Mariano Suárez-Alvarez)
2006-08-29 Tor Lillqvist <tml@novell.com>
Remove support for Windows 9x/ME. GTK+ hasn't worked on Win9x
since 2.6 or 2.8. It's pointless to keep the Win9x code in here as
it isn't being maintained anyway. If somebody is interested, it
can always be found in older GTK+ versions, and in CVS.
* gdk/win32/gdkwindow-win32.c: Remove the G_WIN32_IS_NT_BASED()
and G_WIN32_HAVE_WIDECHAR_API() tests and their false (Win9x)
branches, and any variables or static functions used only by the
Win9x branches.
2006-02-20 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkwindow-win32.c (do_shape_combine_region): New
function. Factor out code from gdk_window_shape_combine_mask().
(gdk_window_shape_combine_region): Actually do something. Convert
region to a HRGN and call do_shape_combine_region().
(gdk_window_input_shape_combine_mask)
(gdk_window_input_shape_combine_region)
(gdk_window_set_child_input_shapes)
(gdk_window_merge_child_input_shapes): New functions, dummy
implementations.
2006-02-08 John Ehresman <jpe@wingware.com>
* gdk/win32/gdkwindow-win32.c: Let gdk_window_set_decorations()
take precedence over anything derived from hints. Restructure
related code and logic, add some new helper functions. (#327217)
2006-01-02 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkwindow-win32.c
(gdk_window_impl_win32_get_visible_region): Make identical to the
X11 implementation. (#322264, John Ehresman)
2005-11-28 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkwindow-win32.c (gdk_window_set_urgency_hint):
Implement the conditional use of FlashWindowEx() properly for MSVC
compilations. The code was confusingly assuming that if compiled
with a "new" compiler, it will only be run on "new" Windows
versions. We want it to run on "old" versions, too, even if
compiled with a "new" compiler. There are two orthogonal issues:
whether the compiler defines the necessary API in its headers, and
whether it is present at run-time. (#318077)
2005-11-27 Tor Lillqvist <tml@novell.com>
Once again rework Win32 window decoration code. Doesn't break
#104514. The dialogs in gtk-demo now have the same decorations and
behaviour as on X11. Tried to fix#322516 but it seems very hard
to make the trivial sample program there behave as expected. OTOH,
simply moving the gtk_window_decorate() call in the #322516 sample
program after the call to gtk_widget_show() helps...
* gdk/win32/gdkwindow-win32.c (set_or_clear_style_bits): Revert to
the correct semantics. Each call to gdk_window_set_decorations()
which calls this function is supposed to affect all decorations.
(decorate_based_on_hints): New function, looks at both geometry
hints and type hint and sets window decorations based on
that. Consolidate code from gdk_window_set_geometry_hints() and
gdk_window_set_type_hint() here.
(gdk_window_set_geometry_hints, gdk_window_set_type_hint): Call
decorate_based_on_hints().
2005-11-09 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkwindow-win32.c: Remove unnecessary includes.
(_gdk_win32_get_adjusted_client_rect): Remove this two-line
function which was used only in one place.
(get_outer_rect): Use _gdk_win32_adjust_client_rect().
(gdk_window_set_geometry_hints): If we have identical minimum and
maximum size hints, remove the resize and maximize
decorations/functions. (#104514)
If we have a maximum size hint, remove the maximize
decoration/function but ensure the resize decoration/function is
available. Otherwise ensure both resize and maximize
decorations/functions are there.
(set_or_clear_style_bits): Factored out common code from
gdk_window_set_decorations() and gdk_window_set_functions().
Hack the window style setting once more: Only touch the window
style bits corresponding to the GdkWMDecoration or GdkWMFunction
parameter bitmasks. Hopefully this finally is the correct thing to
do. We used to clear all other bits than those that were being
set, or set all other bits than those that were being cleared.
Take into account that adding or removing decorations leaves the
window's outer size unchanged, i.e., the client area's size and
position change. This is apparently not what we want, so change
also the window's (outer) position and size appropriately so that
the client area's position and size stay constant.
gtk-demo's color selector dialog is now non-resizable like on X11
(I tested with metacity in GNOME). Torn off menus are shrinkable
vertically but have a maximum size, and are not maximizable or
minimizable, like on X11.
(gdk_window_set_decorations, gdk_window_set_functions): Let
set_or_clear_decorations() do most of the job.
* gdk/win32/gdkprivate-win32.h: Remove declaration of
_gdk_win32_get_adjusted_client_rect().
2005-11-09 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkwindow-win32.h (struct _GdkWindowImplWin32)
* gdk/win32/gdkwindow-win32.c (gdk_window_impl_win32_init,
gdk_window_get_type_hint, gdk_window_get_type_hint): Store the
type hint. Implement gdk_window_get_type_hint() by just returning
the hint stored.
2005-11-09 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkwindow-win32.c (gdk_window_set_geometry_hints):
Remove code that has been permanently ifdeffed out for two years.
2005-11-02 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkcolor-win32.c
* gdk/win32/gdkscreen-win32.c
* gdk/win32/gdkwindow-win32.c: Whitespace consistency
fixes. Remove superfluous test for GdkWindow* parameters being
non-NULL. Testing GDK_IS_WINDOW() is enough. As there is only one
GdkScreen and one GdkDisplay in the Win32 backend, use those
variables instead of the getter functions. For GdkDisplay* and
GdkScreen* parameters, check that they are equal to the
corresponding singleton variables instead of the more general
GDK_IS_DISPLAY() or GDK_IS_SCREEN().
2005-09-26 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkwindow-win32.c (gdk_window_shape_combine_mask): Set
the shaped flag here, too. (#316871)
(gdk_window_shape_combine_region): Currently unimplemented, so
don't do anything to the shaped flag here.
2005-09-18 Hans Breuer <hans@breuer.org>
* gtk/makefile.msc.in : fix typo for GTK_VER; define HAVE_CONFIG_H
cause gtkprogressbar.c has #include <config.h> conditionally; less
noise from generated gtk.def
* gtk/stock-icons/makefile.msc gdk/makefile.msc tests/makefile.msc : updated
* gtk/gtktrayicon-win32.c : dummy implmentation to make gtk compile.
For me it works as well as the *NIX implemenation, that is not at all.
* gdk/win32/gdkproperty-win32.c : implement gdk_atom_intern_static_string()
* gdk/win32/gdkwindow-win32.c(gdk_window_set_urgency_hint) : only use
only use (WINVER >= 0x0500) when available from the SDK. Otherwise fall
back to true dynamic linking of FlashWindowEx. Makes gtk+ work on NT4.0
again - if compiled properly.
* tests/teststatusicon.c : don't use GNOME icons for testing, but icons
already coming with Gtk+. Makes it compile on win32.
2005-07-21 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkwindow-win32.c (gdk_window_set_title): Use
wide-char API when available. (#311079, Peter Zelezny)
2005-07-03 Hans Breuer <hans@breuer.org>
* **/makefile.msc[.in] : updated
* gtk/gtkiconcache.c : <io.h> for open()
* gtk/gtkstyle.c : use G_PI instead of M_PI
* gdk/win32/gdkcursor-win32.c : implement gdk_cursor_new_from_name()
by mapping the lower case win32 api name to the respective cursor.
E.g. pass "wait" to get the IDC_WAIT cursor. Also allows to load
cursors from named resources in the executable.
(gdk_cursor_get_image) : just return NULL for now.
* gdk/win32/gdkgeometry-win32.c : implement gdk_window_move_region()
by delegation to ScollWindowEx(), untested.
* gdk/win32/gdkwindow-win32.c : stub for gdk_window_set_urgency_hint()
2005-06-04 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkcursor-win32.c
* gdk/win32/gdkwindow-win32.c
* gdk/win32/gdkprivate-win32.h: Support full-colour cursors.
Support cursors with alpha on XP. Use code in common with the
support for alpha icons that already was present. (#306101, Tim
Evans)
2005-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-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-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-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-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-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-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-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-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
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-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