Commit Graph

29298 Commits

Author SHA1 Message Date
Peter Clifton
05e982a11a Win32: Fix _gdk_windowing_window_at_pointer to correctly return a toplevel
Commit 5ebb32d1ff didn't add the correct
code to find the toplevel window. The WindowFromPoint() function does
not return the toplevel window in the hierarchy, it returns the deepest
non-disabled, non-invisible child. As we don't use invisible or disabled
windows, we don't actually need to use the ChildWindowFromPoint walk for
the non get_toplevel case, so we can remove that code path.

To find a toplevel, we need to start from the desktop and work up, using
ChildWindowFromPointEx (to ignore invisible and disabled windows). If we
don't ignore invisible and disabled windows (as is the case with the
ChildWindowFromPoint call, we are liable to get returns of hidden or
disabled children of the desktop which don't belong to us, but notionally
occupy the same area under the pointer.

An alternative might be to start our walk with one of the children of the
desktop owned by our process and thread - which we can enumerate using,
the EnumThreadWindows call, or (presumably) determine internally. This
would not work when we are inside a GtkSocket though, as the children of
the desktop would belong to the process owning the GtkPlug - we would
have to rely on our own list of windows.

For correctness, this commit adds tests to ensure that we don't try to
return either x or y window coordinates if that corresponding pointer is
NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=658842
2011-11-10 17:40:50 +01:00
Peter Clifton
f9d8f9758b Win32: Ensure native back-end for windows where the user requests their handle
https://bugzilla.gnome.org/show_bug.cgi?id=658841
2011-11-10 17:40:49 +01:00
Chun-wei Fan
b18718ac7e 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-11-10 17:40:49 +01:00
Marc-André Lureau
1afc29d869 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-11-10 17:40:48 +01:00
Hans Breuer
db19fbd45c 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.
2011-11-10 17:40:47 +01:00
Neil Roberts
7445a59a9a 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>
2011-11-10 17:40:47 +01:00
Alexander Larsson
06a20d207a Fix build by adding include
build failed with a GTK_IS_VIEWPORT link error
2011-11-10 17:40:46 +01:00
Alexander Larsson
96bae6ad08 Add include to fix the build 2011-11-10 17:25:02 +01:00
Benjamin Otte
24b9599af7 a11y: Get rid of gtk.h includes in headers
This way, we can include them without accidentally including deprecated
code. Which means we can still use the recently added turning-off tricks
for deprecation warnings.
2011-11-10 17:10:04 +01:00
Benjamin Otte
2d3c36a021 a11y: Fix gcc warning 2011-11-10 17:10:04 +01:00
Benjamin Otte
1c96b0b838 a11y: It's not a bug if there's no row at some point
In that case, there's just nothing there.
2011-11-10 17:10:04 +01:00
Bastien Nocera
c30d313afc gtk: Fix parsing of accelerators with keycodes
GDK_KEY_VoidSymbol is not the same as keycode 0. This fixes
keycodes such as "0xb3" being parsed as "VoidSymbol" keysyms.

https://bugzilla.gnome.org/show_bug.cgi?id=663761
2011-11-10 14:33:28 +00:00
Bastien Nocera
d69c7f4776 gtk: Fix GtkCellRenderer ignoring keycodes
We should use the new helper code rather than invent our own
functions again.

https://bugzilla.gnome.org/show_bug.cgi?id=663761
2011-11-10 14:33:28 +00:00
Guillaume Desmottes
fb97c28bca gtktreeviewaccessible: use a value_destroy_func with the cell_info_by_index hash
This ensures that we don't leak any GtkTreeViewAccessibleCellInfo when
re-inserting a new one with the same key.

https://bugzilla.gnome.org/show_bug.cgi?id=663694
2011-11-10 14:49:30 +01:00
Guillaume Desmottes
22807d8469 gtktreeviewaccessible: factor out cell_info_free()
https://bugzilla.gnome.org/show_bug.cgi?id=663694
2011-11-10 14:49:30 +01:00
Michael Meeks
14a17873de broadway: Initial support fro V7+ websockets
Allows more modern browsers eg. firefox 5+ to use gtk/broadway
Auto-detects protocol version, and can switch between them at
as you connect a different browser.

This works to some extent, but seems to hang sometimes, for
instance the "button box" test in testgtk never shows up.
2011-11-10 10:12:28 +01:00
Matthias Clasen
f711da3d1b uimanager: Work around deprecations 2011-11-09 23:45:58 -05:00
Matthias Clasen
a7958f06e3 treeview: Work around deprecations 2011-11-09 23:42:11 -05:00
Matthias Clasen
6ae6284d1a Remove some redundant verbosity 2011-11-09 22:18:39 -05:00
Matthias Clasen
82d6a4e918 Don't use G_ERRORCHECK_MUTEXES anymore
It's gone from GLib.
2011-11-09 22:11:04 -05:00
Matthias Clasen
2298c51d93 Update documentation around deprecations. 2011-11-09 22:08:43 -05:00
Matthias Clasen
5594ec8dd0 Don't add -DGSEAL_ENABLE to CFLAGS anymore
That define is no longer used anywhere in gtk.
2011-11-09 22:05:11 -05:00
Matthias Clasen
190c271986 Add a missing include 2011-11-09 22:03:10 -05:00
Matthias Clasen
a78ab0cfa1 Drop use of GDK_DISABLE_DEPRECATED guards in gtk
We now use function attributes for deprecation so the build-breaking
guards are no longer needed.
2011-11-09 22:02:42 -05:00
Matthias Clasen
b3e13bd0a8 Drop use of GDK_DISABLE_DEPRECATED guards in gdk
We now use function attributes for deprecation so the build-breaking
guards are no longer needed.
2011-11-09 22:01:00 -05:00
Matthias Clasen
b6ae763e25 Drop references to g_thread_init()
We are already requiring GLib 2.31, so g_thread_init() is never
needed anymore.
2011-11-09 18:36:35 -05:00
Kristian Rietveld
91ae19768e Bug 661997 - Gtk crashes when changing the TreeView model while ...
Simply stopping rubber banding in gtk_tree_view_set_model() eliminates
the crash.  Reported by Thomas Perl.
2011-11-09 08:45:34 +01:00
Ryan Lortie
7e22a5350c Don't implement GApplication mainloop
Let the default GApplication implementation take care of it.

https://bugzilla.gnome.org/show_bug.cgi?id=658805
2011-11-09 00:22:52 -05:00
Benjamin Otte
d1d2d71159 demos: Remove non-working code
It causes warnings, so it has to go.
The cursor doesn't change anyway, no matter if it's there or not.
2011-11-09 03:46:23 +01:00
Benjamin Otte
0333ed97fe tools: Work with deprecated APIs
We want to screenshot deprecated widgets, so we'd better not fail when
using them.
2011-11-09 03:23:43 +01:00
Benjamin Otte
8e4a45eb12 exanmples: Don't use deprecated API 2011-11-09 03:23:43 +01:00
Benjamin Otte
198a35fde5 testgtk: Remove deprecations from shapes test 2011-11-09 03:23:43 +01:00
Benjamin Otte
f41262320c testgtk: Don't use deprecated functions in properties example 2011-11-09 03:23:43 +01:00
Benjamin Otte
2783158f8d treeview: Do a simple replace for gdk_window_get_pointer()
Replace it with the equivalent gdk_window_get_device_position() with the
core pointer.
2011-11-09 03:23:43 +01:00
Benjamin Otte
c9c9099f83 gtk-demo: Remove excessive pointer querying 2011-11-09 03:23:43 +01:00
Benjamin Otte
439b9a3b1d queryimmodules: Actually fix deprecation warnings
The previous patch still caused warnings. Ooops. That's what you get for
not compiling with -Werror.
2011-11-09 03:23:43 +01:00
Michael Natterer
5ca2f06893 quartz: include all buttons' state in GdkEventMotion.state
(cherry picked from commit 3b5c5710da)
2011-11-09 00:36:21 +01:00
Michael Natterer
5f6c70f211 quartz: include all buttons' states in GdkEventButton.state
(cherry picked from commit a381e8ea62)
2011-11-09 00:26:30 +01:00
Michael Natterer
264241eb11 Bug 663605 - Fix event->state of many event types on quartz
Don't try to remember the current keyboard modifier and mouse button
states from the last event, because that isn't always right, and don't
set event.state = 0 for generated events. Instead, add private functions
to get the current states, and implement them with API that retrieves
these states independently from an event.
2011-11-08 21:52:49 +01:00
Benjamin Otte
28d3d6e039 treeview: Remove unused crack code
No, querying the pointer position in a draw callback is not a good idea.
No, setting FOCUSSED based on that position is not a good idea either.
2011-11-08 21:14:06 +01:00
Benjamin Otte
fd93e08a7c widget: Don't use deprecated symbols
Not even in deprecated functions!
2011-11-08 21:14:06 +01:00
Benjamin Otte
d41732b729 widget: Deprecate gtk_widget_get_pointer () 2011-11-08 21:14:06 +01:00
Benjamin Otte
a1fb2c863b treeview: Remove call to gtk_widget_get_pointer() 2011-11-08 21:14:06 +01:00
Benjamin Otte
28d0403f17 paned: Pass x/y position to update_drag()
This way we get the coordinates from the right device instead of using
any random device.
2011-11-08 21:14:06 +01:00
Benjamin Otte
80a23a2f2b paned: Remove MOTION_HINT_MASK
It's not needed anymore. GDK does culling of events for us.
2011-11-08 21:14:06 +01:00
Benjamin Otte
68bc011507 menuitem: WOrk around deprecation warnings 2011-11-08 21:14:06 +01:00
Benjamin Otte
a12e12a56d queryimmodules: Disable deprecaion warnings for deprecated header 2011-11-08 21:14:06 +01:00
Benjamin Otte
40db65a85b settings: Disable deprecaion warnings for deprecated header 2011-11-08 21:14:06 +01:00
Benjamin Otte
c9b1e00c30 layout: Work around deprecation warnings 2011-11-08 21:14:05 +01:00
Benjamin Otte
f9c664c69b immodule: Disable deprecations before including deprecated header 2011-11-08 21:14:05 +01:00