Jonas Ådahl
251bd15597
wayland: Apply new surface state at the beginning of a frame
...
Concentrate state application to the start of a frame; this is to avoid
having GTK going back and forth between different state if so would
happen between two frames.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
dd738d2787
surface: Only keep state 'withdrawn' after hiding
...
A hidden surface should start from a clean slate when showing again, so
clear any now out of date state.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
18d92c3f16
wayland: Keep pending initial state separate
...
Queue it, and then wait for it to actually take effect, i.e. be
confirmed via a configure event from the compositor, before setting the
actual GdkSurface::state value.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
f4c36fe1ce
gdk/surface: Add API to queue and apply state changes
...
This will be used to compress state changes and apply as part of a frame
clock dispatch.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
23d7392eb9
gdk/surface: Removed unused struct field
...
The 'old_state' wasn't used anywhere, lets remove it.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
996eeec16c
gtk/window: Don't gdk_toplevel_present() if not mapped
...
That would map the window too early.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
641915974b
gdk/toplevel: Make gdk_toplevel_present() async
...
The plan is to concencrate size computations as part of the frame clock
dispatch, meaning we shouldn't do it synchronously in the present()
function.
Still, in Wayland, and maybe elsewhere, it is done in the present()
function, e.g. when no state change was made, but this will eventually
be changed.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
528ec4dded
wayland: Only set mapped state when mapped
...
Mapping a surface under Wayland is an asynchronous process, where one
creates a surface and commits an initial state without having drawn
anything, then waiting for a configuration, which then is acknowledged
and content is painted and committed. Not until having received this
configuration is a surface actually mapped, so wait with setting the
mappedness until this.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
366b946f5b
wayland/popup: Use maybe_notify_mapped() helper
2020-12-07 09:46:38 +01:00
Jonas Ådahl
9e6a55a086
wayland: Decouple mapped state from surface creation
2020-12-07 09:46:38 +01:00
Christian Hergert
285781724f
macos: set opengl view as opaque in opaque windows
...
We don't need the OpenGL view to be transparent if the window itself
is not transparent. This has the potential to speed up the compositing
of the GL view onto the NSWindow.
2020-12-06 20:14:52 -08:00
Emmanuele Bassi
2d103cf80c
Merge branch 'wayland-inhbit0' into 'master'
...
wayland: avoid referencing unallocated memory when uninhibiting
See merge request GNOME/gtk!2927
2020-12-07 00:26:50 +00:00
Michael Terry
c8d991e4de
wayland: avoid referencing unallocated memory when uninhibiting
2020-12-06 18:37:40 -05:00
Zander Brown
a165bb9f46
Update British English translation
2020-12-06 22:08:30 +00:00
Timm Bäder
33ed42d985
gl renderer: Remove RESET_OPACITY flag
...
We always need to do that (and always passed the flag to
add_offscreen_ops() anyway).
2020-12-06 20:03:35 +01:00
Timm Bäder
1ee4f6138b
gl renderer: Reset opacity when rendering blend node children
...
We render those on a texture, so we need to reset the opacity because
that will be applied when rendering the resulting texture.
2020-12-06 20:01:36 +01:00
Timm Bäder
7b61ef9e0f
gl renderer: Initialize rounded rect early
2020-12-06 19:57:48 +01:00
Timm Bäder
b46d077b3a
gl renderer: Fix rendering clipped blurred inset shadow nodes
2020-12-06 19:18:10 +01:00
Timm Bäder
e32331d002
gl renderer: Ignore crossfades between equal texture nodes
2020-12-06 19:18:10 +01:00
Timm Bäder
05928608ec
gl renderer: Use scale_x and scale_y everywhere
...
Try to handle two different values for scale in horizontal and vertical
direction better.
Fixes #3431
2020-12-06 19:18:05 +01:00
Emmanuele Bassi
d8c9a67d20
docs: Clarify gtk_widget_activate()
...
We need to tell people what signal will be emitted when calling
gtk_widget_activate(), and that the shortcuts API might be more
appropriate to what they are looking for.
2020-12-06 15:13:57 +00:00
Emmanuele Bassi
c352fe9ab0
Move activate_signal to the widget private class data
...
Instead of having it as a field in the class structure.
2020-12-06 15:06:18 +00:00
Emmanuele Bassi
e396874f3c
Merge branch 'ebassi/a11y-leak' into 'master'
...
a11y: Plug a leak in the AT-SPI context
Closes #3450
See merge request GNOME/gtk!2926
2020-12-05 20:52:04 +00:00
Emmanuele Bassi
f6c53ced0d
a11y: Plug a leak in the AT-SPI context
...
Fixes : #3450
2020-12-05 20:25:30 +00:00
Matthias Clasen
ee26e282cc
Update contribution guide
...
Make my feelings about bug reporting by screencast known.
2020-12-05 11:34:52 -05:00
Matthias Clasen
894f893223
Merge branch 'revert-round-windows' into 'master'
...
Revert "theme: Round all window corners"
See merge request GNOME/gtk!2921
2020-12-05 15:10:16 +00:00
Piotr Drąg
67d7e2007f
Update POTFILES.in
2020-12-05 15:05:48 +01:00
Emmanuele Bassi
3a9cca74fc
Use WidgetClass.activate_signal getter function
2020-12-05 01:04:18 +00:00
Emmanuele Bassi
fe9c0db603
Add getter for WidgetClass.activate_signal
...
Just like we have a setter.
2020-12-05 01:04:18 +00:00
Emmanuele Bassi
fde32c5219
Use private can_activate() method
...
Instead of checking the activate_signal field directly.
2020-12-05 01:04:18 +00:00
Emmanuele Bassi
213024a560
Use function setter for WidgetClass.activate_signal
2020-12-05 01:04:18 +00:00
Emmanuele Bassi
e5e18ddffb
Add private method to check activatability
...
We should have an actual method, instead of checking the
WidgetClass.activate_signal directly.
2020-12-05 01:04:18 +00:00
Emmanuele Bassi
b3e03fa6f0
Add wrappers for setting the WidgetClass.activate_signal field
...
Setting a field on a class structure is not always an easy task from
languages other than C. While bindings can provide access to the class
pointer, twiddling the fields in the class structure can be awkward.
Additionally, signal ids are not always readily available.
We can paper over the direct access to the class structure, as well as
the "signal name to id" mapping with a simple couple of setter
functions.
2020-12-05 01:04:18 +00:00
Emmanuele Bassi
c0586ca6e2
Merge branch 'wip/jfelder/customsorter-null' into 'master'
...
customsorter: Add missing nullable annotation
See merge request GNOME/gtk!2923
2020-12-04 23:39:48 +00:00
Jean Felder
4430314514
customsorter: Add missing nullable annotation
2020-12-05 00:04:36 +01:00
Emmanuele Bassi
4087055b18
Merge branch 'wip/chergert/gdk-macos-for-master' into 'master'
...
macos: fix GL renderer for macOS
Closes #3420
See merge request GNOME/gtk!2922
2020-12-04 22:37:00 +00:00
Christian Hergert
a47c0065fb
macos: enable GL renderer by default
...
Now that the attribute locations are fixed for the GL renderer, we can
enable it by default on macOS.
Fixes #3420
2020-12-04 13:41:31 -08:00
Christian Hergert
6883c2214b
gl: specify attribute locations for vUv and aPosition
...
These positions are not guaranteed to be in a specific order when linked
into the final GPU program. They need to be specified so that our code
in gskglrenderer.c can use known positions for them to match up with
our GskQuadVertex.
This fixes the GL renderer on macOS's OpenGL shader compiler.
Fixes #3420
2020-12-04 13:33:34 -08:00
Matthias Clasen
7f6fdd6e7b
Merge branch 'matthiasc/for-master' into 'master'
...
emoji chooser: Fix incremental loading
Closes #3438
See merge request GNOME/gtk!2920
2020-12-04 17:21:56 +00:00
Matthias Clasen
24124452d5
docs: Fix up GtkPicture docs
...
These were missing proper linking.
2020-12-04 11:47:43 -05:00
Matthias Clasen
0dff89d9fb
Revert "theme: Round all window corners"
...
This reverts commit e46522e4b5
.
2020-12-04 11:13:26 -05:00
Matthias Clasen
f0f64f42ee
emoji chooser: Fix incremental loading
...
This broke when we started using GDK_PROFILER_CURRENT_TIME for
timekeeping - that gets defined to 0 when we're building without
sysprof, so we can use it to make such determinations. Go back
to using g_get_monotonic_time().
Fixes : #3438
2020-12-04 11:09:43 -05:00
Matthias Clasen
d278afc85b
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2918
2020-12-04 04:12:41 +00:00
Matthias Clasen
423b8209a1
gtk-demo: Use a native filechooser in the words demo
2020-12-03 22:31:05 -05:00
Benjamin Otte
559f74e0c1
Merge branch 'picture-docs2' into 'master'
...
Add docs about sizing pictures
See merge request GNOME/gtk!2917
2020-12-04 02:04:19 +00:00
Benjamin Otte
66c3a43e96
Add docs about sizing pictures
...
Suggested by Christopher Davis.
2020-12-04 02:04:19 +00:00
Matthias Clasen
d83554121f
gtk-demo: Use a native file chooser in the svg demo
2020-12-03 19:44:45 -05:00
Matthias Clasen
2688b94133
gtk-demo: Use a native filechooser in the video demo
2020-12-03 19:44:34 -05:00
Matthias Clasen
e035baee8a
gtk-demo: Remove empty row in the pickers demo
...
The file chooser button is gone.
2020-12-03 19:25:04 -05:00
Emmanuele Bassi
f1ff8f9aad
Merge branch 'wip/chergert/macos-decelerate' into 'master'
...
macos: fix typo when creating scroll events
Closes #3418
See merge request GNOME/gtk!2916
2020-12-03 22:54:46 +00:00