Commit Graph

9395 Commits

Author SHA1 Message Date
Carlos Garnacho
cf1fbdf8b5 gdk: Add gdk_event_get_seat()
It currently fetches the seat from the event device, will be changed
in future commits.
2020-06-23 23:42:53 +02:00
Carlos Garnacho
6d2860efb7 gdk: Drop gdk_seat_get_logical_pointers()
Events come from hardware devices and are handled by controllers,
there's no need to use logical pointers, nor to peek them. Drop this
unused API.
2020-06-23 23:42:53 +02:00
Carlos Garnacho
5f29b8fcec gdk: Drop GdkGrabOwnership
We no longer expose such low level tweaks, this is essentially
unused.
2020-06-23 23:42:53 +02:00
Carlos Garnacho
59a8106373 gdk: Drop supports_multidevice API
Crossing events are now detached from widget state, all tricky consequences
from getting multiple crossing events are now somewhat moot. Resort to sending
all generated crossing events, and drop this barely (ever?) used API.
2020-06-23 23:42:53 +02:00
Carlos Garnacho
c1d90273ca gdk: Drop GDK_SOURCE_ERASER
All tools come from devices with GDK_SOURCE_PEN.
2020-06-23 23:42:53 +02:00
Ray Strode
1912513d7a x11: Ensure bound context is compatible with sync fence
Commit a0f6ff101e made sure that a
context was bound before calling glClientWaitSync, but it doesn't
check that the context shares objects with the context that created
the fence.

This commit does a little more validation before deciding the current
context is good enough.
2020-06-22 19:09:43 -04:00
Ray Strode
a0f6ff101e x11: ensure some context is bound before calling glClientWaitSync
Since commit 972134abe4 we now call
glClientWaitSync for the vendor nvidia driver, to know when a frame
is ready for the compositor to process.

glClientWaitSync can be called regardless of which context is currently
bound, but if no context is bound at all, it returns 0 without
doing anything.

This commit checks for that edge case, and ensures a context gets
made current in the event no context is already current, before calling
glClientWaitSync.
2020-06-22 17:13:54 -04:00
Matthias Clasen
367d24be7f Merge branch 'keyval-to-uni-fix' into 'master'
gdk: Make gdk_keyval_to_unicode platform-independent

See merge request GNOME/gtk!2132
2020-06-22 18:13:25 +00:00
Matthias Clasen
c6fe8818ed gdk: Clarify the docs of gdk_keyval_to_unicode
Explicitly state that the conversion does not
take locale into account, and point out GDK_KEY_KP_Decimal
as a candidate for special-casing.
2020-06-22 13:24:34 -04:00
Ray Strode
05736afaf8 x11: be more verbose when glClientWaitSync behaves unexpectedtly
When given a 0 timeout, glClientWaitSync is only supposed to return one
of three possible values:

 - GL_ALREADY_SIGNALED - fence fired
 - GL_WAIT_FAILED - there was an error
 - GL_TIMEOUT_EXPIRED - fence hasn't fired yet

In addition, it can also return GL_CONDITION_SATISFIED if a non-zero
timeout is passed, and the fence fires while waiting on the timeout.

Since commit 972134abe4 we now call
glClientWaitSync (with a 0 timeout), but one user is reporting it's
returning some value that's not one of the above four.

This commit changes the g_assert to a g_error so we can see what
value is getting returned.

May help with https://gitlab.gnome.org/GNOME/gtk/-/issues/2858
2020-06-22 11:16:32 -04:00
Matthias Clasen
2df139cf40 gdk: Make gdk_keyval_to_unicode platform-independent
The result of gdk_keyval_to_unicode should not depend
on the platform.
2020-06-22 08:31:10 -04:00
Matthias Clasen
79b1d24128 Merge branch 'gtk4-arb_fbo' into 'master'
Switch to GL_ARB_framebuffer_object

See merge request GNOME/gtk!2079
2020-06-20 17:12:52 +00:00
Emmanuele Bassi
1c856a208f Rename master and slave device
We already use the "logical/virtual" and "physical" names in the
documentation, there's no reason to use loaded terms just because X11
uses them.
2020-06-18 19:22:20 +01:00
Yuri Chornoivan
c0cf839729 Fix minor typos 2020-06-18 10:47:16 +03:00
Rico Tzschichholz
7c1cf7781b gdk: Drop gdk_device_get_axis_value leftovers 2020-06-16 15:31:29 +02:00
Yariv Barkan
887aa2abdd frame clock: fix scheduling
Fix scheduling of the frame clock when we don't receive "frame drawn"
messages from the compositor.

If we received "frame drawn" events recently, then the "smooth frame
time" would be in sync with the vsync time. When we don't receive frame
drawn events, the "smooth frame time" is simply incremented by constant
multiples of the refresh interval. In both cases we can use this smooth
time as the basis for scheduling the next clock cycle.

By only using the "smooth frame time" as a basis we also benefit from
more consistent scheduling cadence. If, for example, we got "frame
drawn" events, then didn't receive them for a few frames, we would still
be in sync when we start receiving these events again.
2020-06-15 08:54:18 +02:00
Yariv Barkan
9c5d6eaa71 frame clock: adjust reported frame time
When an animation is started while the application is idle, that often
happens as a result of some external event. This can be an input event,
an expired timer, data arriving over the network etc. The result is that
the first animation clock cycle could be scheduled at some random time,
as opposed to follow up cycles which are usually scheduled right after a
vsync.

Since the frame time we report to the application is correlated to the
time when the frame clock was scheduled to run, this can result in
uneven times reported in the first few animation frames. In order to fix
that, we measure the phase of the first clock cycle - i.e. the offset
between the first cycle and the preceding vsync. Once we start receiving
"frame drawn" signals, the cadence of the frame clock scheduling becomes
tied to the vsync. In order to maintain the regularity of the reported
frame times, we adjust subsequent reported frame times with the
aforementioned phase.
2020-06-15 08:54:17 +02:00
Christoph Reiter
85d822b2e8 Fix various compiler warnings with the 64bit mingw build
Use better matching format modifiers/specifiers, initialise some things
which in theory wont be written to because of getters using g_return_if_fail(),
a cast, and gsize as input for malloc because gsize!=glong on 64bit Windows.
2020-06-14 20:02:36 +02:00
Emmanuel Gil Peyrot
404d79153e Switch to GL_ARB_framebuffer_object
GTK 4.0 was currently using GL_EXT_framebuffer_object, which is
deprecated as the ARB version has been merged into OpenGL 3.0 as well as
OpenGL ES 2.0, and provides laxer requirements.

This is a port of !2076 for 4.x.
2020-06-12 15:08:44 +02:00
Matthias Clasen
4b241f8da2 Merge branch 'scroll-compression' into 'master'
gdk: Compress scroll events

Closes #2800

See merge request GNOME/gtk!2066
2020-06-10 14:35:01 +00:00
Matthias Clasen
2c82151d65 gdk: Drop axis labels
This was only ever implemented on X11, and the labels
here were atom names, so unlikely to be useful for
anything interesting.
2020-06-10 07:36:30 -04:00
Matthias Clasen
54c098761f gdk: Drop gdk_device_set_axis_use
If you need some axes changed, you can just flip
the values when you receive them.
2020-06-09 15:27:34 -04:00
Matthias Clasen
2f98400b80 gdk: Drop gdk_device_get/set_keys
This functionality was only ever half-implemented
on X11, and is not useful enough to keep around.
2020-06-09 15:27:33 -04:00
Matthias Clasen
ea7c9b93ea x11: Stop setting device keys
This is very vestigial functionality, and basically
unused.
2020-06-09 15:05:55 -04:00
Matthias Clasen
4317c008f0 Address review comments
We were casting scroll events to motion events
rather carelessly. Don't do that.
2020-06-09 14:13:22 -04:00
Matthias Clasen
d605d9ae73 gdk: Add documentation
Add some useful information about event history.
2020-06-09 13:59:26 -04:00
Matthias Clasen
c9fad25131 gdk: Rename gdk_motion_event_get_history
Scroll events can have history too, so make a
getter that works for both. This drops the
gdk_scroll_event_get_history getter that was
added a few commits earlier, since we now
store scroll history in the same way as
motion history.

Update the docs, and all callers.
2020-06-09 13:43:12 -04:00
Matthias Clasen
693200f1eb gdk: Shrink GdkTimeCoord
There is really no need to store 128 doubles as axes,
ever. We can do just fine with 10. At the same time,
add a GdkAxisFlags member, so we can interpret the
values without having to go chasing the right device
for this information.
2020-06-09 13:43:03 -04:00
Matthias Clasen
5f087a9dff gdk: Add scroll delta x/y as device axes
They really are axes, and having them present
in these enums lets use store delta values in
GdkTimeCoord for keeping history.
2020-06-09 13:43:03 -04:00
Matthias Clasen
b9cde6f8ea Keep scroll history
Similar to how we keep motion history for compressed
events, keep scroll history for compressed scroll
events.
2020-06-09 13:43:03 -04:00
Matthias Clasen
86eece78b1 gdk: Compress scroll events
Only return one accumulated scroll event per frame.
Compress them by adding up the deltas.

Still missing: a way to capture history, like
we do for motion events.

Fixes: #2800
2020-06-09 13:43:03 -04:00
Matthias Clasen
805ddc3c3a gdk: Drop gdk_device_get_history
This function is not implemented anywhere.
2020-06-08 18:24:20 -04:00
Matthias Clasen
da9b3a9256 win32: Drop pointless vfuncs
These are not useful.
2020-06-08 18:24:20 -04:00
Matthias Clasen
876560924f wayland: Drop a pointless vfunc
A vfunc that just returns FALSE is not useful.
2020-06-08 18:24:20 -04:00
Matthias Clasen
ca1c89c5bd broadway: Drop a pointless vfunc
A vfunc that just returns FALSE is not useful.
2020-06-08 18:24:20 -04:00
Matthias Clasen
61c83f9ffe gdk: Documentation fixups
Document some missing symbols.
2020-06-05 20:59:51 -04:00
Matthias Clasen
ed1872f0a8 Merge branch 'frame-clock-start-time' into 'master'
Tweaks to frame clock for better ties to vsync

See merge request GNOME/gtk!2043
2020-06-05 18:33:48 +00:00
Ray Strode
972134abe4 x11: Defer _NET_WM_FRAME_DRAWN update until frame usable by compositor
With the vendor provided Nvidia driver there is a small window of time
after drawing to a GL surface before the updates to that surface
can be used by the compositor.

Drawing is already coordinated with the compositor through the frame
synchronization protocol detailed here:

https://fishsoup.net/misc/wm-spec-synchronization.html

Unfortunately, at the moment, GdkX11Surface tells the compositor the
frame is ready immediately after drawing to the surface, not later,
when it's consumable by the compositor.

This commit defers announcing the frame as ready until it's consumable
by the compositor. It does this by listening for the X server to announce
damage events associated with the frame drawing.  It tries to find the
right damage event by waiting until fence placed at buffer swap time
signals.
2020-06-05 10:01:13 -04:00
Ray Strode
f8770b78ea x11: Factor out some of frame sync code into subroutines
This commit moves some of the end frame sync counter handling
code to subroutines.

It's a minor readability win, but the main motivation is to
make it easier in a subsequent commit to defer updating the
sync counter until a more appropriate time.
2020-06-05 10:01:13 -04:00
Ray Strode
10f2b11fda x11: Add back support for the damage extension
commit 14bf58ec5d dropped support
for using the DAMAGE extension since there was no code that
needed it.

We're going to need it again, however, to address an NVidia
vendor driver issue.

This commit does the plumbing to add it back.
2020-06-05 10:01:13 -04:00
Yariv Barkan
f5de46670b frame clock: schedule in refresh intervals
When the application does not receive "frame drawn" signals we schedule
the clock to run more or less at intervals equal to the last known
refresh interval. In order to minimize clock skew we have to aim for
exact intervals.
2020-06-05 11:57:49 +02:00
Alexander Larsson
91af8a705b frame clock: Better handle non-regular clock cycles
We try to step the frame clock in whole refresh_interval steps, but to
avoid drift and rounding issues we additionally try to converge it to
be synced to the physical vblank (actually the time we get the
frame-drawn message from the compositor, but these are tied together).

However, the convergence to vsync only really makes sense if the new
frame_time actually is tied to the vsync. It may very well be that
some other kind of event (say a network or mouse event) triggered
the redraw, and not a vsync presentation.

We used to assume that all frames that are close in time (< 4 frames
apart) were regular and thus tied to the vsync, but there is really no
guarantee of that. Even non regular times could be rapid.

This commit changes the code to only do the convergence-to-real-time
if the cause of the clock cycle was a thaw (i.e. last frame drawn and
animating). Paint cycles for any other kind of reason are always
scheduled an integer number of frames after the last cycle that was
caused by a thaw.
2020-06-05 11:30:47 +02:00
Alexander Larsson
82c314f1af frame clock: Track if paint is caused by thaw or not
When we get to a paint cycle we now know if this was caused by a
thaw, which typically means last frame was drawn, or some other event.

In the first case the time of the cycle is tied to the vblank in some
sense, and in the others it is essentially random. We can use this
information to compute better frame times. (Will be done in later
commits.)
2020-06-05 11:16:57 +02:00
Sebastian Keller
2bd938952d wayland: Remove unused fribidi include
The included fribidi header is not used in gdkkeys-wayland.c and already
included in gdk.c which causes linker issues due to the header defining
a global variable.
2020-06-04 20:44:55 +02:00
Matthias Clasen
b814970bdd Merge branch 'fix-frameclock-going-backwards' into 'master'
Fix frameclock going backwards

See merge request GNOME/gtk!2011
2020-06-01 12:25:20 +00:00
Emmanuele Bassi
79105962a7 Remove position from GdkScrollEvent
Scroll events do not have a position, so they shouldn't implement the
GdkEventClass.get_position() virtual function; nor they should have an x
and y fields that never get updated.
2020-06-01 10:49:33 +01:00
Alexander Larsson
a36e2bc764 Fix frameclock going backwards
When we run the frameclock RUN_FLUSH_IDLE idle before the paint,
then gdk_frame_clock_flush_idle() sets
```
  priv->phase = GDK_FRAME_CLOCK_PHASE_BEFORE_PAINT
```
at the end if there is a paint comming.

But, before doing the paint cycle it may handle other X events, and
during that time the phase is set to BEFORE_PAINT. This means that the
current check on whether we're inside a paint is wrong:

```
  if (priv->phase != GDK_FRAME_CLOCK_PHASE_NONE &&
     priv->phase != GDK_FRAME_CLOCK_PHASE_FLUSH_EVENTS)
    return priv->smoothed_frame_time_base;
```

This caused us to sometimes use this smoothed_frame_time_base even
though we previously reported a later value during PHASE_NONE, thus
being non-monotonic.

We can't just additionally check for the BEGIN_PAINT phase though,
becasue if we are in the paint loop actually doing that phase we
should use the time base. Instead we check for `!(BEFORE_PAINT &&
in_paint_idle)`.
2020-06-01 10:53:24 +02:00
Matthias Clasen
cbe81fd443 Merge branch 'drop-fallback-c89' into 'master'
Drop fallback-c89.c

See merge request GNOME/gtk!1999
2020-05-31 18:14:14 +00:00
Christoph Reiter
2d5cf2b4c4 Drop fallback-c89.c
We require a C compiler supporting C99 now. The main purpose of
these fallbacks was for MSVC. From what I can see this is now all supported
by MSVC 2015+ anyway.

The only other change this includes is to replace isnanf() with the
(type infering) C99 isnan() macro, because MSVC doesn't provide isnanf().
2020-05-31 17:09:23 +02:00
Emmanuele Bassi
43e5ca9a1b docs: Fix annotations
- Use the same name for the argument in the declaration, definition,
   and documentation
 - Use "optional" instead of the deprecated "allow-none"
2020-05-31 15:04:51 +01:00
Benjamin Otte
c337887e29 xxx: Add a hack to make paintables transform to/from objects
See also: https://gitlab.gnome.org/GNOME/glib/merge_requests/1251
2020-05-30 19:26:46 -04:00
Benjamin Otte
3c1cca13b7 wayland: Remove function declaration for nonexisting function 2020-05-30 10:46:49 -04:00
Matthias Clasen
346bba6592 Bring back gdk_display_put_event
It is still needed in WebKit.
2020-05-29 09:26:50 -04:00
Matthias Clasen
c7a9d7b56b Merge branch 'im-context-key-forward' into 'master'
Add back keyboard related apis

See merge request GNOME/gtk!1977
2020-05-29 00:10:39 +00:00
Matthias Clasen
266a3a5267 Export keymap translation again
This is needed in WebKit webdriver test environment.
2020-05-28 15:15:53 -04:00
Matthias Clasen
48f8affb2c gdk: Make event-related apis private
Without a way to create events, there is no point
in allowing gdk_display_put_event to be used from
the outside. And little good can come out of using
the other apis, so just make them all private.
2020-05-28 14:53:08 -04:00
Alexander Larsson
a27fed47e0 frame-clock: Ensure we're always monotonic
A call to frame gdk_frame_clock_get_frame_time() outside of the paint
cycle could report an un-error-corrected frame time, and later a
corrected value could be earlier than the previously reported value.

We now always store the latest reported time so we can ensure
monotonicity.
2020-05-28 17:44:51 +02:00
Alexander Larsson
9ef3e70040 frame-clock: New approach in smoothing frame clock
In commit c6901a8b, the frame clock reported time was changed from
simply reporting the time we ran the frame clock cycle to reporting a
smoothed value that increased by the frame interval each time it was
called.

However, this change caused some problems, such as:
 https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/1415
 https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/1416
 https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/1482

I think a lot of this is caused by the fact that we just overwrote the
old frame time with the smoothed, monotonous timestamp, breaking
some things that relied on knowing the actual time something happened.

This is a new approach to doing the smoothing that is more explicit.
The "frame_time" we store is the actual time we ran the update cycle,
and then we separately compute and store the derived smoothed time and
its period, allowing us to easily return a smoothed time at any time
by rounding the time difference to an integer number of frames.

The initial frame_time can be somewhat arbitrary, as it depends on the
first cycle which is not driven by the frame clock. But follow-up
cycles are typically tied to the the compositor sending the drawn
signal. It may happen that the initial frame is exactly in the middle
between two frames where jitter causes us to randomly round in
different directions when rounding to nearest frame. To fix this we
additionally do a quadratic convergence towards the "real" time,
during presentation driven clock cycles (i.e. when the frame times are
small).
2020-05-28 15:13:07 +02:00
Alexander Larsson
f1215d2d77 frame clock: Use compositor refresh rate info even if presentation time not set
On my X11 + nvidia setup gnome-shell doesn't report presentation times.
However it does report refresh rate. We were mostly using this in our
calculation except when computing predicted presentation time, were
it fell back on the default 60Hz.
2020-05-28 15:12:32 +02:00
Alexander Larsson
0ad73da68a frame clock: Used drawn_time (as well as presentation time) in profiler marks. 2020-05-28 15:12:32 +02:00
Alexander Larsson
e2a4be0243 FrameClock debug: Log drawn_time if set 2020-05-28 15:12:32 +02:00
Yuri Chornoivan
01bd4cc4e1 Fix minor typos 2020-05-28 11:00:03 +03:00
Matthias Clasen
646a1c2b88 win32: Drop an unsed variable 2020-05-26 22:23:43 -04:00
Matthias Clasen
c47553e319 gdk: Drop no-longer-used documentation
Thread support is gone, and we don't have that
section in the docs anymore.
2020-05-26 20:52:41 -04:00
Matthias Clasen
45f162fc50 gdk: Remove an unused texture api
gdk_gl_texture_from_surface wasn't used anywhere,
so lets drop it.
2020-05-26 20:43:47 -04:00
Matthias Clasen
a20291f235 gdk: Drop some unused event queue functions 2020-05-26 20:43:47 -04:00
Matthias Clasen
3468b2fc44 gdk: Clean up gdkinternals.h
Remove definitions that are just leftovers with
nothing behind them anymore.
2020-05-26 20:43:47 -04:00
Matthias Clasen
aa0d0dc510 gdk: Drop _gdk_windowing_args
We are no longer parsing commandline args, so this
was a useless leftover that was still defined in
the win32 backend.
2020-05-26 20:13:13 -04:00
Matthias Clasen
9c82946e45 docs: Drop a mention of gdk_window_move()
We don't have windows anymore, and they don't move
anymore either.
2020-05-26 20:05:34 -04:00
Matthias Clasen
e5a9255555 gdk: Move the GdkGeometry typedef to gdkinternals.h
The struct was already there, so this is just a leftover.
2020-05-26 20:04:40 -04:00
Matthias Clasen
e14322137f gdk: Drop the GdkByteOrder enum
Move it to the private gdkvisual-x11.h header, which
is the only place where its used.
2020-05-26 19:45:01 -04:00
Matthias Clasen
f27d855c68 gdk: Drop the GdkEventMask enum
This is not used in public api anymore.
Some of the backends still use it internally,
so keep it in gdkinternals.h for now.
2020-05-26 19:39:31 -04:00
Matthias Clasen
0553b10214 gdk: Drop the GdkSurfaceTypeHint enum
This is not used in public api anymore.
Some of the backends still use it internally,
so keep it in gdkinternals.h for now.
2020-05-26 19:34:59 -04:00
Matthias Clasen
7fb5b970f5 gdk: Drop GDK_PARENT_RELATIVE
This define is not used anywhere.
2020-05-26 19:21:55 -04:00
Matthias Clasen
bd3f4599ed Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master

Closes #2778

See merge request GNOME/gtk!1966
2020-05-26 02:41:37 +00:00
Matthias Clasen
ec39ddee63 Help static analysis with an assertion
It is hard for clang to see that layouts will
always be smaller than num_layouts, so just assert
that.
2020-05-25 20:56:09 -04:00
Emmanuele Bassi
0cf5b66e7b Add private accessor for GdkKeyEvent.translated
Avoid accessing the event structure directly, even from within GTK.
2020-05-24 15:19:01 +01:00
Matthias Clasen
6d8153d8fd gdk: Short-circuit some surface setters
Don't call into the backends when the input region
or shadow width don't actually change. This avoid
distracting calls in debug logs, and just generally
is the right thing to do.
2020-05-20 10:55:27 -04:00
Timm Bäder
ae711d8301 gdkdisplay-wayland: only remove one monitor
Ids here are unique, so break out of the loop once we found the monitor
with the given ID.
2020-05-20 15:51:11 +02:00
Rico Tzschichholz
ebaeb9f3b8 gdk: Preserve typed event parameter of GdkSurface:event signal for gir
In conjunction to https://gitlab.gnome.org/GNOME/gtk/merge_requests/1936
2020-05-20 08:48:34 +02:00
Christian Hergert
fa08d848ca device: remove get_toplevel from surface_at_position vfunc
This is not used anymore now that surfaces are always toplevel in the
semantics of GdkWindow where child windows were available. We can drop
that and simplify the vfunc just a bit more.

Fixes #2765
2020-05-19 13:07:38 -07:00
Olivier Fourdan
93f9138c9b x11: update inhibit shortcuts on grab broken
On X11, shortcuts inhibition is emulated using a grab on the keyboard.

So if another widget ungrabs the keyboard behind our back (for example
when a popup window is dismissed) that effectively disables the effects
of the shortcut inhibition on the surface and we need to update the
shortcut inhibition status accordingly.

Check for "grab-broken" events on the surface and clear existing
shortcuts inhibition for the matching seat, so that the client can be
notified and may decide to re-enable shortcut inhibition if desired.
2020-05-19 14:51:25 +02:00
Emmanuele Bassi
dd4d6930b5 Use the right types for the GdkSurface::event arguments
We pass the GdkEvent as a pointer, because the autogenerated marshallers
don't know how to handle GTypeInstance-derived classes.

Since the GValue box that we use in the marshaller passes the GdkEvent
instance as is, we also need to acquire a reference before invoking the
closure, and release it afterwards, to ensure that the GdkEvent instance
survices the invocation.
2020-05-19 12:21:22 +01:00
Emmanuele Bassi
9bd9a11de4 docs: Fix the argument name to match
Both gtk-doc and g-i require the name of the argument of a function to
match in the declaration, definition, and gtk-doc stanza.
2020-05-18 14:55:25 +01:00
Matthias Clasen
d6818475d7 gdk: Simplify gdk_display_supports_input_shapes
Make this a display property, and do away with
the vfunc in favor of a private setter, to match
how we handle other display characteristics.
2020-05-17 22:05:24 -04:00
Matthias Clasen
287c40276a gdk: Drop gdk_display_supports_shapes
The apis to set shapes on surfaces are gone,
so there is no point in providing this information
on GdkDisplay.
2020-05-17 21:52:15 -04:00
Matthias Clasen
5916ae5ec4 x11: Avoid some frontend api use
We can just use our backend information directly.
2020-05-17 21:47:22 -04:00
Matthias Clasen
03829e191e docs: Tweak docs for gdk_surface_set_input_region 2020-05-17 21:46:54 -04:00
Matthias Clasen
71bad81aff gdk: Make gdk_drag_begin take doubles
This is a better fit to the way we treat coordinates
everywhere else.
2020-05-17 17:51:03 -04:00
Matthias Clasen
c0faf0c6b6 Merge branch 'toplevel-move-resize' into 'master'
Toplevel move resize

See merge request GNOME/gtk!1923
2020-05-17 19:15:46 +00:00
Matthias Clasen
1e8a58e367 gdk: Move the begin_move/resize_drag vfuncs around
Move these from GdkSurface to GdkToplevel, where they
belong. Update all backends.
2020-05-17 14:15:06 -04:00
Benjamin Otte
34d7e25a1f x11: Fix up for last merge 2020-05-17 19:21:28 +02:00
Benjamin Otte
b353221185 Merge branch 'wip/otte/monitors' into 'master'
various GDK cleanups

See merge request GNOME/gtk!1920
2020-05-17 16:57:52 +00:00
Matthias Clasen
eb6edac4bd gdk: Drop gdk_surface_begin_move/resize_drag
These have been replaced by GdkToplevel api.
2020-05-17 12:49:29 -04:00
Matthias Clasen
309a7aa253 gdk: Add gdk_toplevel_begin_move/resize
For now, these are wrappers around the surface apis,
but they are going to replace them, since this operation
is only available on toplevels.
2020-05-17 12:41:16 -04:00
Benjamin Otte
4c7914dc49 display: Remove unneeded getters
Applications can use the listmodel instead.
2020-05-17 07:32:37 +02:00
Benjamin Otte
9a30019268 display: Remove the monitor signals
Applications can listen to GdkDisplay:monitors::items-changed if they
want to track monitor changes.
2020-05-17 07:10:34 +02:00
Benjamin Otte
972276436f x11: Directly notify surfaces of monitor changes
Do not use signals.
2020-05-17 07:10:34 +02:00
Benjamin Otte
e81a1db48c monitor: Add gdk_monitor_set_geometry()
Make it replace gdk_monitor_set_size() and gdk_monitor_set_position()
which used to be called in pairs anyway.
2020-05-17 07:10:34 +02:00
Benjamin Otte
33a4442988 x11: Remove unused change tracking
Change tracking now works automatically via GdkMonitor.
2020-05-17 05:14:24 +02:00