2008-06-14 Cody Russell <bratsche@gnome.org>
* gdk/win32/gdkselection-win32.c (gdk_win32_selection_add_targets):
Initialize hwnd to NULL. This fixes OpenClipboard() failure and,
according to MSDN docs, associates the open clipboard with the
current task. (#378158, reported by Andreas Köhler)
svn path=/trunk/; revision=20388
2008-05-23 Hans Breuer <hans@breuer.org>
* gtk/gtkprintoperation.c : check surface status after ceating a pdf.
Avoids crashing when the target can not be written, bug #537685
* gdk/win32/gdkdisplay-win32.c : runtime linking of ProcessIdToSessionId
* gtk/gtkfilesystem.c : variadic macros are not supported with c89 and
it was not needed here anyway.
svn path=/trunk/; revision=20370
2008-06-11 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkdisplay-win32.c (gdk_display_get_name): As we don't
support Win9x anyway, we can use ProcessIdToSessionId()
unconditionally.
svn path=/trunk/; revision=20353
2008-05-30 Tor Lillqvist <tml@novell.com>
Bug 533108 - leak of GDI region in function 'handle_wm_paint'
* gdk/win32/gdkevents-win32.c (handle_wm_paint): Patch by Daniel
Atallah.
svn path=/trunk/; revision=20250
2008-05-28 Michael Natterer <mitch@imendio.com>
* gdk/gdk.h: define __GDK_H_INSIDE__ around including all other
headers.
* gdk/gdkenumtypes.h.template
* gdk/gdk*.h: add single-include guards that #error out if
GTK_DISABLE_SINGLE_INCLUDES is defined and any of these files is
included individually. Also removed some redundant includes and
did some tiny trailing whitespace removal that's not worth to
commit separately.
* gdk/gdkprivate.h: include <gdk/gdk.h> instead of individual
files.
* gdk/win32/gdkwin32.h
* gdk/x11/gdkx.h: only include <gdk/gdkprivate.h> and remove all
other includes.
svn path=/trunk/; revision=20217
2008-05-23 Tor Lillqvist <tml@novell.com>
* gdk/gdk.symbols: Add gdk_window_redirect_to_drawable and
gdk_window_remove_redirection.
* gdk/win32/gdkwindow-win32.c (_gdk_window_new)
(_gdk_window_reparent): Rename to adapt to the offscreen rendering
changes. Remove now unnecessary parameter checks as the caller
does that already.
* gtk/gtk.symbols: Add gtk_widget_get_snapshot.
svn path=/trunk/; revision=20130
2008-05-13 Tor Lillqvist <tml@novell.com>
Bug 496958 - Wacom Bamboo Doesn't Function with GTK apps in Win32
* gdk/win32/gdkinput-win32.c (_gdk_input_wintab_init_check): Set
the "packet rate" of devices to zero instead of 50. This is
reported to help significantly with Wacom tablet behaviour in GIMP
and Inkscape. Patch from Thomas Bleeker.
svn path=/trunk/; revision=20104
2008-05-06 Richard Hult <richard@imendio.com>
* gdk/gdkevents.c: (gdk_event_copy), (gdk_event_free):
* gdk/gdkinternals.h: Add private backend data to events, and
handle it when copying/freeing events. Currently only needed in
the quartz backend.
* gdk/directfb/gdkevents-directfb.c:
* gdk/quartz/gdkevents-quartz.c:
* gdk/win32/gdkevents-win32.c:
* gdk/x11/gdkevents-x11.c: (_gdk_windowing_event_data_copy)
(_gdk_windowing_event_data_free): Add stubs for X11, win32 and
directfb. Implement for quartz. Part of fixing bug #473822.
svn path=/trunk/; revision=20078
2008-03-24 Tor Lillqvist <tml@novell.com>
Bug 524151 - Dragging of 0-byte files results in an empty filename
on Windows XP and above
* gdk/win32/gdkdnd-win32.c (resolve_link): Check for the file
being empty first. For some reason ISHellLink and IPersistFile
succeeds in interpreting empty files as shortcuts, claiming the
target of the shortcut is an empty path.
Change the function to take the wide character file name that the
caller already has anyway, to avoid a superfluous conversion from
UTF-8 to UTF-16.
svn path=/trunk/; revision=19931
2008-03-23 Cody Russell <bratsche@gnome.org>
* gdk/win32/gdkevents-win32.c (show_window_recurse):
Check window state for GDK_WINDOW_STATE_ICONIFIED before doing
ShowWindow (SW_RESTORE). This fixes a problem where tearing off
menus from a maximized window would force the window to restore
its size. (#518846)
svn path=/trunk/; revision=19926
2008-03-14 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkevents-win32.c: Drop the support for the
MSH_MOUSEWHEEL message that MSDN says is used only on NT 3.51 and
Win95. Thanks to mitch for noticing this obsolete code.
svn path=/trunk/; revision=19874
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-06 Cody Russell <bratsche@gnome.org>
* gdk/win32/gdkevents-win32.c: Check if the window is a temp window,
otherwise things get wonky when you click on a menu. This fixes
a regression caused in #505928. Thanks to Tor for spotting this
one! (#514789)
svn path=/trunk/; revision=19482
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-31 Cody Russell <bratsche@gnome.org>
* gdk/win32/gdkevents-win32.c:
Refactored some of the window hiding/showing code from
WM_ACTIVATE to WM_SIZE and WM_SYSCOMMAND. Having this
under WM_ACTIVATE was causing the application to go into
a weird state when the user right-clicked on the taskbar
entry of a window that was minimized. (#505928)
svn path=/trunk/; revision=19451
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-12-23 Cody Russell <bratsche@gnome.org>
* gdk/win32/gdkevents-win32.c (show_window_recurse): Check that
the window is mapped before setting SW_RESTORE or SW_MINIMIZE.
Fixes a regression caused by #164537 patch where transient
windows that are hidden get shown (incorrectly) when their
parents are minimized. (#504984)
svn path=/trunk/; revision=19231
2007-12-17 Matthias Clasen <mclasen@redhat.com>
* gtk/gtksettings.c: Add a gtk-im-module GTK setting
* gdk/win32/gdkproperty-win32.c:
* gdk/x11/gdksettings.c: ...and back it by a Gtk/IMModule X setting.
* gtk/gtkimmodule.[hc]:
* gtk/gtkimmulticontext.[hc]: When determining the default context,
look at the gtk-im-module setting, and listen for changes to the
setting. (#502446, Akira Tagoh)
svn path=/trunk/; revision=19195
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-19 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkevents-win32.c (gdk_event_translate): Add a block
around the WM_ACTIVATE case to avoid declaring variables in the
middle of a block. (#488017)
svn path=/trunk/; revision=18932
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-08-16 Cody Russell <bratsche@gnome.org>
* gdk/win32/cursor.bdf: Committing changes to the source
bdf font file that I forgot to commit yesterday for #458088.
svn path=/trunk/; revision=18639
2007-08-15 Cody Russell <bratsche@gnome.org>
* gdk/win32/xcursors.h: Modified the sb_h_double_arrow and
sb_v_double_arrow mouse cursors to match the ones that Windows
uses for split container controls. This allows our paned
widgets to be more easily identified as paned widgets on
Windows, since we don't have any prelighting on the draggable
pane part. (#458088)
svn path=/trunk/; revision=18621
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-07-03 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkkeys-win32.c (gdk_keymap_have_bidi_layouts):
Implement. Just return FALSE for now. What should this function
actually do? Does keyboards layouts being "in use" mean that such
layouts can be switched to on the fly? If so we need to actually
check that.
svn path=/trunk/; revision=18359
2007-06-25 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkevents-win32.c (gdk_pointer_grab): Revert my
attempted overly simple fix for #445284, as it causes a
regression. (For instance, in GIMP the tool cursor gets used also
for the right-click menu in image windows.) A more complex fix is
needed to more completely emulate X11 behaviour.
svn path=/trunk/; revision=18225
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-06-10 Cody Russell <bratsche@gnome.org>
* gdk/win32/gdkevents-win32.c (gdk_pointer_grab):
Don't revert the mouse cursor to the built-in one when
the user holds the mouse button down. (#445284, Tor Lillqvist)
svn path=/trunk/; revision=18093
2007-05-30 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkevents-win32.c (gdk_pointer_grab): Subtract the
multi-monitor offset from x and y before setting up the rectangle
for ClipCursor(). Fixes#442326.
svn path=/trunk/; revision=17988
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
2007-02-19 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkinput.c
(gdk_device_finalize, gdk_device_class_init): Remove.
(gdk_device_get_type): Drop class init function. The X11 version
doesn't have one either.
(gdk_devices_list): Call gdk_display_list_devices() on _gdk_display.
(gdk_display_list_devices): Check that the argument is
_gdk_display.
* gdk/win32/gdkinput-win32.h (GdkAxisInfo, GdkDevicePrivate):
Cleanup: remove unused fields.
* gdk/win32/gdkinput-win32.c: Corresponding changes. Fix function
names in a few debugging printouts.
svn path=/trunk/; revision=17332
2007-02-04 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkcursor-win32.c: Don't define BITMAPV5HEADER on
mingw with w32api >= 3.8, which has it in wingdi.h. (#403896)
svn path=/trunk/; revision=17256
2007-01-31 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkinput-win32.c (print_cursor): New debugging
function.
(_gdk_input_wintab_init_check): Call it when debugging output is
requested.
(_gdk_input_wintab_init_check): Skip duplicated cursors for Wacom
tablets. The Wacom driver reports duplicated cursors with
physid==0. Fix verified by Robert *gren. (Should be U+00D6
there, but svn won't let me.)
svn path=/trunk/; revision=17241
2007-01-19 Robert Oegren <gtk@roboros.com>
Fix for bug #143460 - missed tablet clicks on Windows
* gdk/win32/gdkinput-win32.c (_gdk_input_wintab_init_check):
Request absolute reporting of tablet button state, and cut down
the packet queue size a bit.
(_gdk_input_other_event): Change button state handling
accordingly. Also drop the no longer necessary code that detects
missed clicks/releases for button 1. The switch to absolute button
state should prevent missed events for all buttons. Additionally,
swap button 2 and 3.
(_gdk_input_grab_pointer): Don't reset button_state, that will only
cause a new press event as soon as the next tablet packet arrives.
svn path=/trunk/; revision=17188
2007-01-19 Tor Lillqvist <tml@novell.com>
Build Wintab support always on Windows. Don't require the Wintab
SDK.
* configure.in: Drop the --with-wintab option. Drop the
HAVE_WINTAB feature test macro and Automake variable.
* acconfig.h
* config.h.win32.in: Drop HAVE_WINTAB.
* gdk/win32/gdkevents-win32.c
* gdk/win32/gdkinput.c
* gdk/win32/gdkinput-win32.h
* gdk/win32/gdkinput-win32.c
* gdk/win32/gdkmain-win32.c: Make HAVE_WINTAB ifdef blocks
unconditional.
* gdk/win32/gdkinput-win32.c (_gdk_input_wintab_init_check): Try
to load wintab32.dll dynamically here. If it is found look up the
handful Wintab functions we use.
(rest of file): Use these function pointers instead of calling the
functions from wntab32x.lib. The code in wntab32x.lib did the same
thing anyway: tried to load wintab32.dll, and looked up the
addresses of the actual functions from it.
* gdk/Makefile.am
* gdk/win32/Makefile.am: Drop the libwntab32x hacks.
* gdk/win32/wintab.h
* gdk/win32/pktdef.h: New files. Copied from the Wintab
SDK. Copyright blurb says: "The text and information contained in
this file may be freely used, copied, or distributed without
compensation or licensing restrictions."
* README.win32: Update a bit. Remove the text about the Wintab
SDK.
svn path=/trunk/; revision=17186
2007-01-18 Tor Lillqvist <tml@novell.com>
* gdk-pixbuf/Makefile.am
* gdk/Makefile.am
* gdk/win32/Makefile.am
* gtk/Makefile.am: Fixes for building outside srcdir on
Win32. (#336819, #340113) Drop distributing the handmade .la
libtool wrapper for the wntab32x library. It's too much trouble
making it work when building outside srcdir. Just link to the
library direcly using -Wl,win32/libwntab32x.a.
svn path=/trunk/; revision=17185
2007-01-06 Tor Lillqvist <tml@novell.com>
* gdk/win32/cursor.bdf: New file. Downloaded from
freedesktop.org's webcvs. Slighly edited cursors "crosshair",
"diamond_cross", "draft_large", "gobbler" and "target" to fix
#392504. It is possible that the same end result could have been
achieved by tweaking bdfcursor.c instead.
* gdk/win32/bdfcursor.c: Add optional debugging output.
* gdk/win32/xcursors.h: Regenerated.
svn path=/trunk/; revision=17096
2006-12-27 Kristian Rietveld <kris@gtk.org>
Support inverting arrows via XSetting. (#377979, Yevgen Muntyan).
* gtk/gtksettings.c (gtk_settings_class_init): add new setting
gtk-alternative-sort-arrows.
* gdk/win32/gdkproperty-win32.c (gdk_screen_get_setting): add
new setting.
* modules/engines/ms-windows/Theme/gtk-2.0/gtkrc: set new
gtk-alternative-sort-arrows setting to true.
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_update_button):
invert direction if gtk-alternative-sort-arrows is TRUE.
2006-10-29 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkcursor-win32.c
(gdk_win32_icon_to_pixbuf_libgtk_only): Implement for B&W cursors,
for instance the built-in GDK ones.
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-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/gdkcursor-win32.c
* gdk/win32/gdkdnd-win32.c
* gdk/win32/gdkdrawable-win32.c
* gdk/win32/gdkgc-win32.c
* gdk/win32/gdkglobals-win32.c
* gdk/win32/gdkkeys-win32.c
* gdk/win32/gdkmain-win32.c
* gdk/win32/gdkproperty-win32.c
* gdk/win32/gdkselection-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.
* gdk/win32/gdkprivate-win32.h: Remove backup definitions for
constants that aren't missing from current mingw and MSVC6
headers.
* gdk/win32/gdkmain-win32.c
* gdk/win32/gdkprivate-win32.h: Remove the _gdk_win32_gdi_failed()
function. On NT-based Windows GetLastError() returns error codes
also for failed GDI calls, so we can use _gdk_win32_api_failed()
always.
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.
* configure.in
* acconfig.h
* gdk/Makefile.am
* gdk/win32/Makefile.am
* gdk/win32/libie55uid.la
* gdk/win32/gdkevents-win32.c: Remove the --with-ie55 configure
switch and associated stuff. Active IMM and the <dimm.h> header
was used for IM support on NT4 and Win9x. Win2k and later have IM
support built-in.
* gdk/win32/gdkevents-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-06-11 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkproperty-win32.c (gdk_property_change): Convert \n
to \r\n also when storing CF_UNICODETEXT (UTF-16) in the
Clipboard. (#344496)
2006-06-09 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkdrawable-win32.c (_gdk_win32_drawable_release_dc):
Call ReleaseDC() on DCs acquired with GetDC() (for windows), and
DeleteDC() on DCs acquired with CreateCompatibleDC() (for
bitmaps). According to MSDN, this is the correct thing to do, even
if always using DeleteDC() seems to have worked fine in
practice. (#337491)
2006-06-08 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkevents-win32.c (gdk_event_translate):
[WM_WINDOWPOSCHANGED] Replace identical code as in
handle_configure_event() with call to that function.
[WM_SIZING] Fix implementation of aspect ratio hints. (#344244)
The hints are for the geometry of the client area, not of the
window including decorations. Improve resizing behaviouor in the
presence of aspect hints, more in line with typical X window
managers.
2006-05-09 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkevents-win32.c (doesnt_want_scroll): Look at both
GDK_SCROLL_MASK and GDK_BUTTON_PRESS_MASK. (#139628)
Tue Apr 25 10:25:28 2006 Søren Sandmann <sandmann@redhat.com>
* tests/testgtk.c (create_alpha_window): Create 'composited' label.
* tests/testgtk.c (on_composited_changed): New function, change
the label to say whether the screen is composited or not.
* gtk/gtkwindow.c (gtk_window_on_composited_changed): When
composited status change, invalidate the window and propagate the signal;.
* gtk/gtkwindow.c (gtk_window_map): Set the appropriate type hint
if reset_type_hint is TRUE.
* gtk/gtkwindow.c (gtk_window_set_type_hint): If hint is one of
the old hints, store a shadow copy in the public window->type_hint
bitfield, otherwise set this field to normal. Set the private
field to the type hint.
* gtk/gtkwindow.c (gtk_window_init): Initialize priv->type_hint.
* gtk/gtkwindow.c (struct _GtkWindowPrivate): New field
"reset_type_hint" indicating whether the type hint needs to be
reset. New field type_hint containing a GdkWindowTypeHint.
* gtk/gtkwidget.c (propagate_composited_changed): New function to
propagate changes in composited status.
(gtk_widget_class_init): Add composited_changed signal.
* gtk/gtkwidget.h (struct _GtkWidgetClass): New signal composited-changed.
* gtk/gtkwidget.c (gtk_widget_is_composited): New function.
* gtk/gtktooltips.c (gtk_tooltips_draw_tips): Set transient for.
* gtk/gtktooltips.c (gtk_tooltips_force_window): Set the type hint
* gtk/gtkmenuitem.c (gtk_menu_item_position_menu): Compute whether
the item belongs to a menubar. Set the type_hint appropriately
depending on the outcome.
* gtk/gtkmenu.c (gtk_menu_position): Set the default type hint here.
* gtk/gtkmenu.c (gtk_menu_attach_to_widget): connect to hierarchy
changed on the attach widget.
* gtk/gtkmenu.c (attach_widget_hierarchy_changed): New function to
set the transient_for property for menus.
* gtk/gtkdnd.c (set_icon_stock_pixbuf): Set the appropriate type hint.
* gtk/gtkcombo.c (gtk_combo_popup_list): Make the popup window
transient for the toplevel.
* gtk/gtkcombobox.c (gtk_combo_box_set_popup_widget): Set
transient-for, for the popup window.
* gdk/x11/gdkwindow-x11.c (gdk_window_get_type_hint): Support for
new window types.
* gdk/x11/gdkwindow-x11.c (gdk_window_set_type_hint): Add support
for new window types.
* gdk/x11/gdkscreen-x11.c (_gdk_x11_screen_process_owner_change):
New function called whenever the compositing manager comes and goes.
* gdk/x11/gdkscreen-x11.c (gdk_screen_is_composited): New function.
* gdk/x11/gdkscreen-x11.c
(_gdk_x11_screen_request_cm_notification, make_cm_atom,
check_is_composited): New functions
* gdk/x11/gdkevents-x11.c (gdk_event_translate): Call
_gdk_x11_screen_process_owner_change when an
XFixesSelectionNotifyEvent is received.
* gdk/x11/gdkdisplay-x11.c (gdk_display_open): Call
_gdk_x11_screen_request_cm_notification() on all screens.
* gdk/quartz/gdkscreen-quartz.c (gdk_screen_is_composited): Dummy
implementation.
* gdk/gdkscreen.c (gdk_screen_class_init): New signal,
'composited-changed'.
* gdk/gdkwindow.h: Add new EWMH window types.
* gdk/win32/gdkscreen-win32.c (gdk_screen_is_composited)
2006-04-06 Tor Lillqvist <tml@novell.com>
Correct the appearance of non-square icons and cursors: pad them
to square so that Windows won't stretch them.
* gdk/win32/gdkcursor-win32.c (create_alpha_bitmap)
(create_color_bitmap): Always create square bitmaps, take only
side length as argument.
(pixbuf_to_hbitmaps_alpha_winxp, pixbuf_to_hbitmaps_normal):
Corresponding changes.
2006-03-29 Matthias Clasen <mclasen@redhat.com>
* gdk/gdk.symbols:
* gdk/gdkpixmap.h:
* gdk/win32/gdkpixmap-win32.c:
* gdk/x11/gdkpixmap-x11.c (gdk_pixmap_foreign_new_for_screen):
New function to allow wrapping a native pixmap without
a server roundtrip. (#334954, David Baron)
2006-03-11 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkdrawable-win32.c (draw_polygon): Use Polygon() for
outlined polygons, too. Same idea as in draw_rectangle(): Set pen
to NULL_PEN if drawing a filled polygon, set brush to HOLLOW_BRUSH
if drawing a polygon outline. (#332662)
(gdk_win32_draw_polygon): Corresponding simplification: no need to
add an extra final copy of the starting point.
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-09 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkevents-win32.c (gdk_event_translate)
<WM_MOUSELEAVE>: If we don't know where we went, and have
generated a leave event, set current_window to the root
window. This assures we will generate proper enter and leave
events for popup windows. (#325521)
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-02-08 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkevents-win32.c (gdk_pointer_grab)
(gdk_display_pointer_ungrab, gdk_keyboard_grab)
(gdk_display_keyboard_ungrab): Consistenly use assign_object()
when assigning GdkWindow pointers so that the ref counting doesn't
get off whack.
(handle_stuff_while_moving_or_resizing): Don't use deprecated API.
(gdk_event_translate) <WM_MOUSEMOVE>: When the pointer is grabbed
with owner_events FALSE, generate enter and leave events only for
the grab window. (#321054)
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)