Commit Graph

688 Commits

Author SHA1 Message Date
Peter Clifton
fd01442c7e Win32: Ensure native back-end for windows where the user requests their handle
https://bugzilla.gnome.org/show_bug.cgi?id=658841
2011-09-27 09:15:36 +02:00
Tor Lillqvist
d2d6caf00a Remove superfluous call to _gdk_event_button_generate()
Fixes bug #630962.
2011-09-05 01:33:29 +03:00
Chun-wei Fan
d0aa7ffc61 Add G_ENABLE_DEBUG #ifdef check in gdkdisplay-win32.c
Commit 88707e6912 used
_gdk_win32_cf_to_string, which is only defined when G_ENABLE_DEBUG
is defined, so add G_ENABLE_DEBUG #ifdef around that part.
2011-06-16 13:48:56 +08:00
Javier Jardón
8d5d9e68ed gdk: Use 'const' instead deprecated G_CONST_RETURN 2011-06-15 14:47:19 +01:00
Marc-André Lureau
88707e6912 win32: resurect Windows clipboard selection notification
This is a rewrite of e6fa7394ba, with
misc fixes that should help with some bugs Tim was talking about.

https://bugzilla.gnome.org/show_bug.cgi?id=652239
2011-06-10 01:22:49 +02:00
Tor Lillqvist
af91746931 Handle emulated keyboard input that arrives as VK_PACKET
Fixes bug #642772. Thanks to the anonymous bug reporter for providing
a test program.
2011-02-20 01:33:00 +02:00
Matthias Clasen
2f8c78ddc5 Deprecate foreign window apis
And add x11- and win32-specific apis for these at the same time
2010-12-21 09:54:14 -05:00
Michael Natterer
d0f2b13309 gdk: add gdk_device_get_n_keys() to access the sealed num_keys member 2010-11-24 20:15:29 +01:00
Bastien Nocera
df08bc43ec gdk: Add XSetting for "gtk-cursor-blink-timeout"
Otherwise the blink timeout is the one used by default in GTK+.

https://bugzilla.gnome.org/show_bug.cgi?id=634697
2010-11-15 17:20:02 +00:00
Hans Breuer
1050485a13 Prefer MessageBeep() over Beep()
Only the former respects the sound volume setting. If MessageBeep() fails fall back to the latter.
(cherry picked from commit 5e59db1554)
2010-11-07 22:38:20 +01:00
Tor Lillqvist
88f54ea47d Avoid potential DLL hijacking in Wintab code
Load Wintab32.dll from an absolute path. A proper Wintab32.dll, if
present, should be in the Windows system directory, so load it from
there.
2010-09-09 20:21:03 +03:00
Tor Lillqvist
027380d33e Just use TrackMouseEvent directly
TrackMouseEvent is present in user32.dll in all Windows versions we
support. No need to look it up dynamically. No need to fallback to
_TrackMouseEvent from comctrl32.dll.
2010-09-03 00:49:02 +03:00
Fridrich Štrba
895b9ff43f A proper fix for win32 build 2010-08-29 18:16:58 +02:00
Fridrich Štrba
af44019baf Revert "Fix windows build of the branch"
This reverts commit c7e650ae5d.
2010-08-29 18:16:19 +02:00
Hans Breuer
707f1a9a84 win32: Further fixing _gdk_window_impl_new()
- attributes->wclass is not consistently set anymore,
   use private->input_only instead [1]
 - don't put window into parent->children a second time
   (now there is no window reference problem anymore)
2010-08-29 14:22:08 +02:00
Fridrich Štrba
c7e650ae5d Fix windows build of the branch 2010-08-28 18:50:45 +02:00
Martin Schlemmer
770e308c42 win32: cummulated backport of xp theme fixes from master 2010-08-28 15:14:31 +02:00
Hans Breuer
e339d36a02 win32: Resurrect some enter/leave notify events for native windows
The button highlighting in testgtk works again, even with
GDK_NATIVE_WINDOWS. Unfortunately testgtk:menus still does
not work for the forced-native-window-case.
2010-08-27 21:29:33 +02:00
Hans Breuer
068515ad96 Further fix _gdk_window_impl_new() for win32 and ...
Beside fixing _gdk_window_impl_new() as adviced in
http://mail.gnome.org/archives/gtk-devel-list/2010-August/msg00214.html
the patch adds implementations for set_background, set_back_pixmap,
restack_under, restack_toplevel and clear_region methods.
2010-08-27 21:23:59 +02:00
Neil Roberts
2e08524481 win32: Never pass SWP_NOSIZE or SWP_NOMOVE to SetWindowPos
In _gdk_window_move_resize_child it tries to decide whether to pass
SWP_NOSIZE and SWP_NOMOVE based on whether the new size and position
is different from the window's existing position. However it seems
that GDK now ends up updating the window's position before calling
_gdk_window_move_resize_child so this would mean it would think the
window never changes size or position so SWP_NOSIZE|SWP_NOMOVE would
always be set. This causes child windows to never be resized.

This patch changes it so that it never passes either flag to
SetWindowPos. I don't know whether this will cause any side effects
but you'd think it shouldn't do any harm to reassert the current size.

https://bugzilla.gnome.org/show_bug.cgi?id=628049

Signed-off-by: Hans Breuer <hans@breuer.org>
2010-08-27 20:38:01 +02:00
Hans Breuer
0e781823cb Update mscv/win32 build
Fix makefiles for separated gdk-pixbuf and declare variable at
the beginning of a block (fix c99ism).
2010-08-27 20:34:23 +02:00
John Stowers
dc2fea413b Add gdk_device_get_n_axes
https://bugzilla.gnome.org/show_bug.cgi?id=624221
2010-07-25 12:32:43 +12:00
Tor Lillqvist
bba451147b 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:32:05 +03:00
Hib Eris
070afc587c [gdk/win32] Fix typo 2010-06-08 15:46:05 +02:00
Colin Walters
c8262d39fa 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:32:06 -04:00
Tor Lillqvist
97015c226f Don't use g_drag_context_ref
(cherry picked from commit a709056140)
2010-05-30 02:23:03 -04:00
Javier Jardón
cfb988ab38 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-27 16:25:54 +02:00
Benjamin Otte
fd20ac0751 Revert "Deprecate the GdkRegion API"
This reverts commit 821dd33918.
2010-05-26 09:25:35 +02:00
Benjamin Otte
821dd33918 Deprecate the GdkRegion API
Includes fixing all callers to use the cairo region API instead. This is
usually just replacing the function names, the only difference is
gdk_region_get_rectangles() being replaced by
cairo_region_num_rectangles() and cairo_region_get_rectangle() which
required a bit more work.

https://bugzilla.gnome.org/show_bug.cgi?id=613284
2010-05-23 23:27:15 +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