Commit Graph

54419 Commits

Author SHA1 Message Date
Timm Bäder
5c66f2ec19 accellabel: Stop saying it's a GtkLabel
And clean up the includes accordingly.
2018-03-27 18:20:52 +02:00
Timm Bäder
331af6815b accellabel: Remove some unnused class fields 2018-03-27 18:20:52 +02:00
Timm Bäder
33b2bfa81f accellabel: Remove priv pointer 2018-03-27 18:20:52 +02:00
Emmanuele Bassi
1b62d28cbb ci: Move flatpak building to a script
The YAML is getting hard to modify, so let's use a simple script like we
do for the other CI jobs.
2018-03-27 12:47:05 +01:00
Emmanuele Bassi
69441cbace Do not test for linker flags
Meson warns when doing that, as it's not really portable.

Since we're using platform-specific linker flags on Darwin, we can also
do the same on Linux; the syntax is GCC-specific, so we're going to need
Clang users to test it.
2018-03-27 12:47:05 +01:00
Benjamin Otte
b9445f4d7e Merge branch 'krnowak/leak-fixes' into 'master'
Fix some leaks

See merge request GNOME/gtk!87
2018-03-27 11:37:24 +00:00
Krzesimir Nowak
06661da8b0 Fix some leaks 2018-03-27 13:14:41 +02:00
Timm Bäder
b26e584e29 gl renderer: Rename everything called window to surface 2018-03-26 21:13:52 +02:00
Timm Bäder
81d19154a3 entry: Remove useless queue_draw call
This is already taken care of by the add_class/remove_class.
2018-03-26 20:03:00 +02:00
Benjamin Otte
f494d6ae1f snapshot: Generate better names for offset nodes 2018-03-26 19:43:06 +02:00
Benjamin Otte
353ad30b12 rendernode: Fix serializing
Adding the offset node broke serialization in 2 ways:

1. We store the enum value in the node, so make sure to not change it
   for existing values
2. The offset node was missing in the deserialization lookup table
2018-03-26 19:43:06 +02:00
Benjamin Otte
e2ee2a6dab iconhelper: Apply scale to paintable
Instead of fiddling around with scale in the iconhelper (and getting it
wrong), create a GtkScaler around the paintable that takes care of the
scaling.
2018-03-26 18:46:22 +02:00
Benjamin Otte
5e99646e1c dnd: Remove gtk_drag_set_icon_surface()
All users are gone. Use gtk_drag_set_icon_paintable() instead.
2018-03-26 18:32:38 +02:00
Benjamin Otte
cc9908353c tests: Don't use gtk_drag_set_icon_surface() 2018-03-26 18:30:34 +02:00
Benjamin Otte
9afbf02bc2 textview: Port dnd icon to be a GdkPaintable 2018-03-26 18:16:37 +02:00
Benjamin Otte
3f28a6851b colorswatch: Port drag icon to paintables 2018-03-26 18:16:36 +02:00
Benjamin Otte
8e3e321da4 colorbutton: Port dnd icon to paintable
Patch is untested, because colorbuttons can't do DND at the moment.
2018-03-26 18:16:36 +02:00
Benjamin Otte
aa1d1e4189 treeview: Turn drag icon into paintable 2018-03-26 18:16:36 +02:00
Benjamin Otte
a269e9a266 iconview: Port DND icons to snapshot paintables 2018-03-26 18:16:36 +02:00
Benjamin Otte
5415d05359 tests: Remove references to long-deleted property 2018-03-26 18:16:36 +02:00
Benjamin Otte
60719bb67c textutil: Make gtk_text_util_create_drag_icon() return a paintable 2018-03-26 18:16:36 +02:00
Benjamin Otte
7fdcc58532 snapshot: Add gtk_snapshot_to_paintable()
This is intended for DND icons
2018-03-26 18:16:36 +02:00
Benjamin Otte
9b83116fcb snapshot: Export gtk_snapshot_append_layout()
This is the equivalent snapshot function to pango_cairo_show_layout().

Not to be confused with gtk_snapshot_render_layout(), which is the
equivalent to gtk_render_layout().
2018-03-26 18:16:36 +02:00
Benjamin Otte
e6d24f4c15 snapshot: Make gtk_snapshot_append_node() take care of offset
Push an offset node when append_node is called. That resets the offset.
2018-03-26 18:16:36 +02:00
Benjamin Otte
ce743f28a1 rendernode: Add an offset node
This is a special case of the transform node that does a 2D translation.

The implementation in the Vulkan and GL renderers is crude and just does
the same as the transform node.

Nothing uses that node yet.
2018-03-26 18:16:36 +02:00
Piotr Drąg
b8b6324c4c Update Polish translation 2018-03-26 01:42:57 +02:00
Benjamin Otte
8c43f22e3e colorscale: Draw gradient using render nodes
Don't use Cairo when it's not needed.
2018-03-26 00:31:12 +02:00
Benjamin Otte
438b4b6b5c colorscale: Draw hue background as a texture
No need to use Cairo here.
2018-03-26 00:31:12 +02:00
Benjamin Otte
b16ac01a03 colorplane: Create background image as a texture
Don't create it using Cairo.
2018-03-26 00:31:12 +02:00
Matthias Clasen
448d2502d9 Merge branch 'bz773274' into 'master'
wayland: Don't paint if the window is unmapped

See merge request GNOME/gtk!32
2018-03-25 20:44:44 +00:00
Benjamin Otte
6bad307180 colorscale: Don't free surface data before surface
When drawing onto a recording surface, source surfaces get cached.

But if we g_free() the surface data after we're done, that cache is
gonna point at invalid data...
2018-03-25 22:38:42 +02:00
Timm Bäder
98a9f2b3c1 GdkGLContext: Add a GL debug message callback
If G_ENABLE_CONSISTENCY_CHECKS is defined (i.e. if our buildtype is
'debug'), add a opengl debug callback that prints all debug messages
with a severity higher than SEVERITY_NOTIFICATION as a warning to the
console.
2018-03-25 21:04:36 +02:00
Timm Bäder
433517fdc9 gl renderer: Skip all 0-sized nodes
These will cause problems later on.
2018-03-25 11:47:57 +02:00
Timm Bäder
7240178988 gl renderer: Remove cairo node special case 2018-03-25 11:47:57 +02:00
Emmanuele Bassi
eb382c1321 ci: Remove --werror
Turns out that GCC errors out when building the GLib test suite, as it
now checks for overflows in allocator functions, and we're testing for
those.

This would not be an issue for GTK, but since we're building GLib as a
subproject, we get failures for those as well.

Until we can find out how to disable errors for subprojects, or fix the
GLib test suite not to trip up warnings in GCC, we're going to live
without compiler warnings treated as errors for a while.
2018-03-25 00:31:36 +00:00
Emmanuele Bassi
cfeab26de0 ci: Use the appropriate argument for errors
The option to enable fatal warnings in Meson is `--werror`.
2018-03-25 00:00:02 +00:00
Daniel Boles
f8ecd488cd Menu: Don't leak priv->motion_controller 2018-03-24 22:01:02 +00:00
Benjamin Otte
b83cd9e818 ci: build with -Werror 2018-03-24 22:27:28 +01:00
Emmanuele Bassi
ba65c1ae58 ci: Disable ccache
Forcibly remove any ccache use, even if it's installed.
2018-03-24 21:17:34 +00:00
Emmanuele Bassi
fe45cf9c09 docs: Style fixes for the contribution guidelines 2018-03-24 21:16:16 +00:00
Benjamin Otte
1cfa88ed91 snapshot: Remove renderer
Now that there's no longer a need to keep the renderer around for Cairo
rendering, don't do that then.
2018-03-24 21:57:20 +01:00
Benjamin Otte
e84c6acc4f rendernode: Remove renderer argument
It's not needed to create Cairo nodes anymore.
2018-03-24 21:57:20 +01:00
Benjamin Otte
df600669a2 rendernode: Create Cairo surfaces as recording surfaces
This way, we can postpone the actual rendeing of the node until the
renderer. This allows the renderer to choose the right scale to
render at, so it can decide to use 2x scale for hidpi on its own.

Last but not least, it makes all nodes independent of the context they
are created in, because they do not need to know at snapshot time what
they will ultimately be rendered into.
2018-03-24 21:57:20 +01:00
Benjamin Otte
f680d5d130 vulkan: Remove special case for Cairo surfaces
This is in preparation for the next commits which switch Cairo nodes to
recording surfaces.
2018-03-24 21:57:20 +01:00
LRN
9c0c1702d5 Merge branch 'lrn/bug-773299' into 'master'
bug 773299 2nd

See merge request GNOME/gtk!79
2018-03-24 11:08:36 +00:00
Руслан Ижбулатов
5ff9e34fbb GDK W32: Adapt DnD event putting to recent changes
Set the display for each event that we put.
Also reorganize the dnd_event_put() function a bit, giving it a surface
directly instead of setting it by implication.

https://bugzilla.gnome.org/show_bug.cgi?id=773299
2018-03-24 10:59:02 +00:00
LRN
0c3d757ba2 Merge branch 'lrn/bug-773299' into 'master'
bug 773299

See merge request GNOME/gtk!78
2018-03-24 10:46:59 +00:00
Руслан Ижбулатов
b8e6d06372 GDK W32: Don't check dest_surface for != NULL on button events
dest_surface is going to always be NULL for source contexts.
Previously we used to put the root window there to pass this check,
but root windows are gone (and root surfaces never existed to begin
with), so we have to adapt.

https://bugzilla.gnome.org/show_bug.cgi?id=773299
2018-03-24 10:28:11 +00:00
Руслан Ижбулатов
6b50788901 GDK W32: Init display scale to the global Windows scale, not 1
This affects gdk_device_query_state() for the virtual device. It has
no window, and is forced to query the display itself, and display
defaults its scale to 1 even for HiDPI desktops. Use the same
"query scale of a NULL monitor" trick that we use in other places
to get the global desktop scale.

https://bugzilla.gnome.org/show_bug.cgi?id=773299
2018-03-24 10:09:54 +00:00
Руслан Ижбулатов
6bdb004dfd GDK W32: adapt to the recent changes in GdkEvent
https://bugzilla.gnome.org/show_bug.cgi?id=773299
2018-03-24 10:09:52 +00:00