Commit Graph

4420 Commits

Author SHA1 Message Date
Cosimo Cecchi
f7c188c019 API: add accessors for GdkEvent fields
Add accessors for the following fields: button, keyval, keycode, scroll
direction, click count.

https://bugzilla.gnome.org/show_bug.cgi?id=657384
2011-08-28 19:50:34 -04:00
Daniel Nicoara
99f489b5ef wayland: Acquire cairo device during operations that need the GL context 2011-08-22 16:32:06 -04:00
Greg Hellings
bd26ce1db6 Install gdk/win32 headers
Added install commands for the gdk/win32 headers as referenced from
gdkwin32.h.

https://bugzilla.gnome.org/show_bug.cgi?id=653964
2011-08-15 13:00:14 +03:00
John (J5) Palmieri
c3e0a0035e [gi] annotate gdk_container_set_user_data to take a GObject
* this allows bindings to correctly marshal the parameter
2011-08-14 08:07:10 -04:00
John Ralls
f84c787be4 Bug 655122: Lion Crashes during resize
Move resizing detection to a separate function and on 10.7 detect
resizes on all edges so that they don't result in grabs.
2011-08-13 15:30:59 -07:00
John Ralls
fc7dfd7246 Bug 655122: Detect OSX version for handling version-dependent special
cases (the one at hand is window resizing, which is handled differently
on OSX 10.7 from earlier versions).
2011-08-13 15:29:11 -07:00
Matthias Clasen
2ba9c4b4a7 Make focus rectangles optional
This commit introduces a new setting, gtk-visible-focus, backed
by the Gtk/VisibleFocus X setting. Its three values control how
focus rectangles are displayed.

'always' is equivalent to the traditional GTK+ behaviour of always
rendering focus rectangles.

'never' does what it says, and is intended for keyboardless
situations, e.g. tablets.

'automatic' hides focus rectangles initially, until the user
interacts with the keyboard, at which point focus rectangles
become visible.

https://bugzilla.gnome.org/show_bug.cgi?id=649567
2011-08-10 16:34:20 +02:00
Pavel Holejsovsky
21a5b038a7 Add annotations so that methods are properly paired to objects.
Add type annotations to 1st argument of gdk_x11_* functions so that they are
properly recognized as methods of GdkX11 objects.

https://bugzilla.gnome.org/show_bug.cgi?id=655496
2011-08-01 11:09:49 +02:00
Pavel Holejsovsky
0893a3fd39 Enable introspection of X11-specific functions and methods
Functions dealing with native Xlib types were (skip)ed because
gobject-introspection did not have correct Xlib types declarations.
They are corrected now, so these GdkX11 functions can be enabled back
again.

https://bugzilla.gnome.org/show_bug.cgi?id=655495
2011-08-01 11:09:39 +02:00
Kristian Rietveld
58ba8a7c7f quartz: use already existing current_button_state variable 2011-07-30 23:01:38 +02:00
Kristian Rietveld
a979e414fb quartz: remove _gdk_quartz_events_get_current_event_mask 2011-07-30 23:01:38 +02:00
Kristian Rietveld
c9f6c7645c quartz: return modifiers instead of an event mask ... 2011-07-30 23:01:37 +02:00
Kristian Rietveld
ceca333309 quartz: Remove MAC_OS_X_VERSION_MIN_ALLOWED ifdef
I tried to suppress compiler warnings on pre-10.6 machines this way,
but it defeats its purpose when you compile for pre-10.6 machines on
a 10.6 machine.  For now, we have to live with the warnings when
compiling on/for pre-10.6 machines, there does not seem an easy and proper
way to suppress the warnings.
2011-07-28 17:44:02 +02:00
Michael Hutchinson
786521d5a8 Bug 655074 - Fix crash with undecorated windows on MacOS Lion 2011-07-25 12:33:26 +02:00
Matthias Clasen
2937a875a0 Ditch some long dead perl cruft 2011-07-23 13:44:45 -04:00
Patrick Welche
0388781e8f XK_Num_Lock is called GDK_KEY_Num_Lock in this source tree. 2011-07-22 19:19:33 +01:00
Matthias Clasen
25a4e8e7de Don't return a value from a void function
Reported in bug 654720, patch by Brian Cameron.
2011-07-17 18:05:17 -04:00
Carlos Garnacho
b5f30143ed x11: Skip GenericEvents with no cookie data in the xi2 device manager
https://bugzilla.gnome.org/show_bug.cgi?id=653947

It could happen that a cookie event has been already allocated/freed
in an event filter, as it can't be allocated a second time, all GDK
can do is skipping the event. Spotted by Guillaume Desmottes.
2011-07-15 18:33:44 +02:00
Carlos Garnacho
6aab48ead0 gdk/x11: Add gdk_x11_device_manager_lookup()
This function can be used to find the GdkDevice wrapping
an XInput2 device ID. For core devices, the Virtual Core
Pointer/Keyboard IDs (2/3) may be used.
2011-07-15 18:14:38 +02:00
Carlos Garnacho
f90c154472 gdk/x11: Add gdk_x11_device_get_id()
This function can be used to find out the XInput2 device ID
behind a GdkDevice, mostly useful when you need to interact
with say Clutter, or raw libXi calls.
2011-07-15 18:14:38 +02:00
John Ralls
86794ce008 Bug 653450 - gtkfilechooser crashes when added favorite
Ensure that display is set during drag-and-drop, and that string lists'
memory is zeroed after allocation to prevent g_strfreev() from
over-running.
2011-07-14 14:17:51 +02:00
Juan Pablo Ugarte
704dd8327f Fixed bug #654125 "gdkoffscreenwindow set any impl handlers to null but adhoc gdk_window_set_* do not cope" 2011-07-08 19:27:00 -03:00
Javier Jardón
32e00d1f43 Use AM_CPPFLAGS instead the obsolete INCLUDES 2011-07-06 15:58:32 +01:00
Joachim Breitner
317d7a1f54 docs: Remove mention of client messages 2011-07-05 16:08:04 -04:00
Matthias Clasen
c22fb1684c GdkKeymap: Prevent an infinite loop in the non-XKB case
Somehow the increment got lost, as comparison with the 2.x code
shows.
2011-06-30 14:45:16 -04:00
Scott Moreau
24f1132671 Track wayland protocol changes. 2011-06-23 07:06:35 -04:00
Matthias Clasen
0c162851ed Add a missing break statement 2011-06-14 21:59:55 -04:00
Matthias Clasen
5254fbacfb Avoid an oob read 2011-06-14 21:56:50 -04:00
Carlos Garnacho
d3274e8e06 xi2: Handle XIM modules that replace events
Fixes Bug 645993 - XIM has wierd behaviors. Some XIM modules
filter every key event, possibly replacing it with their own
one. These events usually have serial=0, so make
GdkDeviceManagerXI2 also listen on these.
2011-06-13 07:16:16 -04:00
Javier Jardón
7c688cb8a6 gdk: Use const instead G_CONST_RETURN 2011-06-10 13:07:54 +01:00
Benjamin Otte
e45230ad39 gdk: Make background changes queue a repaint
For client-side windows, we need to queue a repaint when the background
changes. For native windows, the windowing system does take care of it,
but client-side windows are our own, so we gotta do it manually.

https://bugzilla.gnome.org/show_bug.cgi?id=652102
2011-06-09 05:51:53 +02:00
Benjamin Otte
2a4c361831 gdk: Don't set backgrounds on input-only windows
It doesn't make sense to allow a background on input-only windows, so
instead of setting it and then never using it, we just don't ever set
it.
2011-06-09 05:51:53 +02:00
Chun-wei Fan
d07907d2de Update Windows Resource template information 2011-06-07 11:16:57 +08:00
Bastien Nocera
7a0dc3c72d gdk: Update keysyms list from latest X.org headers
Fixed the touchpad on/off keybindings in gnome-settings-daemon.
https://bugzilla.gnome.org/show_bug.cgi?id=651706
2011-06-06 21:15:53 -04:00
Carlos Garnacho
e89d6b8741 configure: Check for XGetEventData()
This is a call only available in recent libX11, only the XI2 code
depends on this within GDK, but XI2 implies having GenericEvents
available too.
2011-05-27 11:53:26 +02:00
Carlos Garnacho
3285605c54 gdk: do not fallback to event->xany.window in GdkEventTranslator
This is already done in gdk_event_source_get_filter_window(), and
could lead to wrong event assignment if an event translator happens
to return a window for an event it doesn't handle.
2011-05-27 11:53:04 +02:00
Matthias Clasen
f30efa7759 Remove unused function attributes from symbol files 2011-05-22 23:39:48 -04:00
Kristian Rietveld
cd3896e10e quartz: actually register gdk_quartz_display_dispose 2011-05-22 12:29:37 +02:00
Kristian Rietveld
dfff35423f quartz: fix a typo 2011-05-22 12:27:38 +02:00
Carlos Garnacho
1b53741e4c gdk: Document gdk_window_add_filter()+XGenericEvents behavior 2011-05-18 22:34:33 +02:00
Carlos Garnacho
a529568f79 gdk: Get the right filter window for XI2 events
GdkDeviceManagerXI2 now implements GdkEventTranslator::get_window,
retrieving the right window from the contained XIEvent.
2011-05-18 22:34:33 +02:00
Carlos Garnacho
55cc9f3339 gdk: Add _gdk_x11_event_translator_get_window()
This method can be implemented by event translators so they
return the right window from XGenericEventCookie events, as
ev->xany.window isn't meaningful for these.

GdkEventSource now also uses this to find out the right window
filters to apply.
2011-05-18 22:34:33 +02:00
Carlos Garnacho
53d77a829a gdk: Move XGetEventData() call to GdkEventSource
This function should be called just once across every possible
event translator and GdkFilterFunc that wants to deal with
any cookie event.
2011-05-18 22:34:32 +02:00
Colin Walters
7bc2f539d0 Explicitly declare internal reserved bits in GdkModifierType
XKB and GDK both add "internal" bits to GdkModifierType.  In C,
this typically doesn't cause problems as bitfields are just integers,
and there's no validation.  However for bindings, it's normal to
convert enumerations to "native" enumeration types, which don't
support unknown bits.  See bug 597292.

https://bugzilla.gnome.org/show_bug.cgi?id=634994
2011-05-16 12:35:40 -04:00
Colin Walters
931e8e38ef gdk_display_get_pointer: Screen out parameter is (transfer none) 2011-05-16 12:35:40 -04:00
Kristian Høgsberg
2ebdcf5f37 wayland: Track wayland API changes 2011-05-08 13:20:11 -04:00
Matthias Clasen
5b9e402cf3 Fix a typo in !HAVE_XCURSOR code paths
Patch by Victor Oliveira,
http://bugzilla.gnome.org/show_bug.cgi?id=649665
2011-05-07 12:01:04 -04:00
Javier Jardón
1fcfa91ee3 gdk/x11/gdkcursor-x11.c: Use GdkRGBA instead GdkColor 2011-05-04 17:58:17 +01:00
Kristian Rietveld
8285c7f60f GdkWindow: remove unused variable 2011-05-04 07:31:39 +02:00
Carlos Garnacho
2a1a969d23 GdkWindow: Fix gdk_window_set_[device_]cursor() issues with root/foreign windows
It could be the case that gdk_window_set_cursor() is called on
pointers not yet known to the device tracking code in GdkDisplay,
so update the cursor on all master pointers.

The code actually updating the cursor for the given window has
been refactored out to gdk_window_set_cursor_internal(), used
in gdk_window_set_device_cursor() as well, which makes it handle
root/foreign windows too.

https://bugzilla.gnome.org/show_bug.cgi?id=649313
2011-05-04 01:00:42 +02:00