Commit Graph

6141 Commits

Author SHA1 Message Date
William Hua
c2afa674e2 mir: stop forwarding motion events to subwindows 2015-02-05 17:26:19 +01:00
William Hua
901bc2957d mir: generate leave events for transient children 2015-02-05 17:26:19 +01:00
Marco Trevisan (Treviño)
737e598a17 mir: use monitor plug names more similar to the ones used in Xmir 2015-02-05 17:26:18 +01:00
Marco Trevisan (Treviño)
9a84c3e0f5 mir: only paint background if window has one 2015-02-05 17:26:18 +01:00
Marco Trevisan (Treviño)
38d46aacae mir: use old scrolling system if we get simple integer values 2015-02-05 17:26:18 +01:00
William Hua
584cfff90a mir: end the current grab on ungrab 2015-02-05 17:26:18 +01:00
William Hua
e843d94405 mir: only render non-top-level transients. 2015-02-05 17:26:18 +01:00
Marco Trevisan (Treviño)
9abf990656 mir: handle new MirCloseSurfaceEvent 2015-02-05 17:26:18 +01:00
William Hua
5ac5f6f81a mir: reset cursor_inside on hide/withdraw
Without this, we generate incorrect crossing events for transient
windows.
2015-02-05 17:26:18 +01:00
William Hua
8e0abb4bac mir: disable some debug output 2015-02-05 17:26:18 +01:00
William Hua
4f19be1c82 mir: skip windows that aren't visible 2015-02-05 17:26:18 +01:00
Marco Trevisan (Treviño)
05de5b02cb mir: fix IsModifierKey definition 2015-02-05 17:26:18 +01:00
Marco Trevisan (Treviño)
345140008e mir: check the log events env variable just once 2015-02-05 17:26:18 +01:00
Marco Trevisan (Treviño)
7e5b216511 mir: set event source device as well 2015-02-05 17:26:18 +01:00
William Hua
7c2e3a812a mir: fix time conversion macro 2015-02-05 17:26:17 +01:00
Marco Trevisan (Treviño)
54f9263f19 mir: implement stub _gdk_mir_keymap_key_is_modifier
Using IsModifierKey for now
2015-02-05 17:26:17 +01:00
Marco Trevisan (Treviño)
a8b1e81816 mir: check (using simple keycode checking) if we're handling a modifier key 2015-02-05 17:26:17 +01:00
Marco Trevisan (Treviño)
9e2eb5d2f6 mir: compute the modifiers using the saved button_state on key events 2015-02-05 17:26:17 +01:00
Marco Trevisan (Treviño)
7d4066de41 mir: add a NANO_TO_MILLI conversion macro 2015-02-05 17:26:17 +01:00
Marco Trevisan (Treviño)
6b6af59b9b mir: properly converts mir nanoseconds timestamps to milliseconds 2015-02-05 17:26:17 +01:00
Marco Trevisan (Treviño)
cb19fd50cb mir: use actual events time 2015-02-05 17:26:17 +01:00
William Hua
948afc68f6 mir: add timestamps to generated GdkEvents
We need this because it fixes menu activation. The menu activation code
looks at the time between events to determine if mouse clicks happen too
quickly.
2015-02-05 17:26:17 +01:00
William Hua
f1cfd23cd2 mir: pass motion events down to transient children 2015-02-05 17:26:17 +01:00
William Hua
e2320678ae mir: use parent_window's impl for GDK_INPUT_ONLY windows
Fixes a crash that occurs when the user selects text.
2015-02-05 17:26:17 +01:00
Carlos Garnacho
6f07d5e761 x11: Detect libinput touchpads
These aren't reported as XIDependentTouch devices, so make it poke a
property that's specific to touchpads managed by the libinput driver.
2015-02-02 13:55:38 +01:00
Víctor Manuel Jáquez Leal
64f26db038 gtkx: add missing header
The header file gdk/x11/gdkx-autocleanups.h is not installed, but
it is required by gdkx.h

https://bugzilla.gnome.org/show_bug.cgi?id=743640
2015-02-02 13:47:06 +01:00
Alexander Larsson
a71ff33266 gdk: Add support for g_autoptr()
https://bugzilla.gnome.org/show_bug.cgi?id=743640
2015-02-02 09:28:22 +01:00
Matthias Clasen
31d3be96e4 Be safe against stray booleans
Since gboolean is a typedef for int, the compiler won't complain
about gdk_window_set_event_compression (w, 2). So, make it work.

https://bugzilla.gnome.org/show_bug.cgi?id=742566
2015-02-01 17:30:10 -05:00
Matthias Clasen
561ff51abb Fix an oversight
Commit ff256956b2 introduced a frame_clock_events_paused
flag, but only ever set it to TRUE, instead of unsetting it when
events are resumed. This was leading to assertion failures in
_gdk_display_unpause_events().
2015-01-30 18:42:06 -05:00
Tom Hughes
ff256956b2 Resume events when disconnecting from a frame clock
If we are disconnecting from a frame clock that has paused event
processing and hasn't issued a resume yet make sure we resume the
events or they will stay blocked forever.

https://bugzilla.gnome.org/show_bug.cgi?id=742636
2015-01-30 17:32:58 -05:00
Carlos Garnacho
ea983404ec win32: Don't check the position of a NULL device
This function is given a barely setup GdkEvent, so the GdkDevice field
is still unset, causing warnings and misbehaviors when the position
is queried for it.

Given that the wintab GTK+ code seems to rely somewhat hard on the wintab
device managing the pointer cursor, query the pointer position from the
pointer itself.

https://bugzilla.gnome.org/show_bug.cgi?id=743330
2015-01-28 16:59:29 +00:00
Carlos Garnacho
1543890569 win32: Ensure we can create a window for wintab
The window used NULL as a parent window, which defaults internally to
using the root window of the default screen. But at the time wintab is
initialized, there is no default display/screen yet.

Fix this by retrieving this information from the given GdkDeviceManager,
so we don't have to wait for the display to be in place before
initialization.

https://bugzilla.gnome.org/show_bug.cgi?id=743330
2015-01-28 16:59:29 +00:00
Rui Matos
2dd07f346a gdkscreen-wayland: Don't leak wl_output objects
https://bugzilla.gnome.org/show_bug.cgi?id=743633
2015-01-28 17:17:09 +01:00
Niels Nesse
00834786be GDK GL context's should associate with "window->impl_window" not "window"
In some layouts this inconsistency results in crashes in
gdk_gl_texture_from_surface() since it uses gdk_gl_context_get_window() but
the returned window is not the same as the one that is being painted so
"window->current_paint.surface" is NULL. I saw this problem when packing a
GdkGLArea into a GtkPaned.

https://bugzilla.gnome.org/show_bug.cgi?id=743146
2015-01-28 12:00:30 +00:00
Niels Nesse
27cf0fa34c Fix core context creation in GdkGLContext
- Specifically request GL version when creating context. Just specifying core
profile bit results in the requested version defaulting to 1.0 which causes
the core profile bit to be ignored and an arbitrary compatability context to be
returned.

- Fix GL painting by removing GL calls that have been depricated by the 3.2 core
profile.

- Additionally remove glInvalidateFramebuffer() call, it is not supported by 3.2
core.

https://bugzilla.gnome.org/show_bug.cgi?id=742953
2015-01-28 12:00:30 +00:00
Matthias Clasen
5fc8cf4331 x11: Handle obsolete selection requests without crashing
The ICCCM says:

If the specified property is None, the requestor is an obsolete client.
Owners are encouraged to support these clients by using the specified
target atom as the property name to be used for the reply.

Lets do that, instead of crashing.

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

The previous fix for this issue in 732af31424 was incomplete.
2015-01-24 19:32:52 -05:00
Matthias Clasen
95fad690d2 wayland: Don't claim to support selection notification
We don't support selection notification, so don't claim
we do, only to fail later.

https://bugzilla.gnome.org/show_bug.cgi?id=743229
2015-01-24 17:25:43 -05:00
Matthias Clasen
b6551c84c9 Initialize variables
No need to risk valgrind complaints about initialized
values.

https://bugzilla.gnome.org/show_bug.cgi?id=743422
2015-01-24 16:45:04 -05:00
Carlos Garnacho
121fddc4d2 x11: Fetch vendor/product identifiers for input devices
These are retrieved from XInput device properties.

https://bugzilla.gnome.org/show_bug.cgi?id=740758
2015-01-19 15:09:19 +01:00
Carlos Garnacho
5e53676b46 device: Add property/getters for vendor/product identifiers
These are a construct only properties, expected to be filled in from
platform specific code.

https://bugzilla.gnome.org/show_bug.cgi?id=740758
2015-01-19 15:09:19 +01:00
Matthias Clasen
47e5e1c72d Fix a typo in the docs
https://bugzilla.gnome.org/show_bug.cgi?id=743037
2015-01-18 15:26:49 -05:00
Matthias Clasen
9c1063f602 broadway: Only use abstract sockets when they are supported
GIO has a function to check whether abstract sockets are
supported, so use it. This should make broadway work on
Freebsd again.

https://bugzilla.gnome.org/show_bug.cgi?id=742980
2015-01-18 15:24:30 -05:00
Matthias Clasen
811d602842 Make Broadway work on freebsd
It seems that posix_fallocate gives an ENODEV error when
called on an fd opened with shm_open on freebsd. Fix up
the error check to only trigger if we get ENOSPC.

https://bugzilla.gnome.org/show_bug.cgi?id=742980
2015-01-18 15:15:37 -05:00
Matthias Clasen
cf277fabb5 Remove some outdated references
We shouldn't recommend gtk_widget_modify_bg() or
gtk_style_set_background() anymore.
2015-01-18 12:41:07 -05:00
Maks Naumov
6113504495 Fix event->button.y_root when using mouse buttons and dnd canceled
Signed-off-by: Maks Naumov <maksqwe1@ukr.net>

https://bugzilla.gnome.org/show_bug.cgi?id=742785
2015-01-17 16:29:17 -05:00
Matthias Clasen
48865fb9d9 Prefer the Wayland backend
This does not affect X11 sessions, but has the advantage that
we get much more testing of the Wayland backend in Wayland
sessions.
2015-01-17 01:03:10 -05:00
Maks Naumov
430ea2fff6 Properly ignore BadWindow and BadDrawable in get_child_info_handler()
Signed-off-by: Maks Naumov <maksqwe1@ukr.net>

https://bugzilla.gnome.org/show_bug.cgi?id=742771
2015-01-11 14:33:10 -05:00
Emmanuele Bassi
a834078804 x11/gl: Do not specify the GLX context version
If we use GDK_GL_PROFILE_3_2_CORE we are asking for a core profile
according to the GLX_ARB_create_context_profile extension. For that,
we pass the GLX_CONTEXT_CORE_PROFILE_BIT_ARB value for the
GLX_CONTEXT_PROFILE_MASK_ARB attribute.

The specification for the extension says that:

  If the requested OpenGL version is less than 3.2,
  GLX_CONTEXT_PROFILE_MASK_ARB is ignored and the functionality
  of the context is determined solely by the requested version.

Since we're asking for a core profile, we assume a GL version greater
than or equal to 3.2; thus, we don't need to specify the
GLX_CONTEXT_MAJOR_VERSION_ARB or the GLX_CONTEXT_MINOR_VERSION_ARB
attributes, and instead just rely on whatever version GLX gives us.

This seems to work around a strange issue in Mesa; if we ask for a core
profile and any version > 3.0, we get broken rendering on any shared
context we create.
2015-01-10 00:07:51 +00:00
Jasper St. Pierre
ecc64f63e4 gdkeventsource-wayland: Fix style 2014-12-28 18:13:34 -08:00
Rico Tzschichholz
07efae7288 mir: Add missing reference to gdkmir-private.h 2014-12-28 13:34:16 +01:00