Commit Graph

49930 Commits

Author SHA1 Message Date
Benjamin Otte
fb47a8d714 css: Remove deprecated number-as-pixels compatibility
Previously, for compatibility with GTK 3.0, we allowed specifying
numbers without units and interpreted them as pixels, even when the CSS
specification didn't.

Remove that now that we can break API.
2017-01-18 04:13:56 +01:00
Benjamin Otte
bd24ca5b18 vulkan: Add support for unblurred box-shadow 2017-01-18 04:13:56 +01:00
Benjamin Otte
84c1204853 rendernode: Add getters for box-shadow nodes 2017-01-18 04:13:56 +01:00
Benjamin Otte
2ae6f59e7a docs: Remove mention of GdkColor 2017-01-18 04:13:56 +01:00
Matthias Clasen
95834ad1e1 Revert "filechooser portal: Make sure we can save"
This reverts commit 4875c689a0.

This was a thinko. Writable is not actually settable from the
application side, but only for the user, from the backend side.
2017-01-17 14:14:44 -05:00
Matthias Clasen
4875c689a0 filechooser portal: Make sure we can save
Explicitly request files for saving to be writable, otherwise
we are at the mercy of the portal, which currently gets it wrong.
2017-01-17 14:09:55 -05:00
Rui Matos
7a1b30f16e gdk/wayland: Always get the seat's key modifiers from the GdkKeymap
Elsewhere we already go through the keymap to get modifiers so we
should do the same here. In fact, this was relying on xkb modifier
mask values being bitwise compatible with GdkModifierType which isn't
necessarily true.

https://bugzilla.gnome.org/show_bug.cgi?id=770112
2017-01-17 18:24:28 +01:00
Rui Matos
515b71f14c gdk/wayland: Don't add GDK_META_MASK to gdk mod masks if MOD1 is set
Gtk+ treats MOD1 as a synonym for Alt, and does not expect it to be
mapped around, so we should avoid adding GDK_META_MASK if MOD1 is
already included to avoid confusing gtk+ and applications that rely on
that behavior.

https://bugzilla.gnome.org/show_bug.cgi?id=770112
2017-01-17 18:24:28 +01:00
Jonas Ådahl
7ca6d7585f wayland: Handle subsurface as popup parent
When a subsurface is used as a parent of a popup, GDK needs to traverse
up to the transient-for as the next parent, to properly find the parent
used by the popup positioner. This is because the parent of a popup
must always either be an xdg_popup or an xdg_surface, but traversing
the "parent" (in GDK terms) upwards from a subsurface will end up on
the fake root window before we hit the actual parent (in Wayland terms).

https://bugzilla.gnome.org/show_bug.cgi?id=776225
2017-01-17 09:02:41 +01:00
Benjamin Otte
01d16524da vulkan: Add fallback message for node-as-texture
This is mainly to motivate me to implement it.
2017-01-17 06:38:36 +01:00
Benjamin Otte
6bec7aae89 vulkan: Generate clip shaders from same source
Instead of having 3 different shaders for the different clipping
versions, just have one shader and use a preprocessor define to use
different clip functions.

That preprocessor define is set in the Makefile.

Also use foo.frag and foo.vert as the file extensions instead of using
foo.frag.glsl and foo.vert.glsl, as that's what glslc suggests as
extension.
2017-01-17 06:17:55 +01:00
Benjamin Otte
3768c676c6 vulkan: Add clip.vert.glsl
Implement clipping the same way as in the last commit for the
fragment shaders.
2017-01-17 06:17:55 +01:00
Benjamin Otte
cf65443fb3 vulkan: Add a clip.frag.glsl include
This include is supposed to handle clipping for the different clipping
methods.

So far, we only use it in the rounded rect cases.
2017-01-17 06:17:55 +01:00
Benjamin Otte
6a60e335cd vulkan: Add push constants to fragment shader
That way we don't need to move the clip rounded rect manually through
the vertex shader into the fragment shader but can just look at the push
constants.

Simplifies shaders a lot.
2017-01-17 06:17:55 +01:00
Benjamin Otte
c7d899c535 vulkan: Move push constants into their own header
This is the first step towards easing maintenance of the Vulkan shaders
by moving common code into headers.
2017-01-17 06:17:55 +01:00
Mohammed Sadiq
8ffecabd93 wayland: avoid an unnecessary g_list_length call
https://bugzilla.gnome.org/show_bug.cgi?id=777363
2017-01-16 21:42:05 -05:00
Matthias Clasen
f21827eb22 3.89.3 2017-01-16 17:50:02 -05:00
Matthias Clasen
cfb599bf67 We no longer have gdktestutils
Update the docs build to reflect that.
2017-01-16 17:50:02 -05:00
Daniel Mustieles
a514faa074 Updated Spanish translation 2017-01-16 21:33:24 +01:00
Daniel Mustieles
ff4c05532b Updated Spanish translation 2017-01-16 21:33:13 +01:00
Timm Bäder
239f14cc96 switch: Fix build
Partial revert of 2b6b5c1c8f, which
removed a little too much.
2017-01-16 21:01:59 +01:00
Timm Bäder
2b6b5c1c8f switch: Remove some unused code 2017-01-16 18:17:28 +01:00
Timm Bäder
ca889b6e21 gtkentryprivate: Remove unused prototype 2017-01-16 17:23:01 +01:00
Timm Bäder
28a3dd539d scalebutton: Use GtkButon:icon-name in the ui file 2017-01-16 17:22:53 +01:00
Timm Bäder
3cfcbe2ccf spinbutton: Restore gtk3 focus behavior
Focus the spinbutton on button press, never focus the buttons.
2017-01-16 17:22:45 +01:00
Timm Bäder
132f2721ce inspector: Use GtkButton:icon-name in ui files 2017-01-16 17:22:38 +01:00
Timm Bäder
f4afa000a1 entry: Remove unused struct member 2017-01-16 17:22:29 +01:00
Timm Bäder
32783a8187 gtk4-section: Add GtkInfoBar:revealed setter+getter 2017-01-16 17:22:11 +01:00
Olivier Fourdan
4259aba883 wayland: avoid 0 width/height anchor rectangle
Passing a rectangle with zero width or height to xdg_shell-v6
set_anchor_rect() will cause a protocol error and terminate the client,
as with gedit when pressing the Win key.

Reason for this is because the rectangle used to set the anchor comes
from gtk_text_layout_get_iter_location() which uses the pango layout
width/height, which can be empty if there is not character at the given
location.

Make sure we don't use 0 as width or height as an anchor rectangle to
avoid the protocol error, and compensate the logical position of the
given rectangle if the size is changed, so that the actual position
remains as expected by the client.

https://bugzilla.gnome.org/show_bug.cgi?id=777176
2017-01-16 13:55:51 +01:00
Chun-wei Fan
f2ee8f4342 Visual Studio builds: Update gsk project
Another Vulkan renderer source was added, so include them in the builds.
2017-01-16 13:47:21 +08:00
Daniel Boles
5e816f7283 grid: Fix plural error in docs' @Short_description 2017-01-15 20:37:49 +00:00
Jordi Mas
b373512523 Update Catalan translation 2017-01-15 20:18:08 +01:00
Benjamin Otte
87497ca2e1 snapshot: Rename gtk_snapshot_translate_2d()
It's now called gtk_snapshot_offset().
2017-01-13 14:37:48 +01:00
Jordi Mas
fc94ee99e8 Update Catalan translation 2017-01-13 06:51:42 +01:00
Benjamin Otte
6055028c96 snapshot: Rename append APIs
Instead of having gtk_snapshot_append_foo_node(), just have
gtk_snapshot_append_foo(). Nobody needs to know that this internally
uses nodes.
2017-01-13 04:46:09 +01:00
Benjamin Otte
e5e5beafa5 cssimage: Fallback images have no aspect ratio
The aspect ratio for fallback image was incorrectly set to 1.

Reftest is included.
2017-01-13 03:38:36 +01:00
Benjamin Otte
a06b1ea1ba cssimage: Scale images to contain, not cover
Images with just an aspect ratio, but without a size, should be scaled
to be fully visible in the given area.
But we scaled them to completely cover the given area, which made them
partially invisible.

Reftest included.
2017-01-13 03:38:36 +01:00
Benjamin Otte
b58de2d16c snapshot: Redo pop() API
gtk_snapshot_pop() => removed
gtk_snapshot_pop_and_append() => gtk_snapshot_pop()

So now there is no way to get a rendernode out of the snapshotting API
until you gtk_snapshot_finish().
2017-01-13 03:38:36 +01:00
Benjamin Otte
bc3ba68641 snapshot: Add gtk_snapshot_push_blend()
and use it for backgrounds.
2017-01-13 03:38:36 +01:00
Benjamin Otte
9616df9292 reftests: Fix test
No, GtkActions don't need to be part of this test.
2017-01-13 03:38:36 +01:00
Benjamin Otte
4668e6dc63 stack: Build stored render node with custom Snapshot object
This is in preparation for API changes in GtkSnapshot.
2017-01-13 03:38:36 +01:00
Benjamin Otte
d9b0685b49 Add gtk_snapshot_push_cross_fade()
... and use it.

The function is a bit awkward because it requires 2 calls to
gtk_snapshot_pop(), but once you accept that, it's very convenient to
use, as can be seen by the 2 implementations.
2017-01-13 03:38:36 +01:00
William Hua
670ae58cc9 mir: use modal window hint 2017-01-12 17:24:19 -05:00
Matthias Clasen
b355c80977 widget-factory: Add a system tab to the about dialog
Just for trying it out.
2017-01-12 15:30:11 -05:00
Matthias Clasen
3024956df1 about dialog: Add a "system" tab
This is a free-form tab that can contain information about the
system environment. To see it, set GtkAboutDialog::system-information
to a non-NULL value.

https://bugzilla.gnome.org/show_bug.cgi?id=776604
2017-01-12 15:29:56 -05:00
Timm Bäder
e08918cce0 actionbar: Notify when :revealed changes 2017-01-12 15:14:25 +01:00
Timm Bäder
db12128d35 infobar: Fix copy&paste error in documentation
Of course you shouldn't call gtk_dialog_response on a GtkInfoBar.
2017-01-12 09:18:55 +01:00
Timm Bäder
58c252d5e6 infobar demo: Adapt to GtkInfoBar changes
Bind GtkToggleButton:active to GtkInfoBar:revealed instead of :visible.
2017-01-12 09:18:52 +01:00
Timm Bäder
1bb4f1e9d9 infobar: Add :revealed property 2017-01-12 09:16:02 +01:00
Timm Bäder
e3871c4424 infobar: Keep GParamSpecs around
So we can use them in notify_by_pspec
2017-01-12 09:13:38 +01:00