Commit Graph

7152 Commits

Author SHA1 Message Date
Emmanuele Bassi
68cab95c5d Remove re-declarations of public functions 2016-10-17 11:10:14 +01:00
Emmanuele Bassi
d64ca9560c Remove redundant declaration 2016-10-17 11:10:13 +01:00
Emmanuele Bassi
cf9b9a034b gdk: Comment out gdk_cairo_create() 2016-10-17 10:44:27 +01:00
Emmanuele Bassi
07cd87eb9c gdk: Remove mentions of gdk_cairo_create()
This function does not exist any more.
2016-10-17 10:44:27 +01:00
Benjamin Otte
a65a4de38d gdk: Remove old code to create drawing context
You now have to use a GdkDrawingContext
2016-10-16 18:18:58 +02:00
Benjamin Otte
e76ba9a3c3 gdk: Remove gdk_window_set_debug_updates()
The update tracking code was ugly and using deprecated drawing APIs. It
was also in the wrong place.

So instead of trying to keep it working, I'll remove it. We need to find
a better way to put it and make it work there.
2016-10-16 18:18:58 +02:00
Benjamin Otte
1a7dcb2053 gdk: Remove unused argument parsing structs 2016-10-16 18:17:21 +02:00
Benjamin Otte
59c702d88c gdk: Remove leftover structs from ClientMessage days 2016-10-16 18:17:21 +02:00
Benjamin Otte
10a7963ebf gdk: Remove unused structs from ColorMap days 2016-10-16 18:17:21 +02:00
Benjamin Otte
eace2cf421 API: Remove gdk_window_set_background()
Backgrounds are always transparent black.
2016-10-16 18:17:21 +02:00
Benjamin Otte
662001b60a API: Remove ability to set visuals on windows
And with it, gtk_widget_get_visual() and gtk_widget_set_visual() are
gone.

We now always use the RGBA visual (if available) and otherwise fall back
to the system visual.
2016-10-16 18:17:21 +02:00
Benjamin Otte
89f2e17f91 API: Remove gdk_window_set_composited()
And the related call gdk_display_supports_composite().
2016-10-16 18:17:21 +02:00
Benjamin Otte
8d54c641f1 screen: Remove unused vfunc
GdkScreenClass.broadcast_client_message was unused, but a bunch of
backends still had functions (not) implementing it.
2016-10-16 18:17:21 +02:00
Benjamin Otte
fec8069e7b API: screen: Stop storing font options
font options are only ever set by the GtkSettings object and only ever
used inside GTK, so just store them there.
2016-10-16 18:17:21 +02:00
Benjamin Otte
fcbd480c76 API: Remove GDK_WA_CURSOR
The cursor was set using gdk_window_set_cursor() even in
gdk_window_new().

So instead of having yet another flag, just make the users of that flag
call gdk_window_set_cursor() directly after the window was created.
2016-10-16 18:17:21 +02:00
Benjamin Otte
2fd5048943 API: window: Remove suppport for changing wmclass_name/group
X11 was the only backend to support it and people can just override it
using XSetClassHint() directly.
The docs already advertised the function as "Do not use".

Keep the existing call to XSetClassHint() in place, so that we keep
setting the same values as in GTK3.
2016-10-16 18:17:21 +02:00
Benjamin Otte
9be9e00a0e API: screen: Remove gdk_screen_make_display_name()
It's identical to gdk_display_get_name().
2016-10-16 18:17:21 +02:00
Benjamin Otte
6b9e481e38 API: screen: Remove gdk_screen_get_active_window()
... and gdk_screen_get_window_stack().

Those functions were originally added in
5afb4f0f11 but do not seem to be used as
they are not implemented anywhere but in X.

As GDK is not meant to fulfill window management functionality I'm going
to remove these functions without replacements.
2016-10-16 18:17:21 +02:00
Benjamin Otte
26f9b584be API: gdk: Remove gdk_screen_get_number()
It's useless everywhere but in internal X11 code.
2016-10-16 18:17:21 +02:00
Benjamin Otte
0be88cc76e API: Remove gdk_screen_get_width() and gdk_screen_get_height()
... and gdk_screen_get_width_mm() and gdk_screen_get_height_mm() and
the shortcut counterparts that call these functions on the default
screen.

Modern display servers don't provide an ability to query the size of a
screen or display so we shouldn't allow that either.
2016-10-16 18:17:21 +02:00
Benjamin Otte
579edbbca8 display: Insist that backends implement the monitor vfuncs
We cannot fallback anymore once we remove the ability to query screen
size, and that's about to happen.
2016-10-16 18:17:21 +02:00
Benjamin Otte
ed30f271f5 gdk: Insist axis.min_value < axis.max_value
Remove fallback code that would substitute screen size otherwise.
2016-10-16 18:17:21 +02:00
Benjamin Otte
2033b06cb6 gdk: Require passing screen size to translate_screen_coord() 2016-10-16 18:17:21 +02:00
Benjamin Otte
1a0a423250 API: gdk: Remove monitor APIs on GdkScreen 2016-10-16 18:17:21 +02:00
Benjamin Otte
c0276e2c5c applaunchcontext: Ignore screen name
It's guaranteed to be identical to the display name.
2016-10-16 18:17:21 +02:00
Benjamin Otte
f7cebf5c1f wayland: Use GdkMonitor APIs 2016-10-16 18:17:21 +02:00
Benjamin Otte
7232b4f735 x11: Use GdkMonitor APIs 2016-10-16 18:17:21 +02:00
Benjamin Otte
d33c251cf6 gdk: Use GdkMonitor APIs
... instead of the old ones using GdkScreen
2016-10-16 18:17:21 +02:00
Benjamin Otte
76d95c312d display: Don't return NULL in get_primary_monitor()
Nobody ever does a NULL check there so all that causes is crashes. So
we better return a non-primary monitor than NULL.

Fixes gdk-wayland always returning NULL.
2016-10-16 18:17:21 +02:00
Benjamin Otte
dcb816f99a gdk: Fix docs typo 2016-10-16 18:17:21 +02:00
Benjamin Otte
7016409e9f gdk: Get rid of unused variables 2016-10-16 18:15:37 +02:00
Olivier Fourdan
9e2b1ad39e gdkwindow: configure native windows in move_native_children()
ClutterEmbed on Wayland uses a subsurface and relocates it on configure
events, but when placed within a scrolled window, no configure event is
emitted and the ClutterEmbed subsurface remains static.

Emit a configure event for native windows in GdkWindow's internal
move_native_children() so that custom widgets relying on configure
events such as ClutterEmbed can relocate their stuff.

Similarly, when switching to/from normal/maximized/fullscreen states
which change the shadows' size and possibly shows/hides a header bar,
we need to emit a configure event even if the abs_x/abs_y haven't
changed to make sure the subsurface is size appropriately.

https://bugzilla.gnome.org/show_bug.cgi?id=771320
https://bugzilla.gnome.org/show_bug.cgi?id=767713
2016-10-13 08:53:59 +02:00
Adam Jackson
434ce02ebe Use eglGetPlatformDisplay{,EXT} if available
Calling eglGetDisplay forces libEGL to guess what kind of pointer you
passed it. Different EGL libraries will do different things here, and in
particular glvnd will do something different than Mesa. Since we do have
an API that allows us to explicitly type the display, use it.

The explicit call to eglGetProcAddress is working around a bug in
libepoxy 1.3, which does not understand the EGL concept of client
extensions. Since it does not, the normal epoxy resolver for
eglGetPlatformDisplayEXT would not find any provider for that entry
point, and crash when you attempted to call it.

Signed-off-by: Adam Jackson <ajax@redhat.com>

https://bugzilla.gnome.org/show_bug.cgi?id=772415
2016-10-10 14:17:09 -04:00
Adam Jackson
3b11575f0b Fix some EGLDisplay * abuse
EGLDisplays are already opaque pointers, and eglGetDisplay returns an
EGLDisplay not a pointer to one.

Signed-off-by: Adam Jackson <ajax@redhat.com>

https://bugzilla.gnome.org/show_bug.cgi?id=772415
2016-10-10 14:17:09 -04:00
Matthias Clasen
d053d5c58f Rename Makefile references from 3.0 to 4.0
This is almost certainly incomplete.
Needs careful scrutiny
2016-10-07 10:34:50 -04:00
Jonas Ådahl
f7c0661a61 wayland: Only 'moved-to-rect' if move_to_rect() was used
Don't emit the 'moved-to-rect' signal if move_to_rect() was used.

https://bugzilla.gnome.org/show_bug.cgi?id=771516
2016-09-30 06:40:30 -04:00
Richard Hughes
13e00b70c0 Add GDK_AVAILABLE_IN_3_90 2016-09-29 17:24:56 +01:00
Gustavo Noronha Silva
7292b03559 wayland: always sync state after a frame is painted
Opaque region, margin and input region were only being synced when a cairo
paint happened. That caused GL paints to sometimes end up with bad state.
Move calls to sync state to gdk_window_impl_wayland_end_paint.

https://bugzilla.gnome.org/show_bug.cgi?id=771553
2016-09-28 10:17:09 +02:00
Olivier Fourdan
dbd0923b5f wayland: Avoid negative size constraints
Setting the shadow width earlier as done with commit 4cb1b96 to address
bug 771561 proved to cause unexpected side effects on size_allocate
signal propagation.

As the window is sized correctly earlier, the size_allocate signal is
not emitted again in gtk_widget_size_allocate_with_baseline() which
prevents clutter-gtk from relocating its child widget correctly.

To avoid this issue, revert commit 4cb1b96 but make sure the values
passed as min and max size is never negative in Wayland as this is a
protocol error.

With this, the min/max size will be wrong for a short amount of time,
during the state transition, until the shadow width is updated from
gdk_window_set_shadow_width().

This approach is much safer and less intrusive than changing the
size_allocate logic in gtk.

This reverts commit 4cb1b9645e.

Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=771915
2016-09-28 09:28:52 +02:00
Andreas Pokorny
fe216b0039 Do not filter out small scroll event fractions
The scroll motion values are subject of batching and scaling. Either
through scaling or by using a touchpad smooth scroll motion changes
below 0.5 are possible.

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

Signed-off-by: Andreas Pokorny <andreas.pokorny@canonical.com>
2016-09-26 11:49:56 -04:00
Rico Tzschichholz
a3f1596069 Add some missing (nullable) annotations
https://bugzilla.gnome.org/show_bug.cgi?id=771826
2016-09-22 14:02:07 +02:00
Jeremy Tan
b6ac1b4bbf GDK W32: Ignore autorepeated key presses on modifier keys
The X11 backend does not send autorepeated messages for modifier keys,
and doing so prevents motion compression from working.

https://bugzilla.gnome.org/show_bug.cgi?id=771568
2016-09-19 12:36:53 +00:00
Jeremy Tan
a5c8fedf47 GDK W32: Always process all available messages
The GLib main loop blocks on MsgWaitForMultipleObjectsEx to
determine if there are any incoming messages while also allowing
for background tasks to run. If all available messages are not
processed after MsgWaitForMultipleObjectsEx has signaled that
there are available, CPU usage will skyrocket.

From my limited understanding (by inspection of profiling
under Visual Studio):
Key is pressed - MsgWaitForMultipleObjectsEx unblocks, and
sends message to GDK's event handler. Some event is now queued.

g_poll unblocks, calls the g_event_dispatch which finally
resolves to gdk_event_dispatch. This then calls
_gdk_win32_display_queue_events, but since a message is already
queued, it fails to call PeekMessage and returns immediately.

At the next iteration, g_poll again calls MsgWaitForMultipleObjectsEx
which queues yet another event and returns almost immediately, since
there are events available which haven't been processed by PeekMessage.

The dispatch function is then called and the process repeats.

https://bugzilla.gnome.org/show_bug.cgi?id=771568
2016-09-19 12:36:51 +00:00
Руслан Ижбулатов
0274b2c94e GDK W32: Set is_modifier field in GdkKeyEvent
This hardcodes Control, Alt and Shift as modifier keys.

https://bugzilla.gnome.org/show_bug.cgi?id=602773
2016-09-17 20:24:18 +00:00
Matthias Clasen
21bdf617ce Implement gdk_screen_get_monitor_scale_factor generically
This was forgotten when the other screen monitor apis were
ported to GdkMonitor.

https://bugzilla.gnome.org/show_bug.cgi?id=771349
2016-09-14 06:45:21 -04:00
Jonas Ådahl
c529d0a96e wayland: Move and resize popup after it was configured
A popup may have moved and resized when configured. Make sure every
layer knows about this and call gdk_window_move_resize() with the
configured dimension and position. This won't actually move the
window, but might resize it.

https://bugzilla.gnome.org/show_bug.cgi?id=771117
2016-09-14 11:29:32 +08:00
Jonas Ådahl
d792400d7c wayland: Transform moved_to_rect result properly
The result of move_to_rect, received from the xdg_popup.configure
event, needs to be translated to the correct coordinate space; that is
from real parent window geometry to coordinates relative to the gdk
window set as transient-for.

https://bugzilla.gnome.org/show_bug.cgi?id=771117
2016-09-14 11:29:32 +08:00
Jonas Ådahl
74d237df41 wayland: Use helper to translate to real parent window geometry
Use a helper to translate a coordinate from non-real GdkWindow parent
to window geometry coordinate space of the real GdkWindow parent,
meaning the coordinate space of the GdkWindow of the parent used as a
xdg_popup parent where (0, 0) is inside of the shadow margin.

https://bugzilla.gnome.org/show_bug.cgi?id=771117
2016-09-14 11:29:32 +08:00
Jonas Ådahl
bc6630bb7d wayland: Don't pass parent when creating dynamic positioner
When using the dynamic positioner (i.e. positioning from move_to_rect)
we can always rely on having a proper transient-for to position
relative to, so lets drop the ignored parameter.

https://bugzilla.gnome.org/show_bug.cgi?id=771117
2016-09-14 11:29:32 +08:00
Jonas Ådahl
9a2ce3a485 wayland: Don't pass transient-for when getting real parent
It's always derived from transient-for so no need to pass it.

https://bugzilla.gnome.org/show_bug.cgi?id=771117
2016-09-14 11:29:32 +08:00
Jonas Ådahl
50e33308db wayland: Fix south-west anchor rect calculation
https://bugzilla.gnome.org/show_bug.cgi?id=771117
2016-09-14 11:29:32 +08:00
Jonas Ådahl
4d2c0a843a wayland: Don't pass non-changing state when calculating popup rects
https://bugzilla.gnome.org/show_bug.cgi?id=771117
2016-09-14 11:29:32 +08:00
Jonas Ådahl
e656a14764 wayland: Move move_to_rect related code closer together
Move the code used for calculating the result of move_to_rect
(final_rect, flipped_rect etc) closer to the other move_to_rect
functions (i.e. next to create_dynamic_positioner), and let the
xdg_popup configure handler just call the calculation function.

https://bugzilla.gnome.org/show_bug.cgi?id=771117
2016-09-14 11:29:32 +08:00
Olivier Fourdan
eb17ee1c26 wayland: unmap popup along with its toplevel
If an application umaps the toplevel from its popup callback, this can
lead to a protocol error.

Make sure we mark popup parent and use that to check if their parent is
the toplevel being unmapped in which case we shall unmap the popup first
to avoid the protocol error.

Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=770906
2016-09-12 10:03:58 +02:00
Takao Fujiwara
f2ba6ca473 gdkscreen-x11: Enable RandR on VirtualBox
RandR 1.5 is enabled on VirtualBox guest of Fedora 25 but
XRROutputInfo->name is "default". If init_randr15() does not
return TRUE, the monitor size sets 0 because gdk_screen_get_width()
returns 0.

This problem causes GtkStatusIcon not to show the activate menu.

https://bugzilla.gnome.org/show_bug.cgi?id=771033
2016-09-09 16:41:23 -04:00
Timm Bäder
fbca09ecb4 gdkdisplay: Unref seats in finalize 2016-09-08 11:34:13 +02:00
Timm Bäder
476c1c44a5 gdkdisplay-wayland: Fix some memory leaks 2016-09-08 11:34:13 +02:00
Jonas Ådahl
98b0f78200 wayland: Warn when an application tries to map popup incorrectly
When a popup is mapped but will not be the top most popup (for example
the parent is not the current top most popup, or if there already is a
popup mapped but the parent is a toplevel), warn and ignore it instead
of continuing, as continuing would be a protocol violation.

https://bugzilla.gnome.org/show_bug.cgi?id=770745
2016-09-02 18:56:03 +08:00
Matthias Clasen
c9749ad7dc x11: Fix a trap mixup
There was a return between a push/pop of an error trap, and
this managed to trigger the 'unpopped trap' warning in the
displayclose test now. Fix this.
2016-08-29 15:51:05 -04:00
Matthias Clasen
bdbe2de57d Document handle-related Wayland api
In particular, note that this API depends on an unstable
Wayland protocol and thus may have to change.
2016-08-29 13:20:44 -04:00
Jonas Ådahl
340b5964dd wayland: Add API for setting an exported as a parent
Add an API that enables an application to, given an exported window
handle, set its own window as a transient of the window associated with
the exported window handle.

https://bugzilla.gnome.org/show_bug.cgi?id=769788
2016-08-29 13:20:44 -04:00
Jonas Ådahl
127d2ac956 wayland: Add API for creating exported window handles
Using the xdg_foreign protocol, expose a way to get handles to windows
that may be shared between processes.

https://bugzilla.gnome.org/show_bug.cgi?id=769788
2016-08-29 13:20:44 -04:00
Руслан Ижбулатов
b05ed13710 GDK W32: Remove obsolete assertions 2016-08-26 20:46:27 +00:00
Olivier Fourdan
9f57fe9960 wayland: add min/max size from xdg-shell v6
Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=764413
2016-08-25 11:04:16 +02:00
Jonas Ådahl
b7964cf5a7 wayland: Implement move_to_rect
Translate move_to_rect parameter into xdg_positioner requests, and use
the generated xdg_positioner to create the popup.

https://bugzilla.gnome.org/show_bug.cgi?id=769937
2016-08-25 12:31:40 +08:00
Jonas Ådahl
ceada4adc2 wayland: Port to xdg_shell unstable v6
https://bugzilla.gnome.org/show_bug.cgi?id=769937
2016-08-25 12:31:40 +08:00
Jonas Ådahl
643f033923 wayland: Move window geometry calculation to helper
We'll use it from more places later.

https://bugzilla.gnome.org/show_bug.cgi?id=769937
2016-08-25 12:31:40 +08:00
Jonas Ådahl
d2a80cd235 wayland: Only update the window title if it actually updated
This makes the protocol log less spammy.

https://bugzilla.gnome.org/show_bug.cgi?id=769937
2016-08-25 12:31:40 +08:00
Jonas Ådahl
8270699119 wayland: Only sync surface regions once per commit
Only set input, opaque and window geometry regions once per commit.
They are double buffered anyway, so the last one would only take effect
either way; this way reading protocol logs are much more pleasent.

https://bugzilla.gnome.org/show_bug.cgi?id=769937
2016-08-25 12:31:40 +08:00
Jonas Ådahl
d2385bec09 wayland: Remove gdk_wayland_display_get_xdg_shell()
Don't expose the xdg_shell struct as it is not yet a stable type that
will stay the same.

https://bugzilla.gnome.org/show_bug.cgi?id=769937
2016-08-25 12:31:40 +08:00
Jonas Ådahl
e53d381430 wayland: Get tiled state from gtk_shell instead of xdg_shell
Use our the 'tiled' entry from our new 'state' enum sent via
xdg_surface.configure.

https://bugzilla.gnome.org/show_bug.cgi?id=769937
2016-08-25 12:31:40 +08:00
Jonas Ådahl
80dd7566d5 wayland: Fix indentation
https://bugzilla.gnome.org/show_bug.cgi?id=769937
2016-08-25 12:31:40 +08:00
Matthias Clasen
b8f464e102 wayland: Add some more debug spew 2016-08-25 00:13:13 -04:00
Matthias Clasen
ae720784d9 wayland: Replace g_debug by GDK_NOTE
We have this framework, lets use it.
2016-08-25 00:05:49 -04:00
Matthias Clasen
f66a76d998 Document window-icon related api as 'may not work'
Some platforms simply don't have window icons (such as Wayland).
2016-08-24 14:43:58 -04:00
Carlos Garnacho
87af999b5d wayland: Offer wayland-specific method to set pad actions feedback
The wayland tablet protocol allows notifying the compositor with
descriptions of the actions performed by each tablet element. This
API call allows to hook up in to this wayland-specific feature.

https://bugzilla.gnome.org/show_bug.cgi?id=770026
2016-08-23 21:01:45 +02:00
Carlos Garnacho
27f879b835 wayland: Support pad devices in gdk_wayland_device_get_node_path()
We can return the node path on those too, so do that.

https://bugzilla.gnome.org/show_bug.cgi?id=770026
2016-08-23 21:01:45 +02:00
Carlos Garnacho
7e961b8bcc wayland: Implement pad event emission
We now send all the set of button/ring/strip/group_mode events.

https://bugzilla.gnome.org/show_bug.cgi?id=770026
2016-08-23 21:01:45 +02:00
Carlos Garnacho
cca51b71cb wayland: Create/expose pad devices
These devices are kind of an strange case. Their "master" device is
the keyboard, because they share toplevel focus with it, regardless
of stylus focus. Nonetheless, they are only expected to send the
GdkEventPad* set of events.

https://bugzilla.gnome.org/show_bug.cgi?id=770026
2016-08-23 21:01:45 +02:00
Carlos Garnacho
82a46faf41 wayland: Add GdkWaylandDevicePad
This is a subclass of GdkWaylandDevice that implements GdkDevicePad,
all pad features are looked up from the info obtained through the
tablet v2 interface.

https://bugzilla.gnome.org/show_bug.cgi?id=770026
2016-08-23 21:01:45 +02:00
Carlos Garnacho
feb09e384c wayland: Implement backbone of pad support
All pad interfaces and features are poked, we just now need
exposing those.

https://bugzilla.gnome.org/show_bug.cgi?id=770026
2016-08-23 21:01:45 +02:00
Carlos Garnacho
b8a77d4da3 gdk: Add GdkDevicePad
This is an interface meant to be implemented by the "pad" devices.
This device-specific interface exposes the mapping of all pad features,
it allows retrieving:
- The number of buttons/rings/strips
- The number of groups
- The number of modes a group has
- Whether a given button/ring/strip belongs to a given group

https://bugzilla.gnome.org/show_bug.cgi?id=770026
2016-08-23 21:01:44 +02:00
Carlos Garnacho
f1a9cd466e gdk: Address pad events similarly to keyboard events
We want the same treatment for those, the event will be emitted on the
toplevel, which will then decide what to do with the event.

It just doesn't make much sense to propagate those up/down the hierarchy,
when we want specifically one action being triggered from those.

https://bugzilla.gnome.org/show_bug.cgi?id=770026
2016-08-23 21:01:44 +02:00
Carlos Garnacho
0dcb9b316e gdk: Add pad event structs, enum values, and event mask bit
GDK_PAD_BUTTON*,RING and STRIP will be emitted respectively when
pad buttons, rings or strips are interacted with. Each of those
pad components belong to a group (a pad can contain several of
those), which may be in a given mode. All this information is
contained in the event.

GDK_PAD_GROUP_MODE is emitted when a group in the pad switches
mode, which will generally result in a different set of actions
being triggered from the same buttons/rings/strips in the group.

https://bugzilla.gnome.org/show_bug.cgi?id=770026
2016-08-23 21:01:44 +02:00
Carlos Garnacho
3f56af3738 gdkdevice: Add GDK_SOURCE_TABLET_PAD input source type for GdkDevices
This will represent a tablet pad.

https://bugzilla.gnome.org/show_bug.cgi?id=770026
2016-08-23 21:01:44 +02:00
Carlos Garnacho
3ac56e60c7 wayland: Add wayland-specific method to retrieve a device node path
This will be useful at least for g-c-c, in order to match libwacom
data with GdkDevices.

https://bugzilla.gnome.org/show_bug.cgi?id=770026
2016-08-23 21:01:44 +02:00
Carlos Garnacho
942d144d3b gdk: Pass hardware ID on gdk_device_tool_new()
And implement this on wayland, where this information is already obtained.

https://bugzilla.gnome.org/show_bug.cgi?id=770026
2016-08-23 21:01:44 +02:00
Carlos Garnacho
40f75e74be gdk: Add a getter for the hardware id of a GdkDeviceTool
Although scarcely used, this information may be useful to retrieve
from the windowing systems that offer this information.

https://bugzilla.gnome.org/show_bug.cgi?id=770026
2016-08-23 21:01:44 +02:00
Emmanuele Bassi
74bd3f3810 quartz: Fix typo that broke debug builds 2016-08-22 09:23:02 +01:00
Carlos Garnacho
e3bbeb48bd gdk: Fix gdk_device_tool_get_serial() return value
This is a guint64, not just a guint.

https://bugzilla.gnome.org/show_bug.cgi?id=770026
2016-08-19 23:56:58 -04:00
Carlos Garnacho
7e11fcaa18 gdk: Fix GdkDevice::tool-changed signal marshaller
GdkDeviceTool is an object, not a boxed type.

https://bugzilla.gnome.org/show_bug.cgi?id=770026
2016-08-19 23:56:58 -04:00
Руслан Ижбулатов
09004b51a9 Update GTK+ Windows icon (now scles up to 256x256)
Also add the SVG file that was used to produce it (derived
from the old raster logo).

https://bugzilla.gnome.org/show_bug.cgi?id=768081
2016-08-19 23:55:19 -04:00
Olivier Fourdan
f9b91197c0 wayland: Use keyboard serial for implicit grab
An xdg-popup requires a serial that the compositor will compare against
its own serial and will dismiss the popup if it doesn't match.

gtk+ uses either a pointer or touch serial for its helper function
_gdk_wayland_seat_get_last_implicit_grab_serial() but if the menu is
triggered before the user has had any pointer or touch interaction with
the client, using a keyboard shortcut, there is neither pointer nor
touch serial available, and gtk+ will use 0 as the default.

As a result, the compositor will instantly dismiss the xdg-popup. In
this case, gtk+ should use the keyboard serial instead.

Track keyboard serial as well and use the keyboard serial as the value
if there is no newer pointer or touch serial available.

https://bugzilla.gnome.org/show_bug.cgi?id=768017
2016-08-19 23:50:14 -04:00
Matthias Clasen
967e2e0cd3 Minor doc cleanup
gtk-doc is smart about plural links, nowadays.
2016-08-19 23:24:47 -04:00
Matthias Clasen
88248e34b1 Remove an outdated comment
It described as TODO what the code right below it already does.
2016-08-19 23:24:08 -04:00
Jonas Ådahl
cc019de6a5 wayland: Postpone processing move_to_rect params until showing
At the time of move_to_rect() is called, not all state may have been set
up on the impl gdk window, causing the position to sometimes be
slightly offset due to drap shadow margins. For now, work around this
by postponing the processing of the move_to_rect() parameters until
showing, when its more likely that all state (such as shadow margin)
has been set correctly.

https://bugzilla.gnome.org/show_bug.cgi?id=769402
2016-08-18 04:52:03 -04:00
Jonas Ådahl
f6929cfef8 gdkwindow: Use toplevel for getting root cords in move_to_rect()
The Wayland backend manages a set of fake root coordinate spaces, where
each non-relative positioned toplevel (i.e. not popups, popovers,
tooltips etc) make up the basis of separate fake root coordinate spaces.

This means that the Wayland backend doesn't have the abilitiy get a
proper root coordinate when querying on a non-toplevel GdkWindow. To
avoid this issue, first find the toplevel, while translating the anchor
rect coordinates so that they are in the toplevel window coordinate
space. Then use this toplevel to translate the coordinates to root
window coordinate space.

https://bugzilla.gnome.org/show_bug.cgi?id=769402
2016-08-18 04:51:57 -04:00
Jonas Ådahl
4e0ebd0cdf wayland: Don't traverse transient-ofs when faking root coordinate space
The position of each transient-of will be in fake-root coordinate
space; thus we should not accumulate all the positions making it an
offset; each window is already in fake root coordinate space.

https://bugzilla.gnome.org/show_bug.cgi?id=769402
2016-08-18 04:51:51 -04:00
Jonas Ådahl
1f7094a3e5 wayland: Use effective toplevel as popup parent
When using the set transient-for as a popup parent, fetch the effective
toplevel instead, otherwise we will position against the wrong
coordinate.

https://bugzilla.gnome.org/show_bug.cgi?id=769402
2016-08-18 04:51:46 -04:00
William Hua
7665ee4208 mir: group DND, tooltips, and notifications with menu-type windows 2016-08-12 11:37:35 -04:00