Commit Graph

57438 Commits

Author SHA1 Message Date
Jonas Ådahl
3a1ef7aa2c widget: Move surface relative transform fields into its own struct
The purpose being to reduce the size of GtkWidgetPrivate. What is left
is a pointer to the allocated struct.
2019-04-25 16:02:19 +02:00
Jonas Ådahl
1ad406e15d widget: Remove leftover parent-changed handler removal
It was never added, as the listener was replaced by explicit code in
gtk_widget_(un)root(), but the removal code was left in place in error.
2019-04-25 14:29:19 +02:00
Jonas Ådahl
477ad2505b widget: Add surface relative transform changed callback
Added two new private GtkWidget API:

 * gtk_widget_add_surface_transform_changed_callback()
 * gtk_widget_remove_surface_transform_changed_callback()

The intention is to let the user know when a widget transform relative
to the surface changes. It works by calculating the surface relative
transform during allocation, and notifying the callbacks if it changed
since last time. Each widget adds itself as a listener to its parent
widget, thus will be triggered if a parents surface relative transform
changes.
2019-04-24 14:26:24 +02:00
Timm Bäder
91bbe6ef95 gl renderer: Sync gpu and cpu default alpha value
Otherwise we might end up not passing the new value to the GPU.
2019-04-24 13:29:45 +02:00
Timm Bäder
34fcfb154a gl renderer: Properly apply opacity in cross-fade shader 2019-04-24 13:29:45 +02:00
Daniel Mustieles
28815bc7e4 Updated Spanish translation 2019-04-24 09:52:46 +02:00
Matthias Clasen
8eaa8aaaf8 Merge branch 'simplify-fixes' into 'master'
Simplify fixes

See merge request GNOME/gtk!770
2019-04-23 21:39:29 +00:00
Matthias Clasen
491829a2b5 builder-tool: Check canonical names
Always canonicalize names before comparing.
We were missing properties like left_attach,
since we were comparing them to left-attach.
2019-04-23 17:30:00 -04:00
Matthias Clasen
28be1c5d3a builder-tool: Fix property check
Embarrassingly, there was a missing else
causing us to check all packing properties
as object properties, never finding them.
2019-04-23 21:25:59 +00:00
Timm Bäder
65ff19d149 eventcontrollermotion: Document missing signal parameters 2019-04-23 17:24:51 +02:00
Timm Bäder
3da6e83609 cssprovider: Fix a parameter name mismatch 2019-04-23 17:24:07 +02:00
Benjamin Otte
2a7e4ae7f6 testsuite: Don't pretend we're a GTest
This is a meson test, not a GTest thing. So:

- Use g_print(), not g_test_message
That makes meson test --verbose print the actual log messsages.

- Don't g_assert() all the time
Instead, run tests through to the end and just return a non-0 exit
status.
2019-04-23 17:09:14 +02:00
Timm Bäder
cc878ec00f gl renderer: begin/end_frame around do_render
This fixes rendering to a texture on intel hardware. The glClear calls
would throw a GL_FRAMEBUFFER_INCOMPLETE error here, because the
gsk_gl_driver_begin_frame() call in do_render() reset the framebuffer
object in use.
2019-04-23 17:09:14 +02:00
Timm Bäder
1f5649e1ce GdkWaylandDevice: Don't recreate the default cursor every frame
Save the information whether the cursor in use is the default one, and
don't create a new cursor object in that case.
We previously created a new cursor object every frame just to compare it
to the current cursor in use and then throw it away.
2019-04-23 17:09:14 +02:00
Daniel Mustieles
ca19b940ce Updated Spanish translation 2019-04-23 10:30:35 +02:00
Daniel Mustieles
3f70d20bb3 Updated Spanish translation 2019-04-23 10:29:32 +02:00
Matthias Clasen
304e06541e Merge branch 'forgotten-file' into 'master'
window: Remove dropped api from headers

See merge request GNOME/gtk!769
2019-04-23 01:37:39 +00:00
Matthias Clasen
c91371951a window: Remove dropped api from headers
This was forgotten in fed2db1493.
2019-04-23 01:23:01 +00:00
Benjamin Otte
6e59c5c843 gdk: Remove gdk_surface_invalidate_rect() from public API
It's still available for backends, but public API (read: GTK) is
meant to only call gdk_surface_queue_expose() and track its
invalid region itself.
2019-04-21 20:08:05 +02:00
Matthias Clasen
f5a8b79cfb Merge branch 'unused-typehint' into 'master'
gdk: Remove an unused field

See merge request GNOME/gtk!767
2019-04-21 15:41:25 +00:00
Matthias Clasen
c723893f09 gdk: Remove an unused field
Its not used, so get rid of it.
2019-04-21 11:19:42 -04:00
Matthias Clasen
a247529bc8 Merge branch 'drop-skip-pager' into 'master'
window: Drop some x11-specific apis

See merge request GNOME/gtk!766
2019-04-20 02:46:26 +00:00
Matthias Clasen
51b2759eb1 surface: Drop group api
This was only ever implemented on X11, and
GTK is not using it at all. Relegate it to
x11-specific api.
2019-04-20 02:28:46 +00:00
Matthias Clasen
fed2db1493 window: Drop some x11-specific apis
The skip-taskbar, skip-pager and urgency hints were
only ever implemented for X11, and are not very useful
with modern desktops. Relegate the functionality to
x11 backend api, and drop the GtkWindow api.
2019-04-20 02:28:46 +00:00
Matthias Clasen
77ff83cdd1 Fix a compiler warning 2019-04-19 13:58:52 -04:00
Matthias Clasen
37fee8c52f wayland: Improve debug output for events
We were missing surfaces in a few places.
2019-04-19 13:58:45 -04:00
Benjamin Otte
08c84bc830 Merge branch 'cairo-borders-fixage' into 'master'
Cairo borders fixage

See merge request GNOME/gtk!765
2019-04-19 01:48:59 +00:00
Benjamin Otte
9b6f822f15 rendernode: Fix border rendering
This fixed the reftest introduced in the previous commit.

I'm using a mesh gradient here instead of drawing 4 individual sides to
avoid artifacts when those sides overlap in rounded corners.
2019-04-19 03:39:57 +02:00
Benjamin Otte
70fb29e81a reftests: Add a reftest for rendering failure
c18d2872f2 introduced a misrendering in
the Cairo fallback rendering code while fixing another one.

This test exposes that problem.

Related: !756
2019-04-19 03:39:57 +02:00
Matthias Clasen
0e26e95b00 window: Fix an oversight
We must still reset cursors.
2019-04-18 20:15:39 +00:00
Matthias Clasen
ba1c5cf43f Merge branch 'cursor-things' into 'master'
Cursor things

See merge request GNOME/gtk!764
2019-04-18 19:38:56 +00:00
Matthias Clasen
f3821031e0 window: Stop juggling cursors
We have convenience api for this.
2019-04-18 15:07:01 -04:00
Matthias Clasen
e37f4d0ea6 text: Stop juggling cursors
We have a convenience api for this.
2019-04-18 15:06:35 -04:00
Matthias Clasen
b26087845d label: Stop juggling cursors
We have a convenience api for this.
2019-04-18 15:06:09 -04:00
Matthias Clasen
891b343197 Merge branch 'style-prop-change' into 'master'
Style prop change

See merge request GNOME/gtk!763
2019-04-18 18:20:06 +00:00
Matthias Clasen
8727b0708e css: Kerning affects text size
Thats the point. And we were missing the proper
flags to make GTK do the right thing when
changing font-kerning in the inspector.
2019-04-18 18:08:10 +00:00
Matthias Clasen
1932a50d36 css: Some updates to internal docs
Minor corrections to the AFFECTS flags docs.
2019-04-18 18:04:58 +00:00
Matthias Clasen
5a5da91785 Merge branch 'letterspacing-resize' into 'master'
css: Letterspacing affects text size

See merge request GNOME/gtk!762
2019-04-18 17:46:35 +00:00
Carlos Garnacho
de2e0f451f Merge branch 'wip/carlosg/tablet-cursors-hidpi-master' into 'master'
gdk/wayland: Listen to wl_surface events on tablet cursors

Closes #1675

See merge request GNOME/gtk!761
2019-04-18 17:35:45 +00:00
Matthias Clasen
8400d8e75d css: Letterspacing affects text size
It does. And we were missing the proper
flags to make GTK do the right thing when
changing letter-spacing in the inspector.
2019-04-18 17:34:44 +00:00
Carlos Garnacho
50eb11a2a0 gdk/wayland: Listen to wl_surface events on tablet cursors
And update the surface accordingly (eg. scale on hidpi). The mechanism
that did that for wl_pointer has been made generic so it can be shared
with tablets too.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1675
2019-04-18 19:27:29 +02:00
Matthias Clasen
e8f898508a Merge branch 'handle-tool-scale-fix' into 'master'
gdkdevice-wayland: Update pointer scale on tablet tool proximity events

See merge request GNOME/gtk!582
2019-04-18 16:55:28 +00:00
Jonas Ådahl
638a3c142c Merge branch 'wayland-cursor-hotspot' into 'master'
wayland: Avoid using uninitialized memory

Closes #1328

See merge request GNOME/gtk!757
2019-04-18 14:35:06 +00:00
Matthias Clasen
ecdad20827 wayland: Avoid using uninitialized memory
_gdk_wayland_cursor_get_buffer was not initializing
its out variables in the 'not found' case. This
was showing up in protocol traces as garbage hotspots
being sent to the compositor.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1328
2019-04-18 14:27:00 +00:00
Benjamin Otte
5cd8e0f7f1 testsuite: Add theme-validate test
The test just loads all of GTK's themes and makes sure they cause no
errors or warnings from the CSS parser.
2019-04-18 02:28:42 +02:00
Benjamin Otte
83696639a7 themes: Regenerate CSS
Seems to have been forgotten a few times.
2019-04-18 02:28:15 +02:00
Benjamin Otte
1aa1610611 cssprovider: Export correct API
gtk_css_provider_get_named() is the old GTK3 style API to load themes.

Instead, export the function we currently use,
gtk_css_provider_load_named().

As a side effect we allow people to load a theme as often as they want
without conflicting with GTK's theme.
2019-04-18 02:26:04 +02:00
Matthias Clasen
0c87b62251 Survive absence of librsvg without criticals
We can't guarantee that we can load svgs, so
we shouldn't spew criticals when some of our
own resources fail to load due to that reason.
2019-04-18 00:14:00 +00:00
Matthias Clasen
69f12ed6a5 Avoid a crash without librsvg
gtk_css_image_recolor_load_texture may leave
recolor->text as NULL without setting error.
No need to crash for that.
2019-04-18 00:13:53 +00:00
Matthias Clasen
a8db330341 HighContrast: Fix a typo
The new css parser complains about an unknown pseudo-class
here.
2019-04-18 00:13:48 +00:00