Commit Graph

5865 Commits

Author SHA1 Message Date
Carlos Garnacho
2c36dc7592 wayland: Add internal API to unset a touch implicit grab
This removes both the wayland specific accounting, and the Gdk implicit
grab tracking.

https://bugzilla.gnome.org/show_bug.cgi?id=731380
2014-08-26 13:39:41 +02:00
Carlos Garnacho
6f789d5a78 wayland: Update the display serial on touch down/up events
https://bugzilla.gnome.org/show_bug.cgi?id=734374
2014-08-26 13:33:30 +02:00
Carlos Garnacho
537ff9fcad wayland: Improve implicit grab serial retrieval
_gdk_wayland_device_get_button_press_serial() has been replaced by
_gdk_wayland_device_get_implicit_grab_serial(), which takes a touch/pointer
event and figures out the relevant serial, and
_gdk_wayland_device_get_last_implicit_grab_serial() which returns
the most recent serial.

The button press serial was currently used when operating popping up
xdg_shell/surface popups and window menus, so this is now touch aware, of
some sort.

https://bugzilla.gnome.org/show_bug.cgi?id=734374
2014-08-26 13:32:46 +02:00
Carlos Garnacho
5b8641740b wayland: Store per-touch touch_down serial
https://bugzilla.gnome.org/show_bug.cgi?id=734374
2014-08-26 13:32:16 +02:00
Carlos Garnacho
12398c5d74 wayland: rename internal touch management functions
These functions arent quite related to the device manager, so rename these
more conveniently.

https://bugzilla.gnome.org/show_bug.cgi?id=734374
2014-08-26 13:31:52 +02:00
Carlos Garnacho
8f2d8dfa3b wayland: Protect against invalid keymaps gotten from the compositor
If the compositor sends a keymap that fails on "compilation",
xkb_keymap_new_from_string() returns NULL, which makes xkb_state_new()
crash when assuming there is a keymap.

In these cases, gdk must remain with a xkb_state to handle modifiers/keys
properly, so warn about the invalid keymap string, and keep the previous
keymap (currently initialized to "us")

https://bugzilla.gnome.org/show_bug.cgi?id=735389
2014-08-26 13:04:08 +02:00
Carlos Garnacho
ab6f771413 wayland: create a wl_subsurface interface for GDK_WINDOW_SUBSURFACE windows
This subsurface is currently dependent on the transient_for parent, so the
subsurface is repositioned relative to it.

https://bugzilla.gnome.org/show_bug.cgi?id=729215
2014-08-26 12:58:13 +02:00
Carlos Garnacho
ad9da99d86 wayland: Acquire wl_subcompositor interface
This will be needed for GDK_WINDOW_SUBSURFACE windows.

https://bugzilla.gnome.org/show_bug.cgi?id=729215
2014-08-26 12:58:13 +02:00
Carlos Garnacho
84414f0381 gdk: Add GDK_WINDOW_SUBSURFACE window type
This window type can only be used on wayland so far, so NULL is returned
if it's attempted to be used on any other windowing backend.

https://bugzilla.gnome.org/show_bug.cgi?id=729215
2014-08-26 12:58:13 +02:00
Carlos Garnacho
e206b72635 wayland: Make toplevels' X/Y coordinates be 0
To all effects each window has its own "root" coordinates system, so set
toplevels at 0,0 in that coordinate system, so root coordinate calculations
are locally right.

https://bugzilla.gnome.org/show_bug.cgi?id=729215
2014-08-26 12:58:13 +02:00
Jesse van den Kieboom
ec17a649ae gdkwindow-quartz: Support native fullscreen mode
This implements native fullscreen mode on OS X >= 10.7. This patch
adds tracking of the fullscreen mode if externally modified, as well
as toggling the native fullscreen mode of the window as needed.
2014-08-25 12:52:47 +02:00
Jasper St. Pierre
cd173a1b19 xdg-shell: Bump version 2014-08-22 12:06:09 -04:00
Carlos Garnacho
ba83a2757e wayland: Add defines to convert between event sequences and touch slots
This makes it clearer in code what's going on there.
GDK_SLOT_TO_EVENT_SEQUENCE isn't used yet, but will be useful in the
future.
2014-08-22 13:37:41 +02:00
Carlos Garnacho
88bf4a7a2d x11: Fix possible leak of GdkEvents
If the filter didn't return GDK_EVENT_TRANSLATE, the event struct would be
left unused and leaked.
2014-08-22 13:24:48 +02:00
Matthias Clasen
beae42c49b Include config.h first
Otherwise, we miss the _GNU_SOURCE #define that configure
puts there.
2014-08-21 14:22:13 -04:00
Simon McVittie
d329544e70 Use AC_USE_SYSTEM_EXTENSIONS to get _GNU_SOURCE, _XOPEN_SOURCE etc.
Similar to Bug #684123 in GLib.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=641638
Bug-Debian: https://bugs.debian.org/756476
Reviewed-by: Matthias Clasen
2014-08-21 09:54:12 +01:00
Sébastien Wilmet
55bd34c62a Mark the GdkColor struct as deprecated 2014-08-20 17:19:30 +02:00
Matthias Clasen
c9da8bf2b3 Revert "docs: Fix broken gtk-doc formatting"
This reverts commit a7562dd38f.

I prefer to not confuse gtk-doc with doc comments for private
functions.
2014-08-18 08:18:02 -04:00
Rico Tzschichholz
a7562dd38f docs: Fix broken gtk-doc formatting
Fixes broken introspection of GtkTranslateFunc
2014-08-18 13:27:05 +02:00
Matthias Clasen
1dfe28fa56 win32: Set the right source device
https://bugzilla.gnome.org/show_bug.cgi?id=734738
2014-08-15 13:04:57 -04:00
Domenico Tortorella
76da8a5f20 Fixed some object leaks in broadway_server_new() constructor.
https://bugzilla.gnome.org/show_bug.cgi?id=734778
2014-08-14 20:31:19 -04:00
Matthias Clasen
bd84bae5d9 Broadway: Make unix socket support conditional
We need to use gio/gunixsocketaddress.h and do so
only if HAVE_GIO_UNIX is defined.
2014-08-14 20:31:19 -04:00
Domenico Tortorella
43bddd205b BroadwayServer support for unix socket listening
At the present time broadway listens only for TCP/IP incoming
display connections. This patch implements the support for listening
on unix domain sockets too, adding the broadway_server_on_unix_socket_new()
constructor and the commandline option --unixsocket [path] to broadwayd.

https://bugzilla.gnome.org/show_bug.cgi?id=734420
2014-08-14 20:24:10 -04:00
Matthias Clasen
491cab3f7f Fix a thinko in creating event masks
&-ing together all the device event types yields zero,
which is clearly not the intention here. Use | instead,
to create the intended mask.

https://bugzilla.gnome.org/show_bug.cgi?id=734641
2014-08-14 00:10:23 -04:00
Руслан Ижбулатов
a0faf5a51c Fix various warnings
https://bugzilla.gnome.org/show_bug.cgi?id=734737
2014-08-13 23:41:56 +00:00
Руслан Ижбулатов
1b9fa975af Fix some print format warnings
https://bugzilla.gnome.org/show_bug.cgi?id=734736
2014-08-13 23:40:59 +00:00
Руслан Ижбулатов
694c8d32d5 Fix various warnings about unused things
https://bugzilla.gnome.org/show_bug.cgi?id=734735
2014-08-13 23:38:47 +00:00
Jasper St. Pierre
966b191e13 gdkwayland-window: Don't map the grab transfer menu for GtkMenu
This is a bad idea in general, but it also means that the focus for a
window drops when we pop up a menu, since the grab transfer menu exists.
2014-08-13 19:03:39 -04:00
Matthias Clasen
be5300f68e wayland: Initialize cursor cache earlier
Without this, I was getting a crash because the theme change
function was trying to iterate over the hash table before
it was created.
2014-08-12 13:43:22 -04:00
Jasper St. Pierre
a07fc2f85d wayland: Remove overly complex cursor cache 2014-08-10 12:34:56 -04:00
Chun-wei Fan
781846e564 gdkwindow-win32.c: Fix build on Visual C++
Since MSVC is more strict about the types that we try to do a compare, cast
old_ptr as HWND, as we know that it is a pointer...

https://bugzilla.gnome.org/show_bug.cgi?id=733768
2014-08-06 15:13:09 +08:00
Руслан Ижбулатов
31d08bd85e When wrapping a foreign W32 window, don't forget to store its HWND
When that window is later used as a parent for a GDK child, the call to
CreateWindow*() will fail, because its HWND is 0.

https://bugzilla.gnome.org/show_bug.cgi?id=733768
2014-08-05 06:37:24 +00:00
Руслан Ижбулатов
d43fb29c5a Suppress a warning from SetWindowLongPtr()
https://bugzilla.gnome.org/show_bug.cgi?id=726224
2014-08-04 13:55:11 +00:00
Руслан Ижбулатов
6dede1a0b7 W32: Don't crash when opacity is set for non-toplevel
X11 backend doesn't, and for good reason - main code body does not check
that the window it sets opacity for is, in fact, toplevel.
Just silently fail to do anything for non-toplevel windows.

https://bugzilla.gnome.org/show_bug.cgi?id=733769
2014-08-02 14:22:22 +00:00
Руслан Ижбулатов
a235dd6a6c GDK W32: add environment variable to override system font scaling
Support environment variable GDK_WIN32_FONT_RESOLUTION that can be set to
a desired dpi (72, 96, 130, etc) to override system settings. Useful for
debugging, since changing system font scaling requires the user to log off
and log on again.

https://bugzilla.gnome.org/show_bug.cgi?id=734038
2014-07-31 14:27:14 +00:00
Руслан Ижбулатов
f38498ed84 GDK W32: support font scaling
Respect system font scaling (Control Panel -> Display -> Font Size) and
convey that information to GDK (which then passes it to Pango).

https://bugzilla.gnome.org/show_bug.cgi?id=734038
2014-07-31 14:01:56 +00:00
Руслан Ижбулатов
a23c29c0fb W32: Implement rudimentary WM_NCHITTEST handling
Use (cairo) input shape of the window to check whether a point is inside or not
inside the window.
If it is, let the default window procedure do its thing (which seems to be
working all right in all known cases).
If it isn't, override the default window procedure and tell WM what we think.

Don't do any of the above if the window has CSD-incompatible styles (WS_BORDER
or WS_THICKFRAME).

This is a crude kind of substitute for window input shape support (which W32
does not seem to have). Still probably enough to be positive about input shapes
support.

https://bugzilla.gnome.org/show_bug.cgi?id=733679
2014-07-29 01:31:49 +00:00
Jasper St. Pierre
47d0be535b gdkdevice-wayland: Fix compile warnings
These are signed, not unsigned.
2014-07-26 09:47:14 -04:00
Jasper St. Pierre
61f0ed80a1 wayland-device: Upgrade to v4 of seat
Get our keyboard repeat info from the server.
2014-07-25 10:23:39 -04:00
Jasper St. Pierre
6c35ae199e wayland-device: Upgrade to v3 of seat
To prevent memory leaks.
2014-07-25 09:42:36 -04:00
Jasper St. Pierre
407a778bc5 wayland-device: Handle v2 of seat 2014-07-25 09:42:35 -04:00
Jasper St. Pierre
4eb2a74fb8 wayland-device: Refactor a bit
Delay the keyboard settings creation until we're delivering the key
press. This means we don't have to create the settings for a server that
sends us repeat information.
2014-07-25 09:42:35 -04:00
Jasper St. Pierre
ded609a735 wayland-device: Reindent 2014-07-25 09:42:35 -04:00
Руслан Ижбулатов
9e11bb3335 Remove gdk_win32_input_shape_combine_region()
This function currently calls gdk_win32_window_shape_combine_region(),
which is wrong, because it leads to SetWindowRgn() being called with
non-NULL region, which makes W32 disable theming (particularly - decoration
theming), which makes decorations revert back to old GDI-drawn Windows 2000
variant, which looks out of place and interacts *badly* with alpha channel
(because GDI).

https://bugzilla.gnome.org/show_bug.cgi?id=733671
2014-07-24 16:01:06 +00:00
Ignacio Casal Quinteiro
b553ce2b2f win32: remove set but not used variables 2014-07-23 23:37:52 +02:00
Carlos Garnacho
49448290c3 gdk: Document the behavior of device grabs on slave devices
This may be useful for certain applications, so document it explicitly.
2014-07-21 22:16:05 +02:00
Carlos Garnacho
7995cd59d0 gdk: Explain the relation between device type and mode
GdkInputMode doesn't apply to all device types, explain why
and how do these interact.
2014-07-21 22:16:04 +02:00
Jasper St. Pierre
cb91e89de3 wayland: Update xdg-shell 2014-07-17 17:28:14 -04:00
Jasper St. Pierre
46bcfa0098 gdkwindow-wayland: Take out the margins for now
xdg-shell has moved on and replaced set_margin with set_window_geometry.
To properly support set_window_geometry requires a full rewrite of how
we've been dealing with toplevel windows for now, so just don't set any
margin until we can have a proper toplevel window abstraction in GTK+.
2014-07-17 16:59:29 -04:00
Jasper St. Pierre
3878519449 window: Use CAIRO_OPERATOR_SOURCE to clear to background
Some windows, like GtkWindow and some other apps, set a transparent
background. The guarantee for begin_paint_region is that there should
be a full clear to the specified background color, not a composite
against what was there before.

This fixes repaint artifacts in Wayland and Weston in a better way than
76922c169f.
2014-07-14 19:14:40 -04:00