2008-03-10 Tor Lillqvist <tml@novell.com>
Bug 520286 - Non-deletable window has no minimize / maximize buttons
* gdk/win32/gdkmain-win32.c (_gdk_win32_window_style_to_string):
New debugging output function that decodes a set of WS_* bits.
* gdk/win32/gdkprivate-win32.h: Declare it.
* gdk/win32/gdkwindow-win32.c (update_single_system_menu_entry):
New function that enables or disables one menu entry in the system
menu of a top-level window. (The corresponding decoration will
then also be enabled or disabled (grayed).)
(update_style_bits): Do as the comment says and don't try to
update the window style based on the GdkWMFunctions set for the
window.
(update_system_menu): New function that enables or disables the
system menu entries based on a window's stored set of
GdkWMFunctions.
(gdk_window_set_functions): Call update_system_menu() instead of
update_style_bits().
svn path=/trunk/; revision=19743
2008-02-07 Cody Russell <bratsche@gnome.org>
* gdk/win32/gdkevents-win32.c
* gdk/win32/gdkwindow-win32.c: Fixed two declarations in the middle
of a block that were causing compile problems on old
compilers. (#515053, reported by Kazuki IWAMOTO)
svn path=/trunk/; revision=19493
2008-02-05 Cody Russell <bratsche@gnome.org>
* gdk/win32/gdkwindow-win32.c (_gdk_modal_current): Walk
down the stack until we get to a window that is mapped.
Otherwise hiding a window will cause all windows in the app
to be blocked. (#514643)
svn path=/trunk/; revision=19477
2008-01-15 Michael Natterer <mitch@imendio.com>
* gdk/gdkdisplay.h
* gdk/gdkdrawable.h
* gdk/gdkevents.h
* gdk/gdkpango.h
* gdk/gdkregion.h
* gdk/gdkrgb.h
* gdk/gdkwindow.h: made more struct pointer and array parameters
const. GDK should now be constified as far as possible without
breaking source compatibility. Includes some minor cleanup like
indentation and s/nfoo/n_foo/ (bug #508544).
* gdk/gdkdisplay.c
* gdk/gdkdraw.c
* gdk/gdkevents.c
* gdk/gdkpango.c
* gdk/gdkregion-generic.c
* gdk/gdkrgb.c
* gdk/directfb/gdkdisplay-directfb.c
* gdk/directfb/gdkwindow-directfb.c
* gdk/quartz/gdkdisplay-quartz.c
* gdk/quartz/gdkwindow-quartz.c
* gdk/win32/gdkdisplay-win32.c
* gdk/win32/gdkwindow-win32.c
* gdk/x11/gdkdisplay-x11.c
* gdk/x11/gdkwindow-x11.c: changed accordingly.
svn path=/trunk/; revision=19372
2007-11-26 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkwindow-win32.c (gdk_window_fullscreen): Use the
monitor the window currently is on, not always the primary
monitor. (#463865, Tim Evans)
svn path=/trunk/; revision=19047
2007-10-17 Cody Russell <cody@jhu.edu>
* gdk/win32/gdkevents-win32.c
* gdk/win32/gdkwindow-win32.[ch]: Force non-modal transient dialogs
to iconify with their parents on Win32. Maintain a list of transient
children, and whenever a window is hidden or restored we now do the
same thing to all connected transient windows above and below the
current window in the chain. See comment under WM_ACTIVATE for the
reasons why. (#164537, #371036, #405178)
svn path=/trunk/; revision=18929
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.