Commit Graph

4762 Commits

Author SHA1 Message Date
Cosimo Cecchi
37149668c0 xi2: fix thinko in variable type
https://bugzilla.gnome.org/show_bug.cgi?id=673644
2012-04-22 13:01:08 -04:00
Matthias Clasen
5a41b74c5c XI2: More logging for smooth scrolling
In addition to the delta, log device information.
This was triggered by
https://bugzilla.gnome.org/show_bug.cgi?id=673644
2012-04-22 13:00:47 -04:00
Rob Bradford
1aa2a7f821 wayland: Improve the error reporting in the Cairo GL surface code path 2012-04-19 17:59:09 +01:00
Rob Bradford
b5845514ec wayland: Improve error messages during SHM buffer creation
Use g_critical rather than fprintf and and also grab the error messages from
errno and from Cairo
2012-04-19 17:58:59 +01:00
Cosimo Cecchi
8febbcaf6a gdk: add missing GDK_VERSION_3_6 symbol 2012-04-18 13:23:29 -04:00
Rob Bradford
cd831b1390 wayland: Expose GdkWaylandDisplayManager as a public GType
This permits a runtime test of whether we are running on the Wayland platform
or not.
2012-04-17 18:40:41 +01:00
Rob Bradford
6f9ad538d9 wayland: Rename GdkScreenWayland to GdkWaylandScreen
This makes it consistent with the functions in the vtable and also consistent
with other backends.
2012-04-17 14:11:31 +01:00
Rob Bradford
fc58ff1e6a wayland: Rename GdkDisplayWayland to GdkWaylandDisplay
This makes it consistent with the functions in the vtable and also consistent
with other backends.
2012-04-17 14:11:31 +01:00
Benjamin Otte
a52336bedc gdk: Add deprecation/availability macros for 3.6 2012-04-17 08:59:07 +02:00
Kristian Høgsberg
ea78bcb7c5 wayland: Prefer X11 backend over Wayland
https://bugzilla.gnome.org/show_bug.cgi?id=674102
2012-04-16 18:53:54 +02:00
Rob Bradford
71ca53993e wayland: Use an ARGB buffer for the Cairo and SHM surface 2012-04-16 15:09:14 +01:00
Rob Bradford
cddfcf1418 wayland: Force an expose for the whole area when scrolling 2012-04-16 15:09:14 +01:00
Rob Bradford
cdf5c2af62 wayland: Add support for rendering into an SHM buffer with Cairo image backend
The first version of this change included a bug that meant that if you don't
compile for any other backend then it wouldn't search for cairo. Credit for
identifying the bug goes to darxus@chaosreigns.com.

Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=672361
2012-04-16 15:09:14 +01:00
Rob Bradford
6977ea0bd1 wayland: Move the buffer creation to the cairo surface creation 2012-04-16 14:12:51 +01:00
Rob Bradford
d9ca1a8636 wayland: Move the finalize function to allow a clear logical block of code 2012-04-16 14:12:51 +01:00
Rob Bradford
a8d03c9970 wayland: Remove unused member from struct 2012-04-16 14:12:51 +01:00
Matthias Clasen
050cba6a31 Fix malformed doc comments
Most of these are forgotten :'s and similar details
which gtk-doc now warns about.
2012-04-12 21:12:16 -04:00
Pavel Holejsovsky
94116aec8e Fix sourcedir!=builddir .gir build from source tarball
Setting -I$(top_builddir) before -I$(top_srcdir) causes that
g-ir-scanner picks up boxing definitions generated by glib-mkenums.

https://bugzilla.gnome.org/show_bug.cgi?id=672133
2012-04-11 20:05:10 +02:00
Kristian Rietveld
7e778aa033 [quartz] Fix manual resizing of windows
In the Quartz backend, there are two methods by which windows are
resized. The first method is fully handled by Quartz and does not appear
in the event stream the application resizes. The second method is when
we resize windows by ourselves. In OS X this happens when a GTK+ resize
grip is used. This resize grip is larger than the Quartz resize grip.
When the resize is started outside the "Quartz area", we have to handle
it by ourselves.

This patch fixes this manual window resizing by ignoring events while we
are in the process of resizing (such that the events actually arrive at
the sendEvent handler of GdkQuartzWindow where this resize is handled).
When the resize has finished we break all grabs such that GDK is not
stuck thinking the cursor is still in the resize window.
2012-04-10 21:54:03 +02:00
Kristian Rietveld
d5ac2bd372 Export break_all_grabs() within Quartz backend
Function was renamed to _gdk_quartz_events_break_all_grabs().
2012-04-10 21:50:07 +02:00
Benjamin Otte
826360a214 x11: Add suggested braces around empty body in 'if' statements 2012-04-07 13:01:24 +02:00
Matthias Clasen
2ef4b930c7 Don't force BUTTON1_MASK on non-touch events
This problem was pointed out by Hans de Goede in
https://bugzilla.gnome.org/show_bug.cgi?id=673458
2012-04-06 20:25:21 -04:00
Matthias Clasen
432f0151eb xi2: Remove touchscreen heuristics
It doesn't make sense to consider a device a touchscreen if it
doesn't have any touch classes. Even if it has 'touch' in its
name.
https://bugzilla.gnome.org/show_bug.cgi?id=673440
2012-04-06 20:00:35 -04:00
Rui Matos
7b0fd635fa x11: Don't ignore button releases after a wmspec move/resize
_gdk_x11_moveresize_configure_done() isn't called for wmspec
moves/resizes so we don't have a way to notice when a wmspec
move/resize ends and consequently untrigger the sending of
_NET_WM_MOVERESIZE_CANCEL which results in this message always being
sent on the next button release event. In that case we are marking
that event as handled so it isn't processed further which breaks
button press/release event handling in several widgets.

To fix this we simply allow the normal event handling machinery to run
after sending the _NET_WM_MOVERESIZE_CANCEL message.

https://bugzilla.gnome.org/show_bug.cgi?id=673328
2012-04-05 10:12:16 +02:00
Rui Matos
987baaba5c x11: Set GdkToplevelX11.have_focused on creation
Since the order in which _NET_WM_STATE and _NET_WM_DESKTOP are set, or
even *if* they are set, isn't defined, we could end up unsetting
GDK_WINDOW_STATE_FOCUSED given that both handlers for these two X
properties end up doing window state changes for all states. As we
want GDK_WINDOW_STATE_FOCUSED to be set by default we need to set its
master flag by default as well.

https://bugzilla.gnome.org/show_bug.cgi?id=673125
2012-04-04 17:14:06 +02:00
Alexander Larsson
c5a8f3cb61 gdk: Remove GdkDisplay->ignore_core_pointer
This is not used anywhere anymore
2012-04-03 11:37:42 +02:00
Alexander Larsson
24f9ca92ab win32: Fix up wintab support
We now have a proper MASTER/SLAVE input device split, where
the masters are virtual core input devices and we add fake hw
slave devices for the system pointer and real slave devices for
wintab devices.

We also set the proper source_device on the events so you can
tell which device sent it and properly decode the axis info.
2012-04-03 11:37:42 +02:00
Alexander Larsson
ddd24761fd Add _gdk_device_get_axis_info
This is needed for the win32 master/slave handling code.
2012-04-03 11:37:41 +02:00
Matthias Clasen
88a1d4d5a1 x11: Deal better with L-shaped monitor arrangements
The code for calculating the per-monitor workarea was ignoring
the fact that the EWMH workarea property can only handle rectangular
workareas, and thus can't really do justice to general monitor
arrangements. As a workaround, we ignore it for anything but
the primary monitor. And we ignore it for the primary monitor
as well if it does not even cover it.

https://bugzilla.gnome.org/show_bug.cgi?id=672163
2012-03-23 09:09:14 -04:00
Benjamin Otte
bd55519f7e gdk: A TOUCHPAD device behaves like a mouse
and not like a TOUCHSCREEN. So treat it like that.

https://bugzilla.gnome.org/show_bug.cgi?id=672009
2012-03-20 02:07:29 +01:00
Mathias Hasselmann
ebc2bda82b wayland: hide predefined_atoms
This is a private symbol and should not be public.
2012-03-16 22:45:51 +01:00
Alexander Larsson
6d99cdf28c win32: Ensure we update GDK_WINDOW_STATE_FOCUSED
When windows get activated/inactivated we need to update STATE_FOCUSED.
Without this the backdrop theme state will not work.
2012-03-16 11:34:58 +01:00
Bastien Nocera
5c22e0a11e gdk: Update translator comment for "keyboard label" 2012-03-15 16:05:00 +01:00
Matthias Clasen
de62a1096b Drop support for pre-R6 X
X11 R6 was released in 1995 - time to let go.
2012-03-10 23:27:21 -05:00
Matthias Clasen
82041de9b5 Drop unneeded XI2 defines
The X headers don't use these defines anywhere.
2012-03-10 23:13:19 -05:00
Kalev Lember
526fc2fbdb win32: Finish making query_state() vfunc a void vfunc
Commit 114b45c converted all the backends but missed a few details in
gdkdevice-win32. This fixes it up.
2012-03-10 13:40:42 +02:00
Benjamin Otte
02f9d51177 gdk: clean up logic error
Fallout from previous query_state() cleanups.
2012-03-09 12:36:11 -05:00
Benjamin Otte
114b45c7eb gdk: Make query_state() vfunc a void vfunc
... and make sure the backends implement it that way.

query_state() return value was ignored in all of GDK and caused crashes
when it failed.
2012-03-09 13:23:05 +01:00
Matthias Clasen
9d1688680c xi2: Don't reset scroll valuators too often
According to XInput gurus, a motion event without valuators
does not invalidate the stored value, so we should keep it.

https://bugzilla.gnome.org/show_bug.cgi?id=671659
2012-03-08 22:35:43 -05:00
Benjamin Otte
858a654676 x11: Avoid spurious focus events on grabs
We want to avoid handling focus events for the private focus window,
otherwise the keyboard grab taken by for example buttons will cause a
spurious FOCUS_OUT/FOCUS_IN on the toplevel.

The code that did this seems to have been lost in the XI2 transition for
GTK3.

This patch reapplies db4a6040af which was
backed out in 18406b7b04 to give
developers a chance to get their X servers fixed. As we want to get this
bugfix in for 3.4, we need to commit it now.

https://bugzilla.gnome.org/show_bug.cgi?id=657578
2012-03-07 15:35:21 +01:00
Rob Bradford
c6b0e91e87 wayland: Add some useful comments explaining the cairo surface behaviour 2012-03-06 21:24:41 +00:00
Rob Bradford
ff2acecac6 wayland: Add NULL warning check to _gdk_wayland_window_set_device_grabbed 2012-03-06 21:24:41 +00:00
Rob Bradford
99e0f4b62c wayland: Don't try and reset the pointer window grab if there wasn't one 2012-03-06 21:24:41 +00:00
Alexander Larsson
7430559736 win32: Remove some unused input stuff to make win32 build again
Input events doesn't quite seem to work though, so it needs some fixing.
2012-03-06 12:04:36 +01:00
Matthias Clasen
404359f2dd Fix symbol lists 2012-03-05 08:09:39 -05:00
Matthias Clasen
aa60e02795 gdk: Remove an unused enumeration
We don't have any API using the GdkExtensionMode enumeration, so
no point in carrying it in the headers.
2012-03-04 20:05:42 -05:00
Matthias Clasen
3dd5e88c07 xi2: Normalize scroll deltas
XI2 provides us with an increment for each scroll valuator,
and by dividing the delta by the increment, we obtain normalized
values in some abstract 'scroll unit'.

For mouse wheels, the evdev driver reports an increment of -1,
so doing this division fixes the inverted scrolling with wheels
that we've seen recently.
2012-03-04 19:12:27 -05:00
Matthias Clasen
0e07d6589e gdk: Don't drop the emulating_pointer flag
When manually copying touch events, we must not forget the
emulating_pointer flag.
2012-03-04 11:24:51 -05:00
Bastien Nocera
f3b899fc83 x11: Simplify XI2 mods state
https://bugzilla.gnome.org/show_bug.cgi?id=671070
2012-03-04 01:12:06 -05:00
Bastien Nocera
deea79f4e4 x11: Correct GroupSwitch mask
base | latched | locked is incorrect for the group mask,
and the clamping has already been applied.

https://bugzilla.gnome.org/show_bug.cgi?id=671070
2012-03-04 01:12:06 -05:00