Commit Graph

878 Commits

Author SHA1 Message Date
Tor Lillqvist
adf1bbe28a Generate correct grab broken event for WM_KILLFOCUS
WM_KILLFOCUS means that a keyboard grab (not a pointer grab), if any,
has been broken. I don't think this bug has matterd much as gtk
generates a grab-broken-event signal for both keybord and pointer
grabs being broken anyway.
2010-06-22 21:33:49 +03:00
Javier Jardón
3c8a54b2f7 Remove GdkWChar deprecated code 2010-06-20 00:22:26 +02:00
Javier Jardón
ca046f0cfb Remove deprecated gdk_text_* and gdk_string_* functions
Remove gdk_string_extents(), gdk_text_extents(),
gdk_text_extents_wc(), gdk_string_width(), gdk_text_width(),
gdk_text_width_wc(), gdk_string_measure(), gdk_text_measure(),
gdk_string_height(), gdk_text_height()
2010-06-20 00:22:26 +02:00
Javier Jardón
4cf4470fcd Remove deprecated GdkDrawable functions
Remove gdk_drawable_get_data(), gdk_drawable_set_data(),
gdk_drawable_ref(), gdk_drawable_unref(),
gdk_draw_string(), gdk_draw_text(), gdk_draw_text_wc()
2010-06-19 21:39:22 +02:00
Martin Schlemmer
213994b565 win32: Avoid type warning for offscreen windows in xp theme
See bug #598299
2010-06-14 20:57:22 +02:00
Martin Schlemmer
4696e94138 win32: Fix the xp there to correctly clip when drawing
This makes the xp theme work again, and also enables it.
2010-06-11 20:20:07 +02:00
Javier Jardón
71c501d895 Use a GPid on gdk_spawn_on_screen[_with_pipes] instead a gint
Reported by Nick Schermer in bug
https://bugzilla.gnome.org/show_bug.cgi?id=602289
2010-06-10 03:52:35 +02:00
Tor Lillqvist
f772f3a1bb Use correct libgdkincludedir in gdk/win32 too
Thanks to Hib Eris.
2010-06-09 12:34:01 +03:00
Javier Jardón
2ace397eb5 Remove deprecatedd code from GdkColor
https://bugzilla.gnome.org/show_bug.cgi?id=619649
2010-06-07 00:35:40 +02:00
Colin Walters
95bc0f5405 Use g_source_set_name for all custom GSources in GTK+
Naming the sources allows easier debugging with e.g. SystemTap
probes.

https://bugzilla.gnome.org/show_bug.cgi?id=620511
2010-06-03 21:49:22 -04:00
Javier Jardón
019563c322 Remove gdk_*et_use_xshm() deprecated functions 2010-05-26 05:18:05 +02:00
Matthias Clasen
bd4609b140 Merge the xi2-for-master branch 2010-05-25 18:38:44 -04:00
Matthias Clasen
50a72eda2d Seal gdk
Add G_SEAL annotation for struct members, and add accessors for
the (useful) fields. Patch based on work by Garrett Regier,
see bug #592580.
2010-05-25 12:01:04 -04:00
Javier Jardón
2b64a7fd54 Remove some deprecated stuff from GdkWindow
Also, substitute the deprecated functions with the correct ones
2010-05-12 04:29:55 +02:00
Tor Lillqvist
a709056140 Don't use g_drag_context_ref 2010-05-10 19:18:29 +03:00
Javier Jardón
8424256a39 [gdk] Remove gdki18n.h completely 2010-05-03 01:51:21 +02:00
Javier Jardón
906a510007 Remove deprecated code from GdkImage 2010-05-03 01:48:45 +02:00
Javier Jardón
7894951cee Remove deprecated code from GdkEvent 2010-05-03 01:48:45 +02:00
Javier Jardón
8c46ef830b Remove deprecated code from GdkDnd 2010-05-03 01:45:00 +02:00
Matthias Clasen
13d69e552d Fix a compatibility problem
It turns out that my attempt at handling Super, Hyper and Meta better
is causing problems, mostly because Alt and Meta are commonly colocated
in the modmap, and apps do a check for the Alt modifier regularly.

See e.g bug 607697.
2010-02-12 18:55:42 -05:00
Tor Lillqvist
8daf770a73 Add gdk_keymap_map_virtual_modifiers() implementation 2009-12-21 22:43:44 +02:00
Tor Lillqvist
435606a5bf Make the OLE2 DND code selectable at run-time instead of compile-time
(It still doesn't work, though.)
2009-12-17 01:51:51 +02:00
Tor Lillqvist
6e73be9d6c Add copyright note and comment for merged old code 2009-12-16 13:47:57 +02:00
Tor Lillqvist
eb21a7df29 Work on OLE2-based generic DND
Intermediate commit of work in progress on integrating the old code
for OLE2-based generic drag and drop from Arhaeopteryx Software, from
a long time ago in the GTK+ 1.3 timeframe. Does still not work and is
as before not compiled in unless OLE2_DND is defined in
gdkdnd-win32.c. (Thus, for inter-process DND, still only WM_DROPFILES
style dropping of files on GTK+ apps works.)

Related slight refactoring of other code that shouldn't change how it
works. Add more global variables for run-time constants (once
initialized) representing well-known GdkAtoms and registered Windows
clipboard formats, as they with the generic DND code will be needed in
several source files. Some improved debugging output.
2009-12-16 13:10:21 +02:00
Tor Lillqvist
c196ac2b63 Make more GdkAtom variables visible in all gdk/win32 files
Make the GdkAtoms for the image formats extern and usable from all
gdk/win32 files.
2009-12-16 13:10:20 +02:00
Tor Lillqvist
c1ddd8f9bc Make the gdk/win32 event debug printing function non-static
Make print_event() extern and rename it to _gdk_win32_print_event() so
it can be used from all gdk/win32 source files.
2009-12-16 13:10:19 +02:00
Tor Lillqvist
1bf9a2fa41 Remove unused functions and variables 2009-12-16 13:10:18 +02:00
Matthias Clasen
182108c68e Implement gdk_screen_get_primary_monitor in all GDK backends
The implementations are all trivial, just returning 0. At least
for Quartz, we could probably do better than that. Bug 604459.
2009-12-13 20:40:02 -05:00
Tor Lillqvist
7fda8e6378 Awful hack for problem in dnd of images from Firefox on Windows
Bypassed with #if 0 because it is an awful hack and not really
acceptable from a privacy point of view for instance. It prevents
Firefox from deleting temporary files containing images being dragged,
so they stay on disk. Bug #561973.
2009-11-15 00:37:17 +02:00
Nicola Fontana
1e1131c959 Do not use static GTypeInfo and GInterfaceInfo
Either g_type_register_static_simple (used by G_DEFINE_TYPE_EXTENDED)
and G_IMPLEMENT_INTERFACE use automatic variables for GTypeInfo and
GInterfaceInfo structs, while tutorials and source code often use
static variables. This commit consistently adopts the former method.

https://bugzilla.gnome.org/show_bug.cgi?id=600158
2009-11-06 01:21:09 +01:00
Tor Lillqvist
861c34b01e Use correct type text/uri-list for the dropped files selection
Fixes bug #599321.
2009-10-23 13:40:27 +03:00
Javier Jardon
98ea183c13 Use G_STRLOC instead __FILE__ and __LINE__
Patch from bug #599225
2009-10-21 21:48:00 +03:00
Tor Lillqvist
ab13c00a38 Use correct size for root window with multiple monitors
The root window width and height have already been correctly
initialised in _gdk_root_window_size_init() to cover all monitors, so
don't incorrectly re-initialise using GetSystemMetrics(SM_C[XY]SCREEN)
which only gives the size of the primary monitor anyway. (See MSDN.)

This fixes at least gdk_screen_get_{width,height}() which indirectly
affects at least the positioning of combo box pop-up menus on multiple
monitors.
2009-10-18 14:35:17 +03:00
Tor Lillqvist
0698ddd421 Delete a couple of leftover commented-out lines 2009-10-18 14:19:55 +03:00
Tor Lillqvist
77590e9af7 Add missing newline to debugging output 2009-10-18 14:19:24 +03:00
Tor Lillqvist
be5c06d799 Delete unused leftover static function 2009-10-18 12:08:18 +03:00
Tor Lillqvist
f545bd270d More meaningful debugging output in gdk_win32_window_get_root_coords 2009-10-18 12:06:29 +03:00
Tor Lillqvist
d8de422794 Remove unused variables and static functions 2009-10-18 11:51:57 +03:00
Tor Lillqvist
b92f882ec4 Correct function names in debugging output 2009-10-18 11:45:03 +03:00
Alexander Larsson
5ebb32d1ff Extend _gdk_windowing_window_at_pointer to be able to get toplevels only
This has two advantages:
1) In many backends, this is faster as we can terminate the window
hierarchy traversal earlier
2) When used in gdkdisplay.c::get_current_toplevel() to get the
current toplevel that has the pointer we now correctly return
a toplevel with the pointer in it where the pointer is inside
some foreign subwindow of a toplevel window.

The second advantage fixes some bugs in client side event generation
when the pointer is inside such a foreign child window.
2009-09-28 15:21:54 +02:00
Alexander Larsson
d67a7eda16 Add gdk_window_restack
This lets you restack a window above or below a specified sibling.
At least eclipse wants this functionallity.
2009-09-02 23:38:55 +02:00
Alexander Larsson
cc5b22cc81 Don't update window->shaped from backends
This is properly updated from the main code these days and
should not be touched by the backend code.
2009-08-31 15:06:01 +02:00
Shixin Zeng
277d840616 Deprecate also GdkFontPrivateWin32 2009-08-20 23:57:41 +03:00
Shixin Zeng
bbe16ec60f Use g_object_ref/unref instead of deprecated specializations 2009-08-20 23:55:51 +03:00
Tor Lillqvist
341b8a4752 Initialize missing methods on Windows
Set the input_window_destroy and input_window_crossing methods of the
GdkWindowImplIface on Windows. Add implementation of
_gdk_input_crossing_event that is mostly dummy, though.
2009-08-13 22:49:35 +03:00
Alexander Larsson
939e55223c Ensure that queue_translation is paired with the right X operation
The X11 queue_translation operation uses NextRequest to get the serial
of the XCopyArea operation where the translation should end. However,
if the gc passed to gdk_draw_drawable has a non-flushed clip region
(which it commonly has now for the window clipping) then the next
operation will be the GC flush, not the XCopyArea.

To handle this right we now pass in the GC to be used to
queue_translation and ensure that it is flushed before calling
NextRequest().
2009-08-13 14:46:02 +02:00
Hans Breuer
a7394dc887 Implement GdkDrawableImplWin32::draw_pixbuf 2009-07-26 19:14:08 +02:00
Hans Breuer
45344cdf7c Use G_DEFINE_TYPE (GdkDrawableImplWin32, ...) 2009-07-26 19:14:07 +02:00
Hans Breuer
c5c87a918f Some cursor work for csw(win32), more left to do 2009-07-26 19:14:06 +02:00
Hans Breuer
4d2c165b75 Formatting and removing commented/obsolete code 2009-07-26 19:14:04 +02:00
Alexander Larsson
aa8693f2cb Track viewable for GdkWindow 2009-07-18 23:11:54 +02:00
Hans Breuer
f3668e96e7 Bug #588398 - Leak with testgtk::preview_(color|gray) and more
Revert to gdk_win32_ref_cairo_surface() implementation from gtk-2-16
and make _gdk_windowing_create_cairo_surface() simply delegate to it.
2009-07-18 13:13:13 +02:00
Hans Breuer
d0cf137ed9 More efficient version of _gdk_win32_window_queue_translation()
Don't create create an extraneous expose event for any scroll operation
that gtk+ does. Thanks to Alex for the hint.
2009-07-17 17:26:48 +02:00
Hans Breuer
e7737dbd19 Implement _gdk_win32_window_destroy() and more cleanup
Implement _gdk_win32_window_destroy() by just renaming
_gdk_windowing_window_destroy(), removed superfuous stub.

Also cleaned up implementations of  gdk_win32_window_set_background()
and gdk_win32_window_set_back_pixmap() - removed stuff now done at the
respective gdk_window_*() function.
2009-07-13 09:45:07 +02:00
Hans Breuer
e96c161643 Implement _gdk_win32_window_queue_translation() 2009-07-13 09:45:06 +02:00
Hans Breuer
b72960f12d Bug #588388 - shape rendering is back
Just mapping exisiting implementations to new GdkWindow API.

http://bugzilla.gnome.org/show_bug.cgi?id=588388
2009-07-13 09:45:05 +02:00
Hans Breuer
c99b4e775b Bug #588379 - testgtk::panes does not change the cursor on mouse over
That one was easy, just removing Alex's #ifdef TODO_CSW ;)

http://bugzilla.gnome.org/show_bug.cgi?id=588379
2009-07-13 09:45:03 +02:00
Hans Breuer
e2000ac366 Bug #588373 - Menus broken by client-side-windows
Resurrcetion and adaption of find_window_for_mouse_event(). The window
receiving the WM_MOUSEMOVE, WM_?BUTTONDOWN is not necessarily the one
interested in GDK_(ENTER|MOTION|LEAVE)_NOTIFY

http://bugzilla.gnome.org/show_bug.cgi?id=588373

Also added some more more TODO_CSW and disabled print_event(): it can not
cope with the new _gdk_windowing_got_event() eating/morphing events.
2009-07-13 09:45:02 +02:00
Hans Breuer
b97ccecd5d Update msvc build 2009-07-13 09:45:00 +02:00
Hans Breuer
7e116727d7 Fix condition to deliver root coords 2009-07-04 12:19:12 +02:00
Hans Breuer
23b1b350b0 Enable window creation with GDK_WINDOW_CHILD again 2009-07-04 12:19:11 +02:00
Hans Breuer
1bc0954495 Initialize 'private' before use 2009-07-04 12:19:10 +02:00
Hans Breuer
bbd62f4ad8 Conditionally define WS_EX_COMPOSITED 2009-07-04 12:19:04 +02:00
Alexander Larsson
2e3866b5b2 Make GdkDrawable draw_drawable backwards compat
Turns out pygtk build broke due to the argument addition to draw_drawable.
So, we now add a new vfunc for the new draw_drawable and are thus
backwards compat.
2009-07-01 19:50:49 +02:00
Alexander Larsson
038398d493 Move new draw_drawable argument to end to make it more backwards compat 2009-07-01 16:13:31 +02:00
Alexander Larsson
681c3c288b Remove debug spew, add TODO_CSW 2009-07-01 13:33:45 +02:00
Alexander Larsson
199582aed3 gdk_win32_blit, don't get the size of the impl 2009-07-01 13:33:06 +02:00
Alexander Larsson
b1df568239 Some win32 cleanups 2009-07-01 12:06:57 +02:00
Alexander Larsson
593d5441d4 Fix win32 GC set_region handling of reset_region 2009-07-01 12:06:04 +02:00
Alexander Larsson
5341efd4d4 Make win32 backend build and minimally work 2009-07-01 10:28:06 +02:00
Alexander Larsson
0b586a5ad7 Add support for client side graphics exposures in gdk_draw_drawable 2009-05-27 17:10:32 +02:00
Alexander Larsson
7698daf97a Merge branch 'master' into client-side-windows
Conflicts:
	gdk/x11/gdkwindow-x11.c
2009-05-25 14:30:01 +02:00
Behdad Esfahbod
a398c840be Add git.mk to generate .gitignore files
Add four new doc templates that were not in repository.
2009-05-04 14:29:21 -04:00
Tor Lillqvist
c338228a86 Bug 578094 - ProcessIdToSessionId needs to be declared as WINAPI
Patch by  Shixin Zeng.
2009-04-06 15:10:35 +03:00
Cody Russell
1288ef1707 Grab changes 2009-04-02 10:16:30 +02:00
Cody Russell
f4331caf83 grabs 2009-04-02 10:16:30 +02:00
Cody Russell
49a0ec6e95 Updates 2009-04-02 10:16:30 +02:00
Cody Russell
08961c4def Get width/height from GetSystemMetrics() 2009-04-02 10:16:30 +02:00
Cody Russell
3fdd1333b2 Misc stuff 2009-04-02 10:16:29 +02:00
Cody Russell
a93c6cd6e1 CSW Win32 work in progress - builds but does not work yet. 2009-04-02 10:16:29 +02:00
Tor Lillqvist
c3879d400c Bug 575700 - Crash when moving a GtkWindow
2009-03-17  Tor Lillqvist  <tml@novell.com>

	Bug 575700 - Crash when moving a GtkWindow

	* gdk/win32/gdkevents-win32.c (gdk_event_translate): Fix
	embarrassing crasher bug introduced on 2009-03-11. A variable was
	assigned a value only inside a GDK_NOTE but still used outside
	that.


svn path=/trunk/; revision=22568
2009-03-17 18:26:28 +00:00
Tor Lillqvist
e029e0014d Bug 573067 - Intra-app dnd of text behavior on Windows is wrong
2009-03-11  Tor Lillqvist  <tml@iki.fi>

	Bug 573067 - Intra-app dnd of text behavior on Windows is wrong

	* gdk/win32/gdkdnd-win32.c (local_send_motion) (gdk_drag_motion):
	The default action should be move, not copy. Tweak how the
	GdkDragAction fields in GdkDragContexts are changed. Seems to help
	the problem.

	Add more debugging printout for --gdk-debug=dnd to many functions.

	* gdk/win32/gdkmain-win32.c
	* gdk/win32/gdkprivate-win32.h: (_gdk_win32_drag_protocol_to_string)
	(_gdk_win32_drag_action_to_string): New functions for use in
	debugging printouts.


svn path=/trunk/; revision=22522
2009-03-11 14:09:13 +00:00
Tor Lillqvist
e51f525a76 Use G_DEFINE_TYPE. Some debugging printout changes. Hacking on the
2009-03-11  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkdnd-win32.c: Use G_DEFINE_TYPE. Some debugging
	printout changes. Hacking on the OLE2_DND code, which still
	doesn't work, though, and is not normally compiled.


svn path=/trunk/; revision=22517
2009-03-11 13:37:26 +00:00
Tor Lillqvist
93bb740db3 Bug 570896 - gdkevents-win32.c(2947) : error C4053: one void operand for
2009-03-11  Tor Lillqvist  <tml@iki.fi>

	Bug 570896 - gdkevents-win32.c(2947) : error C4053: one void
	operand for '?:'

	* gdk/win32/gdkevents-win32.c (gdk_event_translate): Fix
	compilation error with MSVC. While at it add clarifying comments
	and fix a typo in the debugging output.


svn path=/trunk/; revision=22515
2009-03-11 12:50:51 +00:00
Tor Lillqvist
703a18c25f Bug 574794 - Can not resize shaped windows on Windows
2009-03-11  Tor Lillqvist  <tml@iki.fi>

	Bug 574794 - Can not resize shaped windows on Windows

	* gdk/win32/gdkevents-win32.c (gdk_event_translate): On handling
	WM_WINDOWPOSCHANGED, don't do anything if the position and size
	hasn't changed. I am not exactly sure I understand why this helps
	this particular bug.


svn path=/trunk/; revision=22511
2009-03-11 12:04:22 +00:00
Tor Lillqvist
b62e3113e6 Bug 571873 - Compile error with gdk/win32/gdkselection-win32.c
2009-02-16  Tor Lillqvist  <tml@novell.com>

	Bug 571873 - Compile error with gdk/win32/gdkselection-win32.c

	* gdk/win32/gdkselection-win32.c (gdk_selection_convert): Cast
	gpointer to char * before pointer arithmetic to avoid compilation
	error with MSVC.

	(_gdk_selection_property_delete): Remove unused variable.


svn path=/trunk/; revision=22337
2009-02-15 22:51:56 +00:00
Cody Russell
f1ed4f7347 Add potentially missing #defines for XBUTTON1, etc. Fixes the build that
2009-02-09  Cody Russell  <bratsche@gnome.org>

        * gdk/win32/gdkwin32.h:	Add potentially	missing	#defines for
        XBUTTON1, etc.  Fixes the build that was broken in r21746.


svn path=/trunk/; revision=22297
2009-02-09 13:16:14 +00:00
Tor Lillqvist
3f4c73d0d5 Bug 559408 - Transparency lost when images are copied between GTK+ and the
2009-01-29  Tor Lillqvist  <tml@novell.com>

	Bug 559408 - Transparency lost when images are copied between GTK+
	and the clipboard on Windows

	The code in gdkselection-win32.c is simplified quite a lot. When
	an image is stored on the clipboard from GTK+, only the "PNG" and
	CF_DIB formats are advertised. PNG is our preferred format because
	it can losslessly represent any image that gdk-pixbuf can handle,
	even with alpha, unambiguously. CF_DIB is also advertised because
	of its ubiquitous support in Windows software.

	Delayed rendering is used as before, so for other data than text
	nothing is actually stored on the clipboard until some app asks
	for it.

	It's pointless to advertise images formats like "image/png" or
	"image/x-MS-bmp" that no other Windows application is going to
	look for anyway. Likewise it's pointless to store text under
	formats like "text/plain" or "UTF8_STRING". Just store
	CF_UNICODETEXT. CF_TEXT will be available as a synthesized format
	anyways.

	Office 2007 offers and asks for images in PNG format using the
	registered clipboard format name "PNG", so we do likewise. If the
	"PNG" format is available that is preferred when copying to GTK+
	from the clipboard.

	Unfortunately Word 2007 still uses CF_DIB without handling
	alpha. But PowerPoint 2007 uses PNG if available and handles alpha
	correctly. Both Word and Powerpoint offer PNG with alpha nicely.

	Firefox and IE7 offer images that contain alpha as 32-bit version
	3 BI_RGB DIBs with the undocumented "extra" bytes actually being
	alpha. Also, alpha is premultiplied into the RGB bytes, presumably
	because that is how AlphaBlend() wants such DIBs. That is also
	taken care of. At least for Firefox it easy to be sure that a
	CF_DIB on the clipboard is from Firefox.

	Also some general stylistic cleanup, comment improvements, and
	improvements of debugging printout especially in the clipboard
	handling. Those are not detailled below.

	* gdk/win32/gdkprivate-win32.h
	* gdk/win32/gdkglobals-win32.c
	* gdk/win32/gdkgmain-win32.c: Move some globals that were used
	only in gdkselection-win32.c to be local to that file.

	* gdk/win32/gdkproperty-win32.c (gdk_property_change): Don't
	bother checking if text to be placed on the clipboard consists of
	only ASCII.

	* gdk/win32/gdkselection-win32.c: Add static variables for a list
	of GdkPixbuf-supported formats, well-known registered clipboard
	formats for images, and for GdkAtoms for well-known image and text
	formats.

	(_gdk_win32_selection_init): Initialize above static variables.

	(selection_property_store) (gdk_selection_property_get)
	(_gdk_selection_property_delete): Don't use a FIFO of GdkSelProps
	for a window after all, it breaks testtext. See bug #163844.

	(gdk_selection_convert): When converting to the TARGETS format,
	i.e. when the caller wants to know what clipboard formats are
	available, if PNG is available we report just that and skip
	CF_DIB, JPEG and GIF even if advertised.

	If CF_UNICODETEXT is available, report only UTF8_STRING.

	When converting to the UTF8_STRING format, i.e. when the caller
	wants text from the clipboard, try just CF_UNICODETEXT. There is
	no point in trying CF_TEXT as Windows will synthesize
	CF_UNICODETEXT from CF_TEXT anyway, if some app has stored just
	CF_TEXT.

	When converting to the image/bmp format, i.e. when the caller
	wants an CF_DIB image from the clipboard, we check if the DIB is a
	version 3 32-bit BI_RGB one that is likely to actually contain
	alpha in the "extra" bytes. Such a DIB is likely to have
	premultiplied alpha even, at least in the case of Firefox 3 and
	IE7. We then edit the DIB in-place into a version 5 one in
	BI_BITFIELDS format and undo the alpha premultiplication.

	In any case, prepend a BMP file header before letting go of the
	data which will be fed to the gdk-pixbuf bmp loader by upper
	levels.

	(gdk_win32_selection_add_targets): If some kind of pixmap image
	format is being added, actually advertise just PNG and
	CF_DIB. Note that alpha won't be stored on the clipboard through
	CF_DIB. This is because gdk-pixbuf's bmp loader doesn't save
	alpha. Furthermore, few if any non-GTK+ Windows apps seem to
	understand a version 5 DIB with proper alpha anyway.

	(_gdk_win32_selection_convert_to_dib): Simplified muchly.



svn path=/trunk/; revision=22255
2009-01-30 01:16:47 +00:00
Tor Lillqvist
1948867311 Rename static local functions and variables to not have any unnecessary _
2009-01-21  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkcursor-win32.c: Rename static local functions and
	variables to not have any unnecessary _ or _gdk_win32 prefix.

	* gdk/win32/gdkcursor-win32.c (hcursor_from_type): Implement
	creating a GDK_BLANK_CURSOR.


svn path=/trunk/; revision=22165
2009-01-21 20:51:22 +00:00
Tor Lillqvist
bb56a0a119 Bug 523554 - Copy from GIMP to Word broken
2009-01-11  Tor Lillqvist  <tml@iki.fi>

	Bug 523554 - Copy from GIMP to Word broken

	* gdk/win32/gdkselection-win32.c
	(_gdk_win32_selection_convert_to_dib): The DIB stored in the
	Windows Clipboard was for some unknown reason truncated by one
	byte. Don't do that.


svn path=/trunk/; revision=22086
2009-01-11 13:23:46 +00:00
Tor Lillqvist
7ddb955766 Bug 566628 - gdk_display_close always asserts on win32
2009-01-05  Tor Lillqvist  <tml@novell.com>

	Bug 566628 - gdk_display_close always asserts on win32

	* gdk/win32/gdkdisplay-win32.c
	(_gdk_windowing_set_default_display): Allow also a NULL parameter
	in the g_assert(). Still don't actually do anything in this
	function, though.


svn path=/trunk/; revision=22068
2009-01-05 15:31:14 +00:00
Tor Lillqvist
74aeac9e66 Bug 557212 - Problem with which window gains focus and is visible
2008-11-04  Tor Lillqvist  <tml@novell.com>

	Bug 557212 - Problem with which window gains focus and is visible

	* gdk/win32/gdkevents-win32.c (ensure_stacking_on_activate_app):
	Only do the restacking for the active window of the
	application. Seems to fix the problem.

	(gdk_event_translate): Only call ensure_stacking_on_activate_app()
	when the application is being activated, not deactivated.


svn path=/trunk/; revision=21756
2008-11-03 22:38:29 +00:00
Tor Lillqvist
c2129d07ca Bug 558278 - Crash when calling a callback set by
2008-11-01  Tor Lillqvist  <tml@novell.com>

	Bug 558278 - Crash when calling a callback set by
	gdk_add_client_message_filter()

	* gdk/win32/gdkevents-win32.c (apply_event_filters): Rename from
	apply_filters() so that it is clear that this function is for
	GdkEventFilters only.

	(print_event): Print more information for GDK_CLIENT_EVENT events.

	(gdk_event_translate): When handling client filters, don't use
	apply_event_filters(). Use similar code as in the X11 backend,
	although not exactly, as the parameter list and return value
	semantics of gdk_event_translate() is different.


svn path=/trunk/; revision=21748
2008-11-01 11:55:16 +00:00
Tor Lillqvist
c103cbec8a Bug 557266 - Window Management Problem
2008-10-21  Tor Lillqvist  <tml@novell.com>

	Bug 557266 - Window Management Problem

	Also reported in mail to gtk-list, and of course it has been well
	known in general that window state management is messy and buggy
	in various ways in gdk/win32.

	* gdk/win32/gdkwindow-win32.c (show_window_internal): Correct
	handling of GDK_WINDOW_STATE_ABOVE windows. It doesn't work to set
	the WS_EX_TOPMOST extended style bit using SetWindowLong(). We
	must call SetWindowPos() on the window using HWND_TOPMOST
	instead. The description for WS_EX_TOPMOST in the documentation
	for CreateWindowEx() even implies that if you read it carefully.


svn path=/trunk/; revision=21694
2008-10-21 20:31:05 +00:00
Tor Lillqvist
a7dd74740a On WM_WINDOWPOSCHANGING, don't dereference windowpos in the debugging
2008-10-18  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkevents-win32.c (gdk_event_translate): On
	WM_WINDOWPOSCHANGING, don't dereference windowpos in the debugging
	output without setting it first.

2008-10-18  Tor Lillqvist  <tml@novell.com>

	Bug 556578 - GIMP windows stay on top of other windows

	* gdk/win32/gdkevents-win32.c (ensure_stacking_on_unminimize)
	(ensure_stacking_on_window_pos_changing)
	(ensure_stacking_on_activate_app): Ignore unmapped windows in the
	loops where we look for the lowest "transient-type" window.

	(gdk_event_translate): Don't call
	ensure_stacking_on_window_pos_changing() or
	ensure_stacking_on_activate_app() for unmapped windows.


svn path=/trunk/; revision=21676
2008-10-17 22:56:33 +00:00
Tor Lillqvist
55d7d50e13 Bug 132501 - Make utility window translate to tool window in win32
2008-10-04  Tor Lillqvist  <tml@novell.com>

	Bug 132501 - Make utility window translate to tool window in win32

	Implement the utility window type hint. Such windows are kept on
	top of other windows. Makes GIMP's toolbox and dock windows behave
	more like in GNOME under metacity. Apply the same logic also to
	windows marked with the dialog window type hint, and windows that
	are transient for some other window. I'll call such windows
	"transient-type" below.

	* gdk/win32/gdkevents-win32.c (doesnt_want_key): Drop unused
	variables.

	(ensure_stacking_on_unminimize)
	(ensure_stacking_on_window_pos_changing)
	(ensure_stacking_on_activate_app): New functions to implement the
	desired stacking order. Make sure that a window that is not
	transient-type stays below any transient-type windows of the
	application. When activating a non-transient-type window make sure
	it rises as high as possible.

	(gdk_event_translate): Call above functions on
	WM_WINDOWPOSCHANGING, WM_ACTIVATEAPP and on WM_SIZE when
	unminimizing. Improve debugging printout.

	* gdk/win32/gdkwindow-win32.c (get_effective_window_decorations):
	Handle utility windows like toolbar windows.

	(gdk_window_new_internal) (update_style_bits): Give utility
	windows the WS_EX_TOOLWINDOW extended style.

	(gdk_window_set_title): If debugging "misc" or "events", make the
	handle of top-level windows show up in their title bars. Very
	useful when looking at debugging output.

	(gdk_window_set_keep_above) (gdk_window_set_keep_below)
	(gdk_window_set_modal_hint) (gdk_window_set_skip_taskbar_hint)
	(gdk_window_set_skip_pager_hint): Add and improve debugging
	printout.

	(gdk_window_set_type_hint): Print hint symbolically in GDK_NOTE().

2008-10-04  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkmain-win32.c (_gdk_win32_window_exstyle_to_string)
	(_gdk_win32_window_pos_bits_to_string): New debugging printout
	functions. Decode the WS_EX_* and SWP_* bits.

	* gdk/win32/gdkprivate-win32.h: Declare them. Define
	GDK_DEBUG_MISC_OR_EVENTS for use in GDK_NOTE() to match either
	"misc" or "events".


svn path=/trunk/; revision=21587
2008-10-05 00:00:10 +00:00
Tor Lillqvist
139965125b Implement trivially on Windows. Not sure if something more complex is
2008-10-01  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkkeys-win32.c (gdk_keymap_get_caps_lock_state):
	Implement trivially on Windows. Not sure if something more complex
	is actually needed, more specifically whether the function needs
	to differentiate between "Caps Lock" and "Shift Lock" semantics?


svn path=/trunk/; revision=21558
2008-10-01 11:02:22 +00:00
Cody Russell
7e8ebe06f7 Bug 553917 – Typo in gdkwindow-win32.c
2008-09-26  Cody Russell  <bratsche@gnome.org>

        Bug 553917 – Typo in gdkwindow-win32.c

        * gdk/win32/gdkwindow-win32.c: Fixed a typo in 
        update_system_menu().  Changed GDK_DECOR_ALL to GDK_FUNC_ALL.

        Reported by Richard Hult


svn path=/trunk/; revision=21522
2008-09-26 16:47:58 +00:00
Cody Russell
1c146ec11f Check if the window's state has GDK_WINDOW_STATE_MAXIMIZED set before
2008-08-27  Cody Russell  <bratsche@gnome.org>

        * gdk/win32/gdkevents-win32.c:
        * gdk/win32/gdkwindow-win32.c (show_window_recurse): Check if
        the window's state has GDK_WINDOW_STATE_MAXIMIZED set before
        calling ShowWindow (), and show using SW_SHOWMAXIMIZED or     
        SW_RESTORE accordingly.  This fixes an issue where maximized 
        windows that are iconified do not restore back to maximized 
        when you click the taskbar. (#528975)


svn path=/trunk/; revision=21218
2008-08-28 02:42:23 +00:00
Matthias Clasen
8f59f3adbb Return FALSE from reparent implementations to avoid #548993. Patch by Ed
2008-08-27  Matthias Clasen  <mclasen@redhat.com>

        * gdk/x11/gdkwindow-x11.c:
        * gdk/win32/gdkwindow-win32.c: Return FALSE from reparent
        implementations to avoid #548993. Patch by Ed Catmur.


svn path=/trunk/; revision=21215
2008-08-28 00:32:17 +00:00
Cody Russell
96aa256594 Remove the checks to see if the window is modally blocked. This doesn't
2008-08-21  Cody Russell  <bratsche@gnome.org>

        * gdk/win32/gdkevents-win32.c (doesnt_want_key): Remove the checks
        to see if the window is modally blocked.  This doesn't get us anything,
        and it confuses the search window in GtkTreeView (and potentially other
        utility windows in other apps).  (#520165)


svn path=/trunk/; revision=21180
2008-08-22 00:30:06 +00:00
Tor Lillqvist
d6ab77ea70 Bug 544684 - Win64 issue, window handles are assumed to be 32-bit
2008-08-05  Tor Lillqvist  <tml@novell.com>

	Bug 544684 - Win64 issue, window handles are assumed to be 32-bit

	* gdk/win32/gdkcursor-win32.c
	* gdk/win32/xcursors.h: Change some gchar* to guchar* and vice
	versa to avoid gcc 4.4 signedness warnings.

	* gdk/win32/gdkevents-win32.c: Add some guchar and char pointer
	casts to get rid of gcc 4.4 signedness warnings. Print GdkAtom
	values in debugging output using the %p format.
	
	* gdk/win32/gdkkeys-win32.c
	* gdk/win32/gdkfont-win32.c
	* gdk/win32/gdkmain-win32.c: Add some casts to avoid gcc warnings.
 
	* gdk/win32/gdkwindow-win32.c: Use SetWindowLongPtr() instead of
	SetWindowLong().

	* gdk/win32/gdkwin32id.c (gdk_handle_hash): Use all 64 bits of a
	HANDLE on Win64.


svn path=/trunk/; revision=20994
2008-08-04 23:21:36 +00:00
Tor Lillqvist
a860ec7d7b Bug 544684 - Win64 issue, window handles are assumed to be 32-bit
2008-08-05  Tor Lillqvist  <tml@novell.com>

	Bug 544684 - Win64 issue, window handles are assumed to be 32-bit

	* gdk/win32/gdkproperty-win32.c
	* gdk/win32/gdkselection-win32.c: Add some guchar and char pointer
	casts to get rid of gcc 4.4 warnings. Print GdkAtom values in
	debugging output using the %p format.


svn path=/trunk/; revision=20993
2008-08-04 23:01:32 +00:00
Tor Lillqvist
f4d9ce22f4 Bug 544684 - Win64 issue, window handles are assumed to be 32-bit
2008-08-05  Tor Lillqvist  <tml@novell.com>

	Bug 544684 - Win64 issue, window handles are assumed to be 32-bit

	* gdk/gdkselection.h
	* gdk/gdkselection.c
	* gdk/win32/gdkselection-win32.c
	* gdk/x11/gdkselection-x11.c: Change type of the requestor
	window id parameter of gdk_selection_send_notify_for_display()
	and gdk_selection_send_notify() from guint32 to
	GdkNativeWindow.

	* gdk/win32/gdkselection-win32.c: Add some guchar and char pointer
	casts to get rid of gcc 4.4 warnings. Print GdkAtom values in
	debugging output using the %p format.


svn path=/trunk/; revision=20991
2008-08-04 22:43:57 +00:00
Tor Lillqvist
b1e744b064 Bug 544684 - Win64 issue, window handles are assumed to be 32-bit
2008-08-05  Tor Lillqvist  <tml@novell.com>

	Bug 544684 - Win64 issue, window handles are assumed to be 32-bit

	* gdk/gdkdnd.h
	* gdk/gdkdnd.c
	* gdk/win32/gdkdnd-win32.c
	* gdk/x11/gdkdnd-x11.c: Change return value and type of window id
	from guint32 to GdkNativeWindow for
	gdk_drag_get_protocol_for_display() and
	gdk_drag_get_protocol(). This is not an API break on existing
	platforms, as GdkNativeWindow has been guint32 for them
	already.


svn path=/trunk/; revision=20988
2008-08-04 22:35:16 +00:00
Tor Lillqvist
34159c417b Don't bother looking up EnumDisplayMonitors and GetMonitorInfoA
2008-08-04  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkdisplay-win32.c: Don't bother looking up
	EnumDisplayMonitors and GetMonitorInfoA dynamically, they are
	present in NT-based Windows since Windows 2000.
	(enum_monitor): For some reason the MONITORINFOEX struct in
	mingw-win64 is different than the proper one as in MSDN and 32-bit
	mingw, so just copy the proper definition here.


svn path=/trunk/; revision=20953
2008-08-03 23:05:37 +00:00
Cody Russell
c8061385a9 Bug 544510 – SetTimer callback signatures has the wrong type
2008-07-24  Cody Russell  <bratsche@gnome.org>

        Bug 544510 – SetTimer callback signatures has the wrong type

        * gdk/win32/gdkevents-win32.c: Fix modal_timer_proc() and
        sync_timer_proc() to use UINT_PTR for the 'id' parameter
        instead of 'id'.  Patch by Richard Hult.


svn path=/trunk/; revision=20903
2008-07-24 12:55:53 +00:00
Cody Russell
c8fef535b2 Bug 153567 – Repaint glitches in widgets
2008-07-21  Cody Russell  <bratsche@gnome.org>

        Bug 153567 – Repaint glitches in widgets

        * gdk/win32/gdkevents-win32.c: Set a sync timer when
        we receive WM_SYNCPAINT, and RedrawWindow() once
        the timer expires.


svn path=/trunk/; revision=20881
2008-07-21 12:46:41 +00:00
Cody Russell
6301e71979 Bug 541964 – [Win32] Setting modal hint to current value might confuse
2008-07-07  Cody Russell  <bratsche@gnome.org>

        Bug 541964 – [Win32] Setting modal hint to current value might confuse the stack

        * gdk/win32/gdkwindow-win32.c: Check if	the value is the same as the
        existing modal hint value before setting it.


svn path=/trunk/; revision=20809
2008-07-07 22:26:35 +00:00
Tor Lillqvist
d698b1f6fd Need to initialise private->impl here, too.
2008-07-07  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkwindow-win32.c
	(gdk_window_foreign_new_for_display): Need to initialise
	private->impl here, too.


svn path=/trunk/; revision=20805
2008-07-07 09:28:40 +00:00
Tor Lillqvist
688cc55cdd Bug 540861 - invalid UTF-8 in input device name
2008-07-04  Tor Lillqvist  <tml@novell.com>

	Bug 540861 - invalid UTF-8 in input device name

	* gdk/win32/gdkinput-win32.c: Fetch the device and cursor names in
	Unicode, and convert to UTF-8 for the GdkDevice's name field.


svn path=/trunk/; revision=20750
2008-07-03 22:11:38 +00:00
Cody Russell
e7b024c6b7 Bug 541305 – [Win32] Scrolling was broken after GdkWindow refactoring
2008-07-02  Cody Russell  <bratsche@gnome.org>

        Bug 541305 – [Win32] Scrolling was broken after GdkWindow refactoring

        * gdk/win32/gdkwindow-win32.c:	Reverted	some logic so that scrolling
	works again.

        * gdk/win32/gdkgeometry-win32.c: Removed some more unnecessary	checks.
        * gdk/win32/gdkkeys-win32.c: Removed unused variable to fix compile-time
        warnings.


svn path=/trunk/; revision=20737
2008-07-02 20:22:30 +00:00
Cody Russell
2bb97a7a90 Bug 541249 – [Win32] Fix some internal static methods
2008-07-02  Cody Russell  <bratsche@gnome.org>

        Bug 541249 – [Win32] Fix some internal static methods

        * gdk/gdkwindow-win32.c: Make the interface implementation methods
        static.


svn path=/trunk/; revision=20734
2008-07-02 13:58:28 +00:00
Cody Russell
e625b41a1d Bug 541162 – [Win32] Update for the new GdkWindowImpl stuff
2008-07-02  Cody Russell  <bratsche@gnome.org>

        Bug 541162 – [Win32] Update for the new GdkWindowImpl stuff

        * gdk/win32/gdkprivate-win32.h:
        * gdk/win32/gdkgeometry-win32.c:
        * gdk/win32/gdkevents-win32.c:
        * gdk/win32/gdkwindow-win32.c: Update Win32 backend according to
        the newly refactored GdkWindow code.


svn path=/trunk/; revision=20729
2008-07-02 06:06:29 +00:00
Cody Russell
0d0f9a7fc1 Bug 539164 – Windows' System Menu blocks main loop
2008-07-01  Cody Russell  <bratsche@gnome.org>

        Bug 539164 – Windows' System Menu blocks main loop

        * gdk/win32/gdkevents-win32.c:	Use a modal timer proc in between
	receiving WM_ENTERMENULOOP and	WM_EXITMENULOOP	and pump	the
	GLib mainloop from there.


svn path=/trunk/; revision=20726
2008-07-01 23:13:26 +00:00
Johan Dahlin
d97cdbdf53 Include "config.h" instead of <config.h> Command used: find -name
2008-06-21  Johan Dahlin  <jdahlin@async.com.br>

    * *.[ch]: Include "config.h" instead of <config.h>
    Command used:
    find -name \*.[ch]|xargs perl -p -i -e 's/^#include <config.h>/#include "config.h"/g'
    Rubberstamped by Mitch and Tim


svn path=/trunk/; revision=20669
2008-06-22 14:28:52 +00:00
Cody Russell
472ea19b4b Initialize hwnd to NULL. This fixes OpenClipboard() failure and, according
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-06-15 00:00:49 +00:00
Hans Breuer
8677ed959d check surface status after ceating a pdf. Avoids crashing when the target
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-13 08:36:26 +00:00
Tor Lillqvist
b981e4ff37 As we don't support Win9x anyway, we can use ProcessIdToSessionId()
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-06-11 16:05:28 +00:00
Tor Lillqvist
710c9619b9 Bug 533108 - leak of GDI region in function 'handle_wm_paint'
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-30 07:17:40 +00:00
Michael Natterer
791ac426d7 define __GDK_H_INSIDE__ around including all other headers.
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-28 14:01:57 +00:00
Hans Breuer
0b57c6b98f updated fix c99ism (variable at start of block export functions for window
2008-05-23  Hans Breuer  <hans@breuer.org>

	* **/makefile.msc gtk/makefile.msc.in : updated
	* gtk/gtkwidget.c : fix c99ism (variable at start of block
	* gdk/gdk.symbols gtk/gtk.symbols : export functions for window 
	redirection
	* gtk/gtkfilechooserdefault.c : #include <locale.h> for 
	setlocale(LC_ALL, ...)

svn path=/trunk/; revision=20131
2008-05-23 20:29:27 +00:00
Tor Lillqvist
a8b5f3ee6b Add gdk_window_redirect_to_drawable and gdk_window_remove_redirection.
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-23 18:46:40 +00:00
Tor Lillqvist
5b8f0faa94 Don't do anything if style doesn't change. Improve debugging output.
2008-05-23  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkwindow-win32.c (update_style_bits): Don't do
	anything if style doesn't change. Improve debugging output.


svn path=/trunk/; revision=20129
2008-05-23 18:25:12 +00:00
Tor Lillqvist
93a5db1511 Bug 496958 - Wacom Bamboo Doesn't Function with GTK apps in Win32
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-13 08:49:51 +00:00
Tor Lillqvist
40ae6fc8d2 Bug 532059 - Leak in win32 clipboard manipulation
2008-05-12  Tor Lillqvist  <tml@novell.com>

	Bug 532059 - Leak in win32 clipboard manipulation

	* gdk/win32/gdkselection-win32.c
	(gdk_win32_selection_add_targets): Plug memory leak. Patch by
	Daniel Atallah.


svn path=/trunk/; revision=20092
2008-05-12 07:05:40 +00:00
Michael Natterer
f3cd3f7cf5 gdk/gdkinternals.h gdk/gdkevents.c gdk/directfb/gdkevents-directfb.c
2008-05-07  Michael Natterer  <mitch@imendio.com>

	* gdk/gdkinternals.h
	* gdk/gdkevents.c
	* 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):
	order parameters src,dest and make src const.


svn path=/trunk/; revision=20079
2008-05-06 22:35:13 +00:00
Richard Hult
4ee2d1b6ba Add private backend data to events, and handle it when copying/freeing
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-05-06 21:00:06 +00:00
Tor Lillqvist
6861b9247f Bug 524151 - Dragging of 0-byte files results in an empty filename on
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-24 17:35:02 +00:00
Cody Russell
ca2987a0f9 Check window state for GDK_WINDOW_STATE_ICONIFIED before doing ShowWindow
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-23 15:37:40 +00:00
Tor Lillqvist
ea87c926e2 Drop the support for the MSH_MOUSEWHEEL message that MSDN says is used
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-14 16:11:50 +00:00
Tor Lillqvist
0f7099e308 Bug 520286 - Non-deletable window has no minimize / maximize buttons
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-03-10 15:48:06 +00:00
Cody Russell
e97c716a21 gdk/win32/gdkevents-win32.c Fixed two declarations in the middle of a
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-07 19:25:07 +00:00
Cody Russell
6e03989a4c Also check that the window is not mapped.
svn path=/trunk/; revision=19485
2008-02-06 17:01:47 +00:00
Cody Russell
84dd6a99b8 Check if the window is a temp window, otherwise things get wonky when you
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-06 16:32:41 +00:00
Cody Russell
275760cd0c Walk down the stack until we get to a window that is mapped. Otherwise
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-02-05 23:46:35 +00:00
Cody Russell
db58254c5c gdk/win32/gdkprivate-win32.h gdk/win32/gdkevents-win32.c
2008-02-05  Cody Russell  <bratsche@gnome.org>

        * gdk/win32/gdkprivate-win32.h
        * gdk/win32/gdkevents-win32.c
        * gdk/win32/gdkwindow-win32.c
        * gdk/win32/gdkwindow-win32.h
        * gdk/win32/gdkwin32.h:
        Modal window rework.  (#455627 and #511111)


svn path=/trunk/; revision=19463
2008-02-05 16:47:24 +00:00
Cody Russell
857fe308f5 Refactored some of the window hiding/showing code from WM_ACTIVATE to
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-31 22:40:37 +00:00
Michael Natterer
8243e3d415 gdk/gdkdisplay.h gdk/gdkdrawable.h gdk/gdkevents.h gdk/gdkpango.h
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
2008-01-15 15:32:37 +00:00
Michael Natterer
92f86e0496 gdk/gdk.h gdk/gdkcairo.h gdk/gdkcolor.h gdk/gdkgc.h gdk/gdkinternals.h
2008-01-14  Michael Natterer  <mitch@imendio.com>

	* gdk/gdk.h
	* gdk/gdkcairo.h
	* gdk/gdkcolor.h
	* gdk/gdkgc.h
	* gdk/gdkinternals.h
	* gdk/gdkregion.h
	* gdk/gdkwindow.h: made GdkRectangle*, GdkRegion* and GdkColor*
	parameters const.

	* gdk/gdkcairo.c
	* gdk/gdkgc.c
	* gdk/gdkwindow.c
	* gdk/gdkrectangle.c
	* gdk/gdkpolyreg-generic.c
	* gdk/gdkregion-generic.c
	* gdk/directfb/gdkcolor-directfb.c
	* gdk/directfb/gdkgc-directfb.c
	* gdk/directfb/gdkgeometry-directfb.c
	* gdk/directfb/gdkwindow-directfb.c
	* gdk/quartz/gdkcolor-quartz.c
	* gdk/quartz/gdkgc-quartz.c
	* gdk/quartz/gdkgeometry-quartz.c
	* gdk/quartz/gdkwindow-quartz.c
	* gdk/win32/gdkcolor-win32.c
	* gdk/win32/gdkgc-win32.c
	* gdk/win32/gdkgeometry-win32.c
	* gdk/win32/gdkprivate-win32.h
	* gdk/win32/gdkwindow-win32.c
	* gdk/x11/gdkcolor-x11.c
	* gdk/x11/gdkgc-x11.c
	* gdk/x11/gdkgeometry-x11.c
	* gdk/x11/gdkmain-x11.c
	* gdk/x11/gdkprivate-x11.h
	* gdk/x11/gdkwindow-x11.c: changed accordingly.

	* gdk/gdkpolyreg-generic.c: uncruftify to have proper function
	headers.


svn path=/trunk/; revision=19365
2008-01-14 14:02:12 +00:00
Tor Lillqvist
8dab0b9360 gdk/win32/gdkdisplay-win32.c gdk/win32/gdkglobals-win32.c
2008-01-10  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkdisplay-win32.c
	* gdk/win32/gdkglobals-win32.c
	* gdk/win32/gdkprivate-win32.h
	* gdk/win32/gdkscreen-win32.c
	* gdk/win32/gdkwindow-win32.c: Implement
	gdk_screen_get_monitor_width_mm(), gdk_screen_get_monitor_height_mm()
	and gdk_screen_get_monitor_plug_name(). Thanks to Kazuki
	Iwamoto. (#505753)


svn path=/trunk/; revision=19346
2008-01-10 21:40:48 +00:00
Cody Russell
4dc47ed700 Properly ref/unref windows and parents. (#506769)
2008-01-10  Cody Russell  <bratsche@gnome.org>

        * gdk/win32/gdkwindow-win32.c: (gdk_window_set_transient_for),
        Properly ref/unref windows and parents.  (#506769)


svn path=/trunk/; revision=19344
2008-01-10 20:58:40 +00:00
Cody Russell
045db5be38 Check that the window is mapped before setting SW_RESTORE or SW_MINIMIZE.
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-23 21:14:09 +00:00
Matthias Clasen
f8a1be3a04 Add a gtk-im-module GTK setting
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-12-18 03:24:17 +00:00
Michael Natterer
64c73a61b7 Remove all .cvsignore files.
svn path=/trunk/; revision=19169
2007-12-13 11:18:45 +00:00
Matthias Clasen
1397a9fd7d Implement GAppLaunchContext in gdk, providing startup notification.
2007-12-12  Matthias Clasen  <mclasen@redhat.com>

        * gdk/gdkapplaunchcontext.[hc]: Implement GAppLaunchContext
        in gdk, providing startup notification.  (#503203)

        * gdk/x11/gdkapplaunchcontext-x11.c:
        * gdk/win32/gdkapplaunchcontext-win32.c:
        * gdk/quartz/gdkapplaunchcontext-quartz.c:
        * gdk/directfb/gdkapplaunchcontext-directfb.c: Backend-specific
        parts. All but X11 are just empty stubs for now.

        * gdk/gdk.symbols:
        * gdk/gdkinternals.h:
        * gdk/Makefile.am:
        * gdk/x11/Makefile.am:
        * gdk/win32/Makefile.am:
        * gdk/quartz/Makefile.am:
        * gdk/directfb/Makefile.am: Necessary glue.



svn path=/trunk/; revision=19165
2007-12-13 05:16:33 +00:00
Tor Lillqvist
19209e3a15 Use the monitor the window currently is on, not always the primary
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-11-25 22:59:50 +00:00
Tor Lillqvist
fa7b91a8f7 New file, dummy implementations.
2007-11-26  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdktestutils-win32.c: New file, dummy implementations.

	* gdk/win32/Makefile.am: Add it.


svn path=/trunk/; revision=19045
2007-11-25 22:25:18 +00:00
15:39:40 Tim Janik
2dc08ada49 call g_test_init() from gtk_test_init().
2007-11-22 15:39:40  Tim Janik  <timj@imendio.com>

        * gtk/gtktestutils.c: call g_test_init() from gtk_test_init().

        * gtk/tests/testing.c: use g_test_add_func() to register tests and use
	g_test_run() to run the tests to integrate with the testing framework.

        * gtk/tests/Makefile.am: removed exemplary testing rules.

        * Makefile.am, gtk/tests/Makefile.am, gtk/Makefile.am:
        * gtk/xdgmime/Makefile.am, gtk/theme-bits/Makefile.am:
        * tests/Makefile.am, docs/reference/gdk-pixbuf/Makefile.am:
        * docs/reference/gdk/Makefile.am, docs/reference/gtk/Makefile.am:
        * docs/reference/Makefile.am, docs/tools/Makefile.am:
        * docs/tutorial/Makefile.am, docs/faq/Makefile.am, docs/Makefile.am:
        * gdk-pixbuf/pixops/Makefile.am, gdk-pixbuf/Makefile.am:
        * demos/gtk-demo/Makefile.am, demos/Makefile.am:
        * modules/input/Makefile.am, modules/printbackends/file/Makefile.am:
        * modules/printbackends/test/Makefile.am, modules/printbackends/Makefile.am:
        * modules/printbackends/cups/Makefile.am, modules/printbackends/lpr/Makefile.am:
        * modules/engines/ms-windows/Theme/gtk-2.0/Makefile.am:
        * modules/engines/ms-windows/Theme/Makefile.am:
        * modules/engines/ms-windows/Makefile.am:
        * modules/engines/Makefile.am,  modules/engines/pixbuf/Makefile.am:
        * modules/Makefile.am, m4macros/Makefile.am, perf/Makefile.am:
        * contrib/Makefile.am, contrib/gdk-pixbuf-xlib/Makefile.am:
        * gdk/directfb/Makefile.am, gdk/linux-fb/Makefile.am:
        * gdk/quartz/Makefile.am, gdk/win32/rc/Makefile.am:
        * gdk/win32/Makefile.am, gdk/x11/Makefile.am, gdk/Makefile.am:
	include $(top_srcdir)/Makefile.decl, adapted EXTRA_DIST assignments.



svn path=/trunk/; revision=19033
2007-11-22 14:38:26 +00:00
Tor Lillqvist
9466ea35a8 Add a block around the WM_ACTIVATE case to avoid declaring variables in
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-19 12:36:04 +00:00
Cody Russell
21d3d60f48 gdk/win32/gdkevents-win32.c Force non-modal transient dialogs to iconify
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-10-18 00:31:22 +00:00
Cody Russell
d59a6d2a6a Committing changes to the source bdf font file that I forgot to commit
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-17 03:40:39 +00:00
Cody Russell
a30a76c3e0 Modified the sb_h_double_arrow and sb_v_double_arrow mouse cursors to
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-08-15 14:58:45 +00:00
Tor Lillqvist
441f048426 Cosmetic changes.
2007-07-24  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkkeys-win32.c (update_keymap): Cosmetic changes.


svn path=/trunk/; revision=18538
2007-07-24 14:40:21 +00:00
Cody Russell
e992008541 gdk/win32/gdkevents-win32.c Fix transient windows on Win32 so that when a
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-12 23:38:30 +00:00
Tor Lillqvist
92421f96f6 Implement. Just return FALSE for now. What should this function actually
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-07-03 16:53:17 +00:00
Tor Lillqvist
1d5ef907b2 Revert my attempted overly simple fix for #445284, as it causes a
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-25 06:38:58 +00:00
Hans Breuer
49fc7e15ee updated explicit usage of RegisterClassExW to match the WNDCLASSEXW. True
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-15 15:25:50 +00:00
Tor Lillqvist
eb1876f305 Use g_win32_get_windows_version() instead of _winver so that this compiles
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-14 09:41:08 +00:00
Cody Russell
83d5a36c9f Don't revert the mouse cursor to the built-in one when the user holds the
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-06-10 16:13:09 +00:00
Matthias Clasen
885ba04648 Add support for composited child windows. (#412882, Ryan Lortie)
2007-06-01  Matthias Clasen  <mclasen@redhat.com>

        Add support for composited child windows.  (#412882, Ryan Lortie)

        * gdk/gdk.symbols:
        * gdk/gdkdisplay.h:
        * gdk/gdkinternals.h:
        * gdk/gdkwindow.[hc]: Add gdk_display_supports_composite() and
        gdk_window_set_composited().

        * gdk/x11/gdkevents-x11.c:
        * gdk/x11/gdkdisplay-x11.[hc]:
        * gdk/x11/gdkwindow-x11.[hc]: X11 implementation.

        * gdk/win32/gdkdisplay-win32.c:
        * gdk/win32/gdkwindow-win32.c: Dummy win32 implementration.

        * gdk/quartz/gdkdisplay-quartz.c:
        * gdk/quartz/gdkwindow-quartz.c: Dummy Quartz implementation.

        * gdk/directfb/gdkdisplay-directfb.c:
        * gdk/directfb/gdkwindow-directfb.c: Dummy DirectFB implementation.

        * tests/testgtk.c: Add a "composited window" test.


svn path=/trunk/; revision=18004
2007-06-01 12:16:12 +00:00
Tor Lillqvist
d022f4c32d Subtract the multi-monitor offset from x and y before setting up the
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-05-30 15:44:28 +00:00
Cody Russell
b5fe5d5bea Fix initialization of last cursor
svn path=/trunk/; revision=17973
2007-05-29 01:04:59 +00:00
Cody Russell
50af49319a Fix context iterations for handle_configure_event()
svn path=/trunk/; revision=17834
2007-05-13 18:44:27 +00:00
Cody Russell
c75e9c1df7 Clear correct area
svn path=/trunk/; revision=17737
2007-04-30 15:29:16 +00:00
Tor Lillqvist
b18f044270 Add functionality to set overall opacity of a top-level window. (#405316)
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-04-30 07:27:22 +00:00
Matthias Clasen
b72dfb8c4e Plug memory leaks caused by wrong use of g_slist_remove_link(). (#405515,
2007-04-28  Matthias Clasen  <mclasen@redhat.com>

        * gdk/win32/bdfcursor.c (compose_cursors_from_fonts):
        * gtk/gtkcombobox.c (gtk_combo_box_cell_layout_reorder):
        * gtk/gtkfilesystemmodel.c (got_root_folder_cb):
        (get_children_folder_cb): Plug memory leaks caused by wrong
        use of g_slist_remove_link().  (#405515, Nicolas Peninguy)



svn path=/trunk/; revision=17671
2007-04-28 14:41:04 +00:00
Cody Russell
2cf71073ed Use native Win32 cursors where it makes sense
svn path=/trunk/; revision=17645
2007-04-26 05:27:55 +00:00
Cody Russell
273c94e194 Win32 drop shadow goodness
svn path=/trunk/; revision=17643
2007-04-25 23:44:54 +00:00
Tor Lillqvist
03ad30de0a Add gdk_notify_startup_complete_with_id and gdk_window_set_startup_id.
2007-03-15  Tor Lillqvist  <tml@novell.com>

	* gdk/gdk.symbols: Add gdk_notify_startup_complete_with_id and
	gdk_window_set_startup_id.

	* gdk/win32/gdkmain-win32.c: Add dummy implementations of the above.


svn path=/trunk/; revision=17518
2007-03-15 16:48:26 +00:00
Matthias Clasen
82ce59cd0f Remove unnecessary NULL checks before g_free(). (#369666, Morten Welinder,
2007-03-09  Matthias Clasen <mclasen@redhat.com>

        * Everywhere: Remove unnecessary NULL checks before
        g_free().  (#369666, Morten Welinder, Djihed Afifi)

        * configure.in: Check for ftw.h



svn path=/trunk/; revision=17444
2007-03-09 21:57:37 +00:00
Tor Lillqvist
cf9ae54980 Add comment clarifying that "icon name" here is not related to the
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-26 13:48:01 +00:00
Tor Lillqvist
fcbf646cce Remove. (gdk_device_get_type): Drop class init function. The X11 version
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-19 00:32:32 +00:00
Cody Russell
ea7cc8d95e Fix Win32 resize events and flickering
svn path=/trunk/; revision=17299
2007-02-15 18:28:55 +00:00
Tor Lillqvist
bc9c5d2a9f Nitpick. Define BITMAPV5HEADERS also for w32api < 3.0, although I have
no idea whether gdk/win32 would build with such an old beast.


svn path=/trunk/; revision=17258
2007-02-04 00:32:52 +00:00
Tor Lillqvist
e11c63d517 Don't define BITMAPV5HEADER on mingw with w32api >= 3.8, which has it in
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-02-04 00:19:53 +00:00
Tor Lillqvist
3795a5cb61 New debugging function. (_gdk_input_wintab_init_check): Call it when
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-30 23:49:39 +00:00
Robert Oegren
f7687a8b9c Fix for bug #143460 - missed tablet clicks on Windows
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 02:38:46 +00:00
Tor Lillqvist
f6b4585c98 Build Wintab support always on Windows. Don't require the Wintab SDK.
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-19 01:55:52 +00:00
Tor Lillqvist
f1ce05caa9 gdk-pixbuf/Makefile.am gdk/Makefile.am gdk/win32/Makefile.am Fixes for
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-19 00:06:01 +00:00
Tor Lillqvist
8d601fbde3 New file. Downloaded from freedesktop.org's webcvs. Slighly edited cursors
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
2007-01-06 03:05:37 +00:00
Matthias Clasen
3b54167d99 Cross-compilation fixes. (#392646, Yevgen Muntyan)
2007-01-04  Matthias Clasen  <mclasen@redhat.com>

        * gtk/Makefile.am:
        * gdk-pixbuf/Makefile.am:
        * configure.in:
        * gdk/win32/rc/gdk.rc.in: Cross-compilation fixes.
        (#392646, Yevgen Muntyan)



svn path=/trunk/; revision=17065
2007-01-04 15:05:07 +00:00
Kristian Rietveld
0677ad8e59 Support inverting arrows via XSetting. (#377979, Yevgen Muntyan).
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-12-27 19:52:25 +00:00
Matthias Clasen
721c3bc101 Replace a lot of idle and timeout calls by the new gdk_threads api.
2006-12-22  Matthias Clasen  <mclasen@redhat.com>

        * *.c: Replace a lot of idle and timeout calls by
        the new gdk_threads api.
2006-12-22 19:10:43 +00:00
Tor Lillqvist
1739daf8e0 Implement for B&W cursors, for instance the built-in GDK ones.
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 00:17:11 +00:00
Tor Lillqvist
52b1bac8ec Improve handling of the small icon of the window class. (#152620, Kazuki
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-10-28 23:58:30 +00:00
Tor Lillqvist
8a99fbc640 gdk/win32/gdkprivate-win32.h gdk/win32/gdkmain-win32.c Define WINVER and
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-10 17:33:29 +00:00
Tor Lillqvist
25b98a5935 gdk/win32/gdkevents-win32.c Use wide-char API for message and window
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 22:50:00 +00:00
Tor Lillqvist
f3ce0228a5 No GDK_WINDOW_DISPLAY in the Win32 backend.
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-09-02 21:42:42 +00:00
Matthias Clasen
6760faeb4b Add a function to beep on a window. For X11, implement this with XkbBell.
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-30 03:30:43 +00:00
Tor Lillqvist
4e3d7dd088 Remove support for Windows 9x/ME. GTK+ hasn't worked on Win9x since 2.6 or
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-30 00:39:01 +00:00
Tor Lillqvist
1ff434a681 Remove support for Windows 9x/ME. GTK+ hasn't worked on Win9x since 2.6 or
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 23:01:53 +00:00
Tor Lillqvist
019fece724 Remove support for Windows 9x/ME. GTK+ hasn't worked on Win9x since 2.6 or
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-08-29 22:55:31 +00:00
Tor Lillqvist
dd9aefca76 Convert \n to \r\n also when storing CF_UNICODETEXT (UTF-16) in the
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-11 19:45:56 +00:00
Tor Lillqvist
225d9caf7c Call ReleaseDC() on DCs acquired with GetDC() (for windows), and
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-09 09:17:47 +00:00
Tor Lillqvist
f93e5455e9 [WM_WINDOWPOSCHANGED] Replace identical code as in
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-06-08 15:00:25 +00:00
Tor Lillqvist
6a652781ac Look at both GDK_SCROLL_MASK and GDK_BUTTON_PRESS_MASK. (#139628)
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)
2006-05-09 15:54:22 +00:00
Søren Sandmann
b9d1a03440 Create 'composited' label.
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-25 14:27:32 +00:00
Alexander Larsson
27f746fbd0 Merge the gtk-printing branch. For more detailed ChangeLog entries, see
2006-04-21  Alexander Larsson  <alexl@redhat.com>

        Merge the gtk-printing branch.
	For more detailed ChangeLog entries, see the branch.

	* .cvsignore:
	* Makefile.am:
	* configure.in:
	* docs/tools/widgets.c:
	* gtk+-unix-print-2.0.pc.in:
	* gtk/Makefile.am:
	* gtk/gen-paper-names.c:
	* gtk/gtk.h:
	* gtk/gtk.symbols:
	* gtk/gtkenums.h:
	* gtk/gtkiconfactory.c:
	* gtk/gtkmarshalers.list:
	* gtk/gtkpagesetup.[ch]:
	* gtk/gtkpagesetupunixdialog.[ch]:
	* gtk/gtkpapersize.[ch]:
	* gtk/gtkprint-win32.[ch]:
	* gtk/gtkprintbackend.[ch]:
	* gtk/gtkprintcontext.[ch]:
	* gtk/gtkprinter-private.h:
	* gtk/gtkprinter.[ch]:
	* gtk/gtkprinteroption.[ch]:
	* gtk/gtkprinteroptionset.[ch]:
	* gtk/gtkprinteroptionwidget.[ch]:
	* gtk/gtkprintjob.[ch]:
	* gtk/gtkprintoperation-private.h:
	* gtk/gtkprintoperation-unix.c:
	* gtk/gtkprintoperation-win32.c:
	* gtk/gtkprintoperation.[ch]:
	* gtk/gtkprintsettings.[ch]:
	* gtk/gtkprintunixdialog.[ch]:
	* gtk/paper_names.c:
	* gtk/paper_names_offsets.c:
	Platform independent printing API and implementations
	for unix and windows.

	* gtk/gtkstock.h:
	* gtk/stock-icons/24/gtk-orientation-landscape.png:
	* gtk/stock-icons/24/gtk-orientation-portrait.png:
	* gtk/stock-icons/24/gtk-orientation-reverse-landscape.png:
	Add stock icons for page orientation.

	* modules/Makefile.am:
	* modules/printbackends/Makefile.am:
	* modules/printbackends/cups/Makefile.am:
	* modules/printbackends/cups/gtkcupsutils.[ch]:
	* modules/printbackends/cups/gtkprintbackendcups.[ch]:
	* modules/printbackends/cups/gtkprintercups.[ch]:

	Cups printing backend for unix.

	* modules/printbackends/lpr/Makefile.am:
	* modules/printbackends/lpr/gtkprintbackendlpr.[ch]:
	lpr printing backend for unix.

	* modules/printbackends/pdf/Makefile.am:
	* modules/printbackends/pdf/gtkprintbackendpdf.[ch]:
	print-to-pdf printing backend for unix.

	* tests/.cvsignore:
	* tests/Makefile.am:
	* tests/print-editor.c:
	Test application for printing.

	* gdk/gdk.symbols:
	* gdk/win32/gdkevents-win32.c:
	* gdk/win32/gdkwin32.h:
	Add gdk_win32_set_modal_dialog_libgtk_only so that we can pump the
	mainloop while displaying a win32 common dialog.

	* gdk/directfb/Makefile.am:
	Whitespace cleanup.
2006-04-21 15:09:32 +00:00
Tor Lillqvist
8ae3fade37 Map VK_NUMPAD[0-9] to GDK_KP_[0-9]. (#337562)
2006-04-19  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkkeys-win32.c (handle_special): Map VK_NUMPAD[0-9]
	to GDK_KP_[0-9]. (#337562)
2006-04-19 09:42:06 +00:00
Tor Lillqvist
886ca74ca2 Correct the appearance of non-square icons and cursors: pad them to square
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-04-06 10:34:15 +00:00
Matthias Clasen
aff3329de1 Make _gdk_windowing_args const.
2006-04-03  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdkinternals.h:
	* gdk/x11/gdkmain-x11.c:
	* gdk/win32/gdkmain-win32.c:
	* gdk/directfb/gdkdisplay-directfb.c:
	* gdk/quartz/gdkmain-quartz.c: Make _gdk_windowing_args const.
2006-04-03 20:36:52 +00:00
Matthias Clasen
ac180cb0e4 Include gdksreen.h (#337032, Kazuki IWAMOTO)
2006-04-03  Matthias Clasen  <mclasen@redhat.com>

	* gdk/win32/gdkpixmap-win32.c: Include gdksreen.h  (#337032,
	 Kazuki IWAMOTO)
2006-04-03 18:12:04 +00:00
Matthias Clasen
7e6f1345a9 New function to allow wrapping a native pixmap without a server roundtrip.
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-30 04:08:51 +00:00
Tor Lillqvist
23025393a6 Use Polygon() for outlined polygons, too. Same idea as in
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-03-11 20:34:37 +00:00
Michael Natterer
5afb4f0f11 gdk/gdkscreen.h gdk/x11/gdkscreen-x11.c added
2006-03-08  Michael Natterer  <mitch@imendio.com>

	* gdk/gdkscreen.h
	* gdk/x11/gdkscreen-x11.c
	* gdk/gdk.symbols: added gdk_screen_get_active_window() and
	gdk_screen_get_window_stack() (patch from maemo-gtk).
	Fixes bug #320881.

	* gdk/directfb/gdkscreen-directfb.c
	* gdk/quartz/gdkscreen-quartz.c
	* gdk/win32/gdkscreen-win32.c: added the functions as stubs.
2006-03-08 17:02:34 +00:00
Tor Lillqvist
3cb8a43a25 New function, return TRUE. (gdk_display_supports_input_shapes): New
2006-02-20  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkdisplay-win32.c (gdk_display_supports_shapes):
	New function, return TRUE.
	(gdk_display_supports_input_shapes): New function, return FALSE.
2006-02-20 10:10:27 +00:00
Tor Lillqvist
f251cf42fd New function. Factor out code from gdk_window_shape_combine_mask().
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-20 10:08:37 +00:00
Tor Lillqvist
d9d1a36c59 Replace all calls to g_strcasecmp() with g_ascii_strcasecmp().
2006-02-20  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkfont-win32.c: Replace all calls to g_strcasecmp()
	with g_ascii_strcasecmp().
2006-02-20 08:52:19 +00:00
Tor Lillqvist
a7e8b3521c If we don't know where we went, and have generated a leave event, set
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-09 05:49:55 +00:00
John Ehresman
e847ace84b gdk/win32/gdkevents-win32.c (gdk_event_translate) <WM_MOUSEACTIVATE> Call
2006-02-08  John Ehresman  <jpe@wingware.com>

	* gdk/win32/gdkevents-win32.c (gdk_event_translate)
	<WM_MOUSEACTIVATE>
	* gdk/win32/gdkwindow-win32.c (show_window_internal)
	(gdk_window_raise): Call SetWindowPos() instead of
	SetForegroundWindow() or BringWindowToTop() if the window
	shouldn't accept focus. (#327375)
2006-02-09 03:20:56 +00:00
John Ehresman
c502c9aeab Let gdk_window_set_decorations() take precedence over anything derived
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-09 02:58:45 +00:00
Tor Lillqvist
746a5c36a5 Consistenly use assign_object() when assigning GdkWindow pointers so that
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-02-08 17:32:50 +00:00
Tor Lillqvist
348ffaea19 Make identical to the X11 implementation. (#322264, John Ehresman)
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)
2006-01-02 09:32:56 +00:00
Tor Lillqvist
33cb3f8f57 Revert stuff that was accidentally committed. 2006-01-02 00:48:39 +00:00
Tor Lillqvist
53e2c08380 Get the invalidated region from ScrollWindowEx() instead of an incorrect
2006-01-02  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkgeometry-win32.c (gdk_window_scroll): Get the
	invalidated region from ScrollWindowEx() instead of an incorrect
	attempt to calculate it ourselves. Fix by John Ehresman. (#323666)

	* gdkevents-win32.c: Make _gdk_win32_hrgn_to_region() non-static.

	* gdkprivate-win32.h: Declare it.
2006-01-02 00:45:39 +00:00
Tor Lillqvist
2aadb2dff2 Implement the conditional use of FlashWindowEx() properly for MSVC
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-28 08:40:56 +00:00
Tor Lillqvist
3ff34d06e8 Once again rework Win32 window decoration code. Doesn't break #104514. The
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-27 02:58:09 +00:00
Tor Lillqvist
575149342b Revert to the correct semantics. (#322516)
2005-11-27  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkwindow-win32.c (set_or_clear_style_bits): Revert to
	the correct semantics. (#322516)
	(gdk_window_set_geometry_hints): Adjust call correspondingly.
2005-11-27 00:20:55 +00:00
Tor Lillqvist
3b9a63ec6e gdk/gdkinternals.h Add new GDK_DEBUG_DRAW flag to the GdkDebugFlag enum.
2005-11-09  Tor Lillqvist  <tml@novell.com>

	* gdk/gdkinternals.h
	* gdk/gdk.c (gdk_debug_keys[]): Add new GDK_DEBUG_DRAW flag to
	the GdkDebugFlag enum.

	* gdk/win32/gdkdrawable-win32.c: Use DRAW to trigger GDK_NOTEs in
	this file instead of MISC. Now asking for MISC will give mainly
	window manipulation debugging output.
2005-11-09 13:10:27 +00:00
Tor Lillqvist
9b5c5f9db5 Remove unnecessary includes.
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 12:35:56 +00:00
Tor Lillqvist
64f1e8378b gdk/win32/gdkwindow-win32.h (struct _GdkWindowImplWin32) Store the type
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 02:13:35 +00:00
Tor Lillqvist
d08d2c2bd4 Remove code that has been permanently ifdeffed out for two years.
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-08 22:27:47 +00:00
Tor Lillqvist
90942c4fef Fix also the other place where maskstride was calculated. 2005-11-07 12:05:43 +00:00
Tor Lillqvist
449f16b238 Correct the calculation of maskstride. (#320152, Peter Zelezny)
2005-11-07  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkcursor-win32.c (pixbuf_to_hbitmaps_normal):
	Correct the calculation of maskstride. (#320152, Peter Zelezny)
2005-11-07 08:16:29 +00:00
Tor Lillqvist
bd9e367de7 (pixbuf_to_hbitmaps_alpha_winxp): Use an 1-bit mask bitmap, like
2005-11-06  Tor Lillqvist  <tml@novell.com>

	(pixbuf_to_hbitmaps_alpha_winxp): Use an 1-bit mask bitmap,
	like pixbuf_to_hbitmaps_normal().
	(_gdk_win32_pixbuf_to_hicon_supports_alpha): Check
	G_WIN32_IS_NT_BASED() first, so we can pretend being on Win9x by
	setting the G_WIN32_PRETEND_WIN9X environment variable.

2005-11-06  Tor Lillqvist  <tml@novell.com>

	Make icon masks work on Win98 (#320152, Peter Zelezny)

	* gdk/win32/gdkcursor-win32.c (create_color_bitmap): Take also a
	parameter for the depth of the bitmap, so that this function can
	be used to create 1-bit bitmaps, too.
	(pixbuf_to_hbitmaps_normal): Create an 1-bit bitmap for the mask,
	and initialize it properly.
2005-11-06 05:36:49 +00:00
Tor Lillqvist
72ea12fec0 As there is only one GdkDisplay in the Win32 backend, check that
2005-11-03  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkcursor-win32.c: As there is only one GdkDisplay in
	the Win32 backend, check that GdkDisplay* parameters are equal to
	_gdk_display instead of using the unnecessarily general
	GDK_IS_DISPLAY().
2005-11-03 13:44:37 +00:00
Tor Lillqvist
5551fc6754 Rename the variables for the color bitmap to have "color" in their name,
2005-11-03  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkcursor-win32.c (pixbuf_to_hbitmaps_alpha_winxp):
	Rename the variables for the color bitmap to have "color" in their
	name, for similarity with pixbuf_to_hbitmaps_normal(). Create a
	color bitmap for the mask, too, instead of creating a b&w bitmap
	with CreateBitmap(). Set up the mask bitmap's contents, ones for
	those pixels in the color bitmap where the alpha is zero, zero for
	other pixels. We used to use an unitialized mask bitmap! This
	meant that icons and cursors created presumably worked more or
	less by accident. Totally blank icons with zero alpha everywhere
	(as used by gtktrayicon.c) definitely did not work as expected.
2005-11-03 13:29:30 +00:00
Tor Lillqvist
c2c55f8385 gdk/win32/gdkcolor-win32.c gdk/win32/gdkscreen-win32.c Whitespace
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-11-02 13:33:27 +00:00
Tor Lillqvist
4d1b5589c5 gdk/win32/gdkprivate-win32.h gdk/win32/gdkglobals-win32.c Add more
2005-11-01  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkprivate-win32.h
	* gdk/win32/gdkglobals-win32.c
	* gdk/win32/gdkmain-win32.c (_gdk_windowing_init): Add more
	pre-interned GdkAtoms and pre-registered clipboard formats. Sort
	their declarations, definitions and assignments into a more
	logical and consistent order.

	* gdk/win32/gdkmain-win32.c (_gdk_win32_cf_to_string): Include the
	CF_ prefix for the predefined clipboard format names. Put quotes
	around registered format names to distinguish them.

	* gdk/win32/gdkproperty-win32.c (gdk_property_change): Return
	immediately with a warning if the property type is STRING, TEXT,
	COMPOUND_TEXT or SAVE_TARGETS, as these are X11-specific that we
	should never pretend to handle on Win32. Handle only UTF8_STRING
	here, other formats with delayed rendering. Use \uc1 instead of
	\uc0 when generating Rich Text Format for easier testability on
	XP, where WordPad misinterprets \uc0 encoded characters. Add more
	GDK_NOTE debugging output for Clipboard operations.

	* gdk/win32/gdkselection-win32.c: Debugging printout improvements.
	(gdk_selection_convert): Don't pretent to handle STRING, just
	UTF8_STRING. Streamline error handling, don't unnecessarily have a
	GError which then isn't used for anything anyway if it gets set.
	(gdk_win32_selection_add_targets): Skip also STRING, TEXT,
	COMPOUND_TEXT and SAVE_TARGETS in addition to UTF8_STRING.
2005-11-01 15:29:59 +00:00
Tor Lillqvist
e6fa7394ba Remove the clipboard viewer code. It didn't really do anything useful, and
2005-10-14  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkdisplay-win32.c: Remove the clipboard viewer code.
	It didn't really do anything useful, and was just confusing and
	incomplete. Comments claimed we don't do delayed rendering, but in
	fact we do, for images. (The delayed rendering code has other
	problems, though, see #168173.) The clipboard viewer code was
	probably even buggy (the WM_CHANGECBCHAIN handled didn't propagate
	the message when necessary). It was just test code, it said so in
	a comment. Add something similar back later if necessary.

	(_win32_on_clipboard_change,
	_gdk_win32_register_clipboard_notification): Remove.

	(gdk_display_supports_selection_notification,
	gdk_display_request_selection_notification): Always just return
	FALSE. We didn't generate any GDK_OWNER_CHANGE events anywhere.
2005-10-14 00:08:14 +00:00
Tor Lillqvist
d297ff329f Don't treat Alt-Enter specially. It does not have any special meaning and
2005-10-13  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkevents-win32.c (gdk_event_translate): Don't treat
	Alt-Enter specially. It does not have any special meaning and
	should be passed on to the application. (#318378, Tim Evans)
2005-10-13 07:21:00 +00:00
Tor Lillqvist
b25e6c5b05 Set visual depth to 24 for 32 bits-per-pixel devices on Win32. This allows
2005-10-13  Tor Lillqvist  <tml@novell.com>

	Set visual depth to 24 for 32 bits-per-pixel devices on
	Win32. This allows gdk_drawable_real_draw_pixbuf() to use the
	optimized composite_0888() function rather than the slower image
	dithering functions to draw pixbufs (#313993, John Ehresman)

	* gdk/win32/gdkimage-win32.c (_gdk_win32_new_image): Use
	_gdk_windowing_get_bits_for_depth() to initialize
	GdkImage::bits_per_pixel.
	(_gdk_windowing_get_bits_for_depth): Return 32 bits for depth 24.

	* gdk/win32/gdkpixmap-win32.c (gdk_pixmap_new): Use
	_gdk_windowing_get_bits_for_depth() to initialize
	BITMAPINFOHEADER::biBitCount.

	* gdk/win32/gdkvisual-win32.c (_gdk_visual_init): Set
	GdkVisual::depth to 24 even if GetDeviceCaps(BITSPIXEL) returns
	32.
2005-10-13 07:08:49 +00:00
Tor Lillqvist
ef2c2326f0 In case BitBlt() fails with ERROR_INVALID_HANDLE, the most probable cause
2005-10-01  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkdrawable-win32.c (blit_from_pixmap): In case
	BitBlt() fails with ERROR_INVALID_HANDLE, the most probable cause
	is that the the desktop isn't visible because the session has been
	switched, the screen is locked, or a terminal server session
	disconnected, so no error message necessary. (#137796)

	It is of course remotely possible that BitBlt() failing with
	ERROR_INVALID_HANDLE might also be caused by some other
	problem. We could strive for perfection and track whether the
	desktop is visible by using WTSRegisterSessionNotification() and
	handling WM_WTSESSION_CHANGE. I think that's overdoing it just for
	this issue, though. If we would track desktop visibility, we
	should then avoid even trying to update the display at all while
	the desktop isn't visible.
2005-09-30 23:56:42 +00:00
Tor Lillqvist
bca0cefe1c Set the shaped flag here, too. (#316871)
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-26 20:59:31 +00:00
Tor Lillqvist
67a0d5df3d Free return value from gdk_atom_name().
2005-09-21  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkselection-win32.c (gdk_selection_convert,
	gdk_text_property_to_text_list_for_display,
	gdk_text_property_to_utf8_list_for_display,
	gdk_win32_selection_add_targets,
	_gdk_win32_selection_convert_to_dib): Free return value from
	gdk_atom_name().
	(gdk_text_property_to_text_list_for_display): Drop GError variable
	that isn't actually used after being set.
2005-09-20 23:08:18 +00:00
Tor Lillqvist
d46d791df0 Do return the correct owner for CLIPBOARD (i.e., the owner of the Windows
2005-09-20  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkselection-win32.c
	(gdk_selection_owner_get_for_display): Do return the correct owner
	for CLIPBOARD (i.e., the owner of the Windows Clipboard, if it is
	a window GDK knows about). The reason to return NULL seems to have
	gone when in the fix for bug #163702 the artificial
	GDK_SELECTION_CLEAR event generation was removed from
	gdk_selection_send_notify_for_display(). Fixes bug #316552.
2005-09-20 07:59:19 +00:00
Hans Breuer
99b5586acc export _gdk_win32_pixbuf_to_hicon() as
2005-09-18  Hans Breuer  <hans@breuer.org>

	* gdk/gdk.symbols gdk/win32/gdkwin32.h gdk/win32/gdkcursorwin32.c : export
	_gdk_win32_pixbuf_to_hicon() as gdk_win32_pixbuf_to_hicon_libgtk_only()
	* gtk/gtktrayicon-win32.c : a lot of debug spew but it has started to show
	the icon and is blinking with teststatusicon. More to come ...
2005-09-18 17:46:55 +00:00
Hans Breuer
e5d06c7ca9 fix typo for GTK_VER; define HAVE_CONFIG_H cause gtkprogressbar.c has
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-09-18 12:28:42 +00:00
Tor Lillqvist
ef86d40384 Typo. 2005-09-08 23:50:52 +00:00
Tor Lillqvist
0905c73a88 Cache the display name. There is only one GdkDisplay on Win32, and
2005-09-09  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkdisplay-win32.c (gdk_display_get_name): Cache the
	display name. There is only one GdkDisplay on Win32, and
	constructing the display name isn't entirely trivial, so cacheing
	is probably worth it. For instance GIMP calls this function a lot.
	(gdk_display_open): Call gdk_display_get_name() to prime the
	cached name.
	(gdk_display_get_n_screens, gdk_display_get_screen,
	gdk_display_get_default_screen): Verify parameter correctness like
	the X11 backend does.

	* gdk/win32/gdkscreen-win32.c (gdk_screen_make_display_name):
	Return a freshly allocated string, as the API specifies. Fixes a
	heap corruption problem that caused random errors and crashes in
	GIMP, for instance.
2005-09-08 22:45:40 +00:00
Tor Lillqvist
b2595c847c Keep track of cursor position also in root window coordinates. Prune out
2005-09-02  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkevents-win32.c (gdk_event_translate): Keep track of
	cursor position also in root window coordinates. Prune out
	superfluous WM_MOUSEMOVE messages even earlier, based on root window
	coordinates. Windows sends WM_MOUSEMOVE messages after a new
	window has ben mapped below the cursor even if the mouse doesn't
	move. We used to generate GDK_MOTION_NOTIFY in these cases. This
	confused at least gtk_menu_motion_notify(). (#314995)

	* gtk/gtkintl.h: No need to include config.h here. It caused
	warnings about GTK_LOCALEDIR being redefined on Win32 when
	compiling files where gtkintl.h is included after gtkprivate.h
	(which #undefines and re-#defines GTK_LOCALEDIR on Win32).

	* gtk/gtkplug.c: Include config.h.
2005-09-02 01:54:45 +00:00
Owen Taylor
42dc0241f3 Handle pixmap == NULL when checking for a colormap. (Allin Cottrell).
2005-08-15  Owen Taylor  <otaylor@redhat.com>

        * gdk/linux-fb/gdkwindow-fb.c (gdk_window_set_back_pixmap):
        * gdk/win32/gdkwindow-win32.c (gdk_window_set_back_pixmap):
        * gdk/x11/gdkwindow-x11.c (gdk_window_set_back_pixmap):
        Handle pixmap == NULL when checking for a colormap.
        (Allin Cottrell).
2005-08-15 12:35:04 +00:00
Owen Taylor
c24e5e2890 gdk/linux-fb/gdkwindow-fb.c (gdk_window_set_back_pixmap)
2005-08-12  Owen Taylor  <otaylor@redhat.com>

        * gdk/linux-fb/gdkwindow-fb.c (gdk_window_set_back_pixmap)
        * gdk/win32/gdkwindow-win32.c (gdk_window_set_back_pixmap)
        * gdk/x11/gdkwindow-x11.c (gdk_window_set_back_pixmap): Warn if
        gdk_drawable_get_colormap (pixmap) is NULL and return.
2005-08-12 13:13:54 +00:00
J. Ali Harlow
3502a2a259 Make the last change compile.
2005-08-10  J. Ali Harlow  <ali@juiblex.co.uk>

        * gdk/win32/gdkfont-win32.c (gdk_font_from_description_for_display): Make
	the last change compile.
2005-08-10 11:02:29 +00:00
Owen Taylor
bfd04045e5 Strip out all Xft, FreeType, and pangoxft checking. Rewrite X checks to
2005-08-09  Owen Taylor  <otaylor@redhat.com>

        * configure.in: Strip out all Xft, FreeType, and pangoxft checking.
        Rewrite X checks to use pkg-config as much as possible.

        * gdk/win32/gdkfont-win32.c (gdk_font_from_description_for_display): Make
        this return Arial always to avoid using PangoWin32FontMap. (X11 backend
        has always been returned "fixed" for a long time)

        * gdk/linux-fb/gdkdrawable-fb2.c: Remove draw_glyphs() implementations,
        fall through to the default implementation in terms of Cairo.

        * gdk/linux-fb/gdkdrawable-fb2.c (gdk_fb_draw_text): Use gdk_draw_glyphs()
        on the wrapper rather than gdk_fb_draw_glyphs()
2005-08-10 02:31:51 +00:00
Tor Lillqvist
2aec0359db Implement using FlashWindowEx(). (#309423)
2005-08-01  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkwindow-win32.c (gdk_window_set_urgency_hint):
	Implement using FlashWindowEx(). (#309423)
2005-08-01 07:19:15 +00:00
Tor Lillqvist
375cb32bc1 Cosmetics. 2005-07-29 00:35:21 +00:00
Tor Lillqvist
bdc7c892ca Remove ifdeffed out code relating to the gdk-ping message. Use the global
2005-07-29  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkevents-win32.c: Remove ifdeffed out code relating
	to the gdk-ping message. Use the global _gdk_display instead of
	calling gdk_display_get_default() which would return _gdk_display
	anyway.

	(append_event, apply_filters, gdk_event_translate): Drop any
	GdkDisplay parameter as we only have one display anyway. Use
	_gdk_display where needed.

	(gdk_event_apply_filters): Delete, move the code into its only
	caller, apply_filters().

	(generate_button_event): Factor out code from two places in
	gdk_event_translate().

	(gdk_event_translate): Call generate_button_event() in place of
	inline code.
2005-07-29 00:23:03 +00:00
Tor Lillqvist
8ac2c72f10 New static function to generate and append the GDK_GRAB_BROKEN events.
2005-07-29  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkevents-win32.c (generate_grab_broken_event): New
	static function to generate and append the GDK_GRAB_BROKEN events.

	(gdk_pointer_grab, gdk_keyboard_grab): Generate grab broken events
	when overriding a grab inside the application, like in the X11
	backend. Final bits of the fix for #107320, hopefully.

	(print_event): Handle also GDK_SETTING, GDK_OWNER_CHANGE and
	GDK_GRAB_BROKEN events.

	(gdk_event_translate): Call generate_grab_broken_event() in place
	of inline code.
2005-07-28 23:21:57 +00:00