Compare commits

...

29 Commits

Author SHA1 Message Date
Matthias Clasen
0927c3638a Call malloc_trim after loading images
Not sure this is the best place to do it, but at least it is one
place where we tend to do large, temporary allocations.
2024-03-27 14:15:20 +01:00
Athmane MOKRAOUI
b1eed1c153 Add Kabyle translation 2024-03-26 11:34:22 +00:00
Martin
fac6f6c712 Update Slovenian translation 2024-03-24 23:19:54 +00:00
Martin
3f1fc798f0 Update Slovenian translation 2024-03-24 23:17:49 +00:00
Luca Bacci
e6a86f61dc Merge branch 'fix-issue-3749' into 'main'
GdkWin32: Always set WS_MINIMIZEBOX on GdkToplevel

Closes #3749

See merge request GNOME/gtk!7072
2024-03-22 17:57:06 +00:00
Matthias Clasen
2799632c02 Merge branch 'scalefix' into 'main'
GtkScale: improving symmetry and value positioning

Closes #5171

See merge request GNOME/gtk!6935
2024-03-22 16:18:48 +00:00
Luca Bacci
8ffa681e02 GdkWin32: Always set WS_MINIMIZEBOX on GdkToplevel
Regardless if server-side decorated or not. This way the shell knows
that the window can be minimized.

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3749
2024-03-22 16:47:59 +01:00
Matthias Clasen
154035e76f Merge branch 'entry-progress' into 'main'
theme: Make sure progress in entries is visible

Closes #6201

See merge request GNOME/gtk!7071
2024-03-22 15:00:48 +00:00
Matthias Clasen
1d4c664bfa theme: Make sure progress in entries is visible
Give the trough a min height, so it doesn't shrink to nothing.

Fixes: #6201
2024-03-22 09:34:11 -04:00
Matthias Clasen
85a650afce Merge branch 'dnd-cursor-malaise' into 'main'
wayland: Guarantee dnd-move as a cursor name

See merge request GNOME/gtk!7070
2024-03-22 02:15:32 +00:00
Matthias Clasen
f6c4d3731c dnd: Go back to using dnd-move as move cursor
The move cursor in Adwaita is stuck with the 4-headed arrow image
which isn't suitable for a dnd cursor.

See https://gitlab.gnome.org/GNOME/adwaita-icon-theme/-/issues/286
2024-03-21 21:36:38 -04:00
Matthias Clasen
5e9070145e wayland: Guarantee dnd-move as a cursor name
We need to go back to using this, since move is widely abused
and thus can't change its image to one thats appropriate for dnd.
2024-03-21 21:35:45 -04:00
Matthias Clasen
81ced841dd Merge branch 'matthiasc/for-main' into 'main'
inspector: Show presentation time protocol

See merge request GNOME/gtk!7069
2024-03-21 12:35:33 +00:00
Matthias Clasen
9837a9dcfd inspector: Show presentation time protocol
We have a list of all the used Wayland protocols and their versions
in the inspector. Lets keep it up-to-date.
2024-03-21 07:29:58 -04:00
Matthias Clasen
1704ec3c7d Merge branch 'wip/chergert/presentation-time' into 'main'
gdk/wayland: implement client side of presentation-time

See merge request GNOME/gtk!6987
2024-03-21 11:28:19 +00:00
Matthias Clasen
c70a326055 Merge branch 'matthiasc/for-main' into 'main'
Sync cursor images with Adwaita

See merge request GNOME/gtk!7065
2024-03-21 02:37:35 +00:00
Christian Hergert
53616a73e9 gdk/wayland: use wp_presentation for more accurate frame timings
This attempts to improve the accuracy for the "presentation_time" of an
individual GdkFrameTimings. That information is currently filled in as soon
as we get a frame callback. However, if presentation-time wayland protocol
is available, that will be used to supliment a more accurate time which
may improve future presentation-time predictions within GdkFrameClockIdle.

The protocol states that all related and sub surfaces will receive the
same information so it is safe that this could be registered for more
than just the toplevel. The information becomes idempotent.
2024-03-20 14:45:58 -07:00
Jordan Petridis
2d3a3d6a78 Merge branch 'alatiera/ci-vulkan' into 'main'
flatpak-build.sh: Do not disable vulkan

See merge request GNOME/gtk!7066
2024-03-20 20:15:54 +00:00
Jordan Petridis
6ca9e5987b flatpak-build.sh: Do not disable vulkan
In a94d7abf0d we removed
the explicit disable from the manifest.

Now we should also have the CI build the vulkan render as well.
2024-03-20 21:18:13 +02:00
Matthias Clasen
2c1590001f Sync cursor images with Adwaita
Several cursor metaphors were changes in Adwaita. Update our docs
and the Cursors demo to match.
2024-03-20 13:19:12 -04:00
Matthias Clasen
82aee038e9 Merge branch 'alatiera/ci-vulkan' into 'main'
flatpak demos: Enable vulkan backend

See merge request GNOME/gtk!7064
2024-03-20 14:46:04 +00:00
Jordan Petridis
a94d7abf0d flatpak demos: Enable vulkan backend
glslc is now in the Sdk itself

https://gitlab.gnome.org/GNOME/gnome-build-meta/-/merge_requests/2640
2024-03-20 15:47:42 +02:00
Matthias Clasen
3b87903889 Merge branch 'wayland-min-version' into 'main'
wayland: Check some required globals

See merge request GNOME/gtk!7062
2024-03-20 02:57:06 +00:00
Matthias Clasen
191f826075 wayland: Only set buffer scale if we can
We check this in some other places, so be consistent.
2024-03-19 22:22:53 -04:00
Matthias Clasen
5d52c43074 wayland: Check all required globals for subsurfaces
Before trying to use subsurfaces, make sure we have both
a subcompositor and a viewporter.
2024-03-19 22:22:53 -04:00
Matthias Clasen
f6a67aeb20 wayland: Check some required globals
This may be largely cosmetics, since these are core protocols that
are unlikely to ever be missing. But lets check anyway.
2024-03-19 17:28:25 -04:00
Jordi Mas
370e2f0940 Update Catalan translation 2024-03-19 21:37:20 +01:00
Gergo Koteles
34028ea31e GtkScale: move value in line with the through.
The value is between the through and the markups, and appears scattered.

Move it in line with the through.

Fixes: #5171
2024-02-23 02:04:24 +01:00
Gergo Koteles
4244314a40 GtkScale: add symmetry border to the scales without markups
The scales with marks require css adjustments for center positioning.

Add border to the other side to make it symmetrical.

Fixes: #5171
2024-02-23 01:58:47 +01:00
39 changed files with 8548 additions and 240 deletions

View File

@@ -19,7 +19,6 @@ flatpak build ${builddir} meson \
--buildtype=debugoptimized \
-Dx11-backend=true \
-Dwayland-backend=true \
-Dvulkan=disabled \
-Dbuild-tests=false \
-Dbuild-testsuite=false \
-Dbuild-examples=false \

View File

@@ -185,7 +185,6 @@
"builddir" : true,
"config-opts" : [
"--libdir=/app/lib",
"-Dvulkan=disabled",
"-Dbuildtype=debugoptimized",
"-Ddemo-profile=devel"
],

View File

@@ -114,7 +114,6 @@
"builddir" : true,
"config-opts" : [
"--libdir=/app/lib",
"-Dvulkan=disabled",
"-Dbuildtype=debugoptimized",
"-Ddemo-profile=devel"
],

View File

@@ -114,7 +114,6 @@
"builddir" : true,
"config-opts" : [
"--libdir=/app/lib",
"-Dvulkan=disabled",
"-Dbuildtype=debugoptimized",
"-Ddemo-profile=devel"
],
@@ -131,7 +130,6 @@
"env" : {
"DBUS_SESSION_BUS_ADDRESS" : "''",
"GSK_RENDERER" : "opengl",
"GDK_DEBUG" : "vulkan-disable",
"G_ENABLE_DEBUG" : "true"
}
}

View File

@@ -114,7 +114,6 @@
"builddir" : true,
"config-opts" : [
"--libdir=/app/lib",
"-Dvulkan=disabled",
"-Dbuildtype=debugoptimized",
"-Ddemo-profile=devel"
],
@@ -131,7 +130,6 @@
"env" : {
"DBUS_SESSION_BUS_ADDRESS" : "''",
"GSK_RENDERER" : "opengl",
"GDK_DEBUG" : "vulkan-disable",
"G_ENABLE_DEBUG" : "true"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -779,11 +779,13 @@ static struct {
const char *name;
GdkCursor *cursor;
} drag_cursors[] = {
{ 0, "default", NULL },
{ GDK_ACTION_ASK, "dnd-ask", NULL },
{ GDK_ACTION_COPY, "copy", NULL },
{ GDK_ACTION_MOVE, "move", NULL },
{ GDK_ACTION_LINK, "alias", NULL },
{ 0, "default", NULL },
{ GDK_ACTION_ASK, "dnd-ask", NULL },
{ GDK_ACTION_COPY, "copy", NULL },
{ GDK_ACTION_MOVE, "dnd-move", NULL }, /* Not using move here, since move is stuck using
* a mismatched visual metaphor in Adwaita
*/
{ GDK_ACTION_LINK, "alias", NULL },
};
GdkCursor *

View File

@@ -30,6 +30,7 @@
#include <jpeglib.h>
#include <jerror.h>
#include <setjmp.h>
#include <malloc.h>
/* {{{ Error handling */
@@ -237,8 +238,10 @@ gdk_load_jpeg (GBytes *input_bytes,
g_bytes_unref (bytes);
malloc_trim (0);
gdk_profiler_end_mark (before, "Load jpeg", NULL);
return texture;
}

View File

@@ -27,6 +27,7 @@
#include "gsk/gl/fp16private.h"
#include <png.h>
#include <stdio.h>
#include <malloc.h>
/* The main difference between the png load/save code here and
* gdk-pixbuf is that we can support loading 16-bit data in the
@@ -300,6 +301,8 @@ gdk_load_png (GBytes *bytes,
g_free (row_pointers);
png_destroy_read_struct (&png, &info, NULL);
malloc_trim (0);
if (GDK_PROFILER_IS_RUNNING)
{
gint64 end = GDK_PROFILER_CURRENT_TIME;

View File

@@ -26,6 +26,7 @@
#include "gdktexturedownloaderprivate.h"
#include <tiffio.h>
#include <malloc.h>
/* Our main interest in tiff as an image format is that it is
* flexible enough to save all our texture formats without
@@ -500,6 +501,8 @@ gdk_load_tiff (GBytes *input_bytes,
TIFFClose (tif);
malloc_trim (0);
if (GDK_PROFILER_IS_RUNNING)
{
gint64 end = GDK_PROFILER_CURRENT_TIME;

View File

@@ -79,6 +79,7 @@ static const struct {
{ "move", "dnd-move" },
{ "no-drop", "dnd-none" },
{ "dnd-ask", "dnd-copy" }, /* not CSS, but we want to guarantee it anyway */
{ "dnd-move", "default" },
{ "not-allowed", "crossed_circle" },
{ "grab", "hand2" },
{ "grabbing", "hand2" },

View File

@@ -310,7 +310,8 @@ gdk_wayland_device_update_surface_cursor (GdkDevice *device)
if (buffer)
{
wl_surface_attach (pointer->pointer_surface, buffer, 0, 0);
wl_surface_set_buffer_scale (pointer->pointer_surface, scale);
if (wl_surface_get_version (pointer->pointer_surface) >= WL_SURFACE_SET_BUFFER_SCALE_SINCE_VERSION)
wl_surface_set_buffer_scale (pointer->pointer_surface, scale);
wl_surface_damage (pointer->pointer_surface, 0, 0, w, h);
wl_surface_commit (pointer->pointer_surface);
}

View File

@@ -58,6 +58,7 @@
#include <wayland/xdg-foreign-unstable-v2-client-protocol.h>
#include <wayland/server-decoration-client-protocol.h>
#include "linux-dmabuf-unstable-v1-client-protocol.h"
#include "presentation-time-client-protocol.h"
#include "wm-button-layout-translation.h"
@@ -95,7 +96,6 @@
#define GTK_SHELL1_VERSION 5
#define OUTPUT_VERSION_WITH_DONE 2
#define NO_XDG_OUTPUT_DONE_SINCE_VERSION 3
#define XDG_ACTIVATION_VERSION 1
#define OUTPUT_VERSION 3
#ifdef HAVE_TOPLEVEL_STATE_SUSPENDED
@@ -585,21 +585,25 @@ gdk_registry_handle_global (void *data,
{
display_wayland->xdg_activation =
wl_registry_bind (display_wayland->wl_registry, id,
&xdg_activation_v1_interface,
MIN (version, XDG_ACTIVATION_VERSION));
&xdg_activation_v1_interface, 1);
}
else if (strcmp (interface, "wp_fractional_scale_manager_v1") == 0)
{
display_wayland->fractional_scale =
wl_registry_bind (display_wayland->wl_registry, id,
&wp_fractional_scale_manager_v1_interface,
MIN (version, 1));
&wp_fractional_scale_manager_v1_interface, 1);
}
else if (strcmp (interface, "wp_viewporter") == 0)
{
display_wayland->viewporter =
wl_registry_bind (display_wayland->wl_registry, id,
&wp_viewporter_interface,
&wp_viewporter_interface, 1);
}
else if (strcmp (interface, "wp_presentation") == 0)
{
display_wayland->presentation =
wl_registry_bind (display_wayland->wl_registry, id,
&wp_presentation_interface,
MIN (version, 1));
}
@@ -700,7 +704,8 @@ _gdk_wayland_display_open (const char *display_name)
process_on_globals_closures (display_wayland);
/* Wait for initializing to complete. This means waiting for all
* asynchronous roundtrips that were triggered during initial roundtrip. */
* asynchronous roundtrips that were triggered during initial roundtrip.
*/
while (display_wayland->async_roundtrips != NULL)
{
if (wl_display_dispatch (display_wayland->wl_display) < 0)
@@ -710,6 +715,18 @@ _gdk_wayland_display_open (const char *display_name)
}
}
/* Check that we got all the required globals */
if (display_wayland->compositor == NULL ||
display_wayland->shm == NULL ||
display_wayland->data_device_manager == NULL)
{
g_warning ("The Wayland compositor does not provide one or more of the required interfaces, "
"not using Wayland display");
g_object_unref (display);
return NULL;
}
if (display_wayland->xdg_wm_base_id)
{
display_wayland->shell_variant = GDK_WAYLAND_SHELL_VARIANT_XDG_SHELL;
@@ -799,6 +816,7 @@ gdk_wayland_display_dispose (GObject *object)
g_clear_pointer (&display_wayland->xdg_activation, xdg_activation_v1_destroy);
g_clear_pointer (&display_wayland->fractional_scale, wp_fractional_scale_manager_v1_destroy);
g_clear_pointer (&display_wayland->viewporter, wp_viewporter_destroy);
g_clear_pointer (&display_wayland->presentation, wp_presentation_destroy);
g_clear_pointer (&display_wayland->linux_dmabuf, zwp_linux_dmabuf_v1_destroy);
g_clear_pointer (&display_wayland->linux_dmabuf_feedback, zwp_linux_dmabuf_feedback_v1_destroy);
if (display_wayland->linux_dmabuf_formats)

View File

@@ -39,6 +39,7 @@
#include <gdk/wayland/xdg-activation-v1-client-protocol.h>
#include <gdk/wayland/fractional-scale-v1-client-protocol.h>
#include <gdk/wayland/viewporter-client-protocol.h>
#include <gdk/wayland/presentation-time-client-protocol.h>
#include <glib.h>
#include <gdk/gdkkeys.h>
@@ -125,6 +126,7 @@ struct _GdkWaylandDisplay
struct xdg_activation_v1 *xdg_activation;
struct wp_fractional_scale_manager_v1 *fractional_scale;
struct wp_viewporter *viewporter;
struct wp_presentation *presentation;
GList *async_roundtrips;

View File

@@ -34,6 +34,7 @@
#include <gdk/wayland/gdkwayland.h>
#include <gdk/wayland/gdkdisplay-wayland.h>
#include <gdk/wayland/gdkseat-wayland.h>
#include <gdk/wayland/gdkwaylandpresentationtime-private.h>
#include <xkbcommon/xkbcommon.h>

View File

@@ -466,9 +466,9 @@ gdk_wayland_surface_create_subsurface (GdkSurface *surface)
GdkWaylandSubsurface *sub;
struct wl_region *region;
if (disp->viewporter == NULL)
if (disp->subcompositor == NULL || disp->viewporter == NULL)
{
GDK_DISPLAY_DEBUG (display, OFFLOAD, "Can't use subsurfaces without viewporter");
GDK_DISPLAY_DEBUG (display, OFFLOAD, "Can't use subsurfaces without subcompositor and viewporter");
return NULL;
}

View File

@@ -44,6 +44,8 @@ struct _GdkWaylandSurface
struct wl_event_queue *event_queue;
struct wl_callback *frame_callback;
GdkWaylandPresentationTime *presentation_time;
unsigned int initial_configure_received : 1;
unsigned int has_uncommitted_ack_configure : 1;
unsigned int has_pending_subsurface_commits : 1;

View File

@@ -52,6 +52,7 @@
#include "gdktoplevel-wayland-private.h"
#include "linux-dmabuf-unstable-v1-client-protocol.h"
#include "presentation-time-client-protocol.h"
/**
@@ -403,6 +404,17 @@ gdk_wayland_surface_request_frame (GdkSurface *surface)
wl_proxy_set_queue ((struct wl_proxy *) self->frame_callback, NULL);
wl_callback_add_listener (self->frame_callback, &frame_listener, surface);
if (self->presentation_time == NULL)
{
GdkWaylandDisplay *wayland_display = GDK_WAYLAND_DISPLAY (gdk_surface_get_display (surface));
self->presentation_time = gdk_wayland_presentation_time_new (wayland_display);
}
gdk_wayland_presentation_time_track (self->presentation_time,
clock,
self->display_server.wl_surface,
gdk_frame_clock_get_frame_counter (clock));
for (gsize i = 0; i < gdk_surface_get_n_subsurfaces (surface); i++)
{
GdkSubsurface *subsurface = gdk_surface_get_subsurface (surface, i);
@@ -1048,6 +1060,7 @@ gdk_wayland_surface_hide_surface (GdkSurface *surface)
unmap_popups_for_surface (surface);
g_clear_pointer (&impl->presentation_time, gdk_wayland_presentation_time_free);
g_clear_pointer (&impl->frame_callback, wl_callback_destroy);
if (impl->awaiting_frame_frozen)
{

View File

@@ -34,6 +34,7 @@
#include "gdktoplevelprivate.h"
#include "gdkdevice-wayland-private.h"
#include <wayland/presentation-time-client-protocol.h>
#include <wayland/xdg-shell-unstable-v6-client-protocol.h>
#include <wayland/xdg-foreign-unstable-v2-client-protocol.h>
@@ -122,6 +123,8 @@ struct _GdkWaylandToplevel
struct wl_output *initial_fullscreen_output;
struct wp_presentation_feedback *feedback;
struct {
GdkToplevelState unset_flags;
GdkToplevelState set_flags;

View File

@@ -0,0 +1,19 @@
#pragma once
#include <gdk/gdkframeclock.h>
#include <gdk/wayland/gdkdisplay-wayland.h>
#include <gdk/wayland/gdksurface-wayland.h>
#include <gdk/wayland/gdkwaylanddisplay.h>
G_BEGIN_DECLS
typedef struct _GdkWaylandPresentationTime GdkWaylandPresentationTime;
GdkWaylandPresentationTime *gdk_wayland_presentation_time_new (GdkWaylandDisplay *display);
void gdk_wayland_presentation_time_track (GdkWaylandPresentationTime *self,
GdkFrameClock *frame_clock,
struct wl_surface *surface,
gint64 frame_number);
void gdk_wayland_presentation_time_free (GdkWaylandPresentationTime *self);
G_END_DECLS

View File

@@ -0,0 +1,152 @@
#include "config.h"
#include <gdk/gdkframeclockprivate.h>
#include "gdkwaylandpresentationtime-private.h"
typedef struct _GdkWaylandPresentationFrame
{
GdkWaylandPresentationTime *self;
struct wp_presentation_feedback *feedback;
GdkFrameClock *frame_clock;
gint64 frame_number;
} GdkWaylandPresentationFrame;
static void
gdk_wayland_presentation_frame_free (GdkWaylandPresentationFrame *frame)
{
g_clear_pointer (&frame->feedback, wp_presentation_feedback_destroy);
g_clear_object (&frame->frame_clock);
frame->self = NULL;
g_free (frame);
}
struct _GdkWaylandPresentationTime
{
GdkWaylandDisplay *display;
GPtrArray *frames;
};
GdkWaylandPresentationTime *
gdk_wayland_presentation_time_new (GdkWaylandDisplay *display)
{
GdkWaylandPresentationTime *self;
g_return_val_if_fail (GDK_IS_WAYLAND_DISPLAY (display), NULL);
self = g_new0 (GdkWaylandPresentationTime, 1);
self->display = g_object_ref (display);
self->frames = g_ptr_array_new_with_free_func ((GDestroyNotify)gdk_wayland_presentation_frame_free);
return self;
}
void
gdk_wayland_presentation_time_free (GdkWaylandPresentationTime *self)
{
g_clear_pointer (&self->frames, g_ptr_array_unref);
g_clear_object (&self->display);
g_free (self);
}
static gint64
time_from_wayland (uint32_t tv_sec_hi,
uint32_t tv_sec_lo,
uint32_t tv_nsec)
{
guint64 t = tv_sec_hi;
t <<= 32;
t |= tv_sec_lo;
t *= G_USEC_PER_SEC;
t += tv_nsec / 1000L;
return (gint64)t;
}
static void
gdk_wayland_presentation_feedback_sync_output (void *data,
struct wp_presentation_feedback *feedback,
struct wl_output *output)
{
}
static void
gdk_wayland_presentation_feedback_presented (void *data,
struct wp_presentation_feedback *feedback,
uint32_t tv_sec_hi,
uint32_t tv_sec_lo,
uint32_t tv_nsec,
uint32_t refresh,
uint32_t seq_hi,
uint32_t seq_lo,
uint32_t flags)
{
GdkWaylandPresentationFrame *frame = data;
GdkWaylandPresentationTime *self;
GdkFrameTimings *timings;
guint pos;
g_assert (frame != NULL);
g_assert (frame->self != NULL);
self = frame->self;
if ((timings = gdk_frame_clock_get_timings (frame->frame_clock, frame->frame_number)))
{
timings->presentation_time = time_from_wayland (tv_sec_hi, tv_sec_lo, tv_nsec);
timings->complete = TRUE;
}
if (g_ptr_array_find (self->frames, frame, &pos))
g_ptr_array_remove_index_fast (self->frames, pos);
}
static void
gdk_wayland_presentation_feedback_discarded (void *data,
struct wp_presentation_feedback *feedback)
{
GdkWaylandPresentationFrame *frame = data;
guint pos;
g_assert (frame != NULL);
g_assert (frame->self != NULL);
if (g_ptr_array_find (frame->self->frames, frame, &pos))
g_ptr_array_remove_index_fast (frame->self->frames, pos);
}
static const struct wp_presentation_feedback_listener gdk_wayland_presentation_feedback_listener = {
gdk_wayland_presentation_feedback_sync_output,
gdk_wayland_presentation_feedback_presented,
gdk_wayland_presentation_feedback_discarded,
};
void
gdk_wayland_presentation_time_track (GdkWaylandPresentationTime *self,
GdkFrameClock *frame_clock,
struct wl_surface *surface,
gint64 frame_number)
{
struct wp_presentation_feedback *feedback;
GdkWaylandPresentationFrame *frame;
g_return_if_fail (self != NULL);
g_return_if_fail (surface != NULL);
if (self->display->presentation == NULL)
return;
if (!(feedback = wp_presentation_feedback (self->display->presentation, surface)))
return;
frame = g_new0 (GdkWaylandPresentationFrame, 1);
frame->self = self;
frame->frame_clock = g_object_ref (frame_clock);
frame->frame_number = frame_number;
frame->feedback = g_steal_pointer (&feedback);
g_ptr_array_add (self->frames, frame);
wp_presentation_feedback_add_listener (frame->feedback,
&gdk_wayland_presentation_feedback_listener,
frame);
}

View File

@@ -22,6 +22,7 @@ gdk_wayland_sources = files([
'gdktoplevel-wayland.c',
'gdkpopup-wayland.c',
'gdkvulkancontext-wayland.c',
'gdkwaylandpresentationtime.c',
'wm-button-layout-translation.c',
])
@@ -69,6 +70,7 @@ proto_sources = [
['xdg-activation', 'staging', 'v1', ],
['fractional-scale', 'staging', 'v1', ],
['linux-dmabuf', 'unstable', 'v1', ],
['presentation-time', 'stable', 'v1', ],
]
gdk_wayland_gen_headers = []

View File

@@ -1627,7 +1627,7 @@ _gdk_win32_surface_lacks_wm_decorations (GdkSurface *window)
has_any_decorations = FALSE;
if (style & (WS_BORDER | WS_THICKFRAME | WS_CAPTION |
WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX))
WS_SYSMENU | WS_MAXIMIZEBOX))
has_any_decorations = TRUE;
else
GDK_NOTE (MISC, g_print ("Window %p (handle %p): has no decorations (style %lx)\n",
@@ -1696,7 +1696,6 @@ _gdk_win32_surface_update_style_bits (GdkSurface *window)
update_single_bit (&new_style, all, decorations & GDK_DECOR_RESIZEH, WS_THICKFRAME);
update_single_bit (&new_style, all, decorations & GDK_DECOR_TITLE, WS_CAPTION);
update_single_bit (&new_style, all, decorations & GDK_DECOR_MENU, WS_SYSMENU);
update_single_bit (&new_style, all, decorations & GDK_DECOR_MINIMIZE, WS_MINIMIZEBOX);
update_single_bit (&new_style, all, decorations & GDK_DECOR_MAXIMIZE, WS_MAXIMIZEBOX);
}

View File

@@ -150,6 +150,7 @@ struct _GtkScalePrivate
guint draw_value : 1;
guint value_pos : 2;
guint has_markup : 1;
GtkScaleFormatValueFunc format_value_func;
gpointer format_value_func_user_data;
@@ -375,6 +376,27 @@ gtk_scale_allocate_value (GtkScale *scale)
g_return_if_reached ();
break;
}
if (priv->has_markup && (priv->value_pos == GTK_POS_LEFT || priv->value_pos == GTK_POS_RIGHT))
{
if (priv->top_marks_widget)
{
int marks_height;
gtk_widget_measure (priv->top_marks_widget,
GTK_ORIENTATION_VERTICAL, -1,
&marks_height, NULL,
NULL, NULL);
value_alloc.y += marks_height / 2;
}
if (priv->bottom_marks_widget)
{
int marks_height;
gtk_widget_measure (priv->bottom_marks_widget,
GTK_ORIENTATION_VERTICAL, -1,
&marks_height, NULL,
NULL, NULL);
value_alloc.y -= marks_height / 2;
}
}
}
else /* VERTICAL */
{
@@ -403,6 +425,27 @@ gtk_scale_allocate_value (GtkScale *scale)
default:
g_return_if_reached ();
}
if (priv->has_markup && (priv->value_pos == GTK_POS_TOP || priv->value_pos == GTK_POS_BOTTOM))
{
if (priv->top_marks_widget)
{
int marks_width;
gtk_widget_measure (priv->top_marks_widget,
GTK_ORIENTATION_HORIZONTAL, -1,
&marks_width, NULL,
NULL, NULL);
value_alloc.x += marks_width / 2;
}
if (priv->bottom_marks_widget)
{
int marks_width;
gtk_widget_measure (priv->bottom_marks_widget,
GTK_ORIENTATION_HORIZONTAL, -1,
&marks_width, NULL,
NULL, NULL);
value_alloc.x -= marks_width / 2;
}
}
}
gtk_widget_size_allocate (priv->value_widget, &value_alloc, -1);
@@ -1285,6 +1328,7 @@ gtk_scale_get_range_border (GtkRange *range,
if (gtk_orientable_get_orientation (GTK_ORIENTABLE (range)) == GTK_ORIENTATION_HORIZONTAL)
{
int height;
bool need_symmetry = !priv->has_markup && (priv->value_pos == GTK_POS_LEFT || priv->value_pos == GTK_POS_RIGHT || !priv->draw_value);
if (priv->top_marks_widget)
{
@@ -1293,7 +1337,11 @@ gtk_scale_get_range_border (GtkRange *range,
&height, NULL,
NULL, NULL);
if (height > 0)
border->top += height;
{
border->top += height;
if (need_symmetry)
border->bottom += height;
}
}
if (priv->bottom_marks_widget)
@@ -1303,12 +1351,17 @@ gtk_scale_get_range_border (GtkRange *range,
&height, NULL,
NULL, NULL);
if (height > 0)
border->bottom += height;
{
border->bottom += height;
if (need_symmetry)
border->top += height;
}
}
}
else
{
int width;
bool need_symmetry = !priv->has_markup && (priv->value_pos == GTK_POS_TOP || priv->value_pos == GTK_POS_BOTTOM || !priv->draw_value);
if (priv->top_marks_widget)
{
@@ -1317,7 +1370,11 @@ gtk_scale_get_range_border (GtkRange *range,
&width, NULL,
NULL, NULL);
if (width > 0)
border->left += width;
{
border->left += width;
if (need_symmetry)
border->right += width;
}
}
if (priv->bottom_marks_widget)
@@ -1327,7 +1384,11 @@ gtk_scale_get_range_border (GtkRange *range,
&width, NULL,
NULL, NULL);
if (width > 0)
border->right += width;
{
border->right += width;
if (need_symmetry)
border->left += width;
}
}
}
}
@@ -1642,6 +1703,7 @@ gtk_scale_clear_marks (GtkScale *scale)
g_slist_free_full (priv->marks, gtk_scale_mark_free);
priv->marks = NULL;
priv->has_markup = false;
g_clear_pointer (&priv->top_marks_widget, gtk_widget_unparent);
g_clear_pointer (&priv->bottom_marks_widget, gtk_widget_unparent);
@@ -1760,6 +1822,7 @@ gtk_scale_add_mark (GtkScale *scale,
gtk_widget_insert_after (mark->label_widget, mark->widget, NULL);
else
gtk_widget_insert_before (mark->label_widget, mark->widget, NULL);
priv->has_markup = true;
}
m = g_slist_find (priv->marks, mark);

View File

@@ -692,6 +692,7 @@ add_wayland_protocols (GdkDisplay *display,
append_wayland_protocol_row (gen, (struct wl_proxy *)d->xdg_activation);
append_wayland_protocol_row (gen, (struct wl_proxy *)d->fractional_scale);
append_wayland_protocol_row (gen, (struct wl_proxy *)d->viewporter);
append_wayland_protocol_row (gen, (struct wl_proxy *)d->presentation);
}
}
#endif

View File

@@ -402,7 +402,11 @@ entry {
margin-bottom: 2px;
}
progress > trough > progress {
> progress > trough {
min-height: 2px;
}
> progress > trough > progress {
background-color: transparent;
background-image: none;
border-radius: 0;
@@ -410,7 +414,6 @@ entry {
border-color: $selected_bg_color;
border-style: solid;
box-shadow: none;
}
// linked entries

View File

@@ -60,6 +60,7 @@ is
it
ja
ka
kab
kg
kk
km

413
po/ca.po

File diff suppressed because it is too large Load Diff

7974
po/kab.po Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -11,8 +11,8 @@ msgid ""
msgstr ""
"Project-Id-Version: gtk+ master\n"
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gtk/-/issues/\n"
"POT-Creation-Date: 2024-03-17 10:28+0000\n"
"PO-Revision-Date: 2024-03-18 18:36+0100\n"
"POT-Creation-Date: 2024-03-18 17:37+0000\n"
"PO-Revision-Date: 2024-03-25 00:19+0100\n"
"Last-Translator: Martin Srebotnjak <miles@filmsi.net>\n"
"Language-Team: Slovenian GNOME Translation Team <gnome-si@googlegroups.com>\n"
"Language: sl_SI\n"
@@ -560,10 +560,9 @@ msgid "Unsupported color type %u in png image"
msgstr "Nepodprta barvna globina %u v sliki PNG"
#: gdk/loaders/gdkpng.c:272
#, fuzzy, c-format
#| msgid "Not enough memory for image size %ux%u"
#, c-format
msgid "Image stride too large for image size %ux%u"
msgstr "Ni dovolj pomnilnika za sliko velikosti %ux%u"
msgstr "Korak slike je prevelik za velikost slike %ux%u"
#: gdk/loaders/gdktiff.c:358
msgid "Failed to load RGB data from TIFF file"
@@ -872,7 +871,6 @@ msgid "OpenGL ES 3.0 is not supported by this renderer."
msgstr "Izrisovalnik ne podpira OpenGL ES 3.0"
#: gsk/gpu/gsknglrenderer.c:62
#, fuzzy
msgid "OpenGL 3.3 required"
msgstr "Potrebujete OpenGL 3.3"
@@ -1785,7 +1783,7 @@ msgstr "bločni navedek"
#: gtk/gtkaccessible.c:872
msgctxt "accessibility"
msgid "article"
msgstr ""
msgstr "članek"
#: gtk/gtkaccessible.c:873
msgctxt "accessibility"
@@ -4455,7 +4453,6 @@ msgid "Show Accessibility warnings"
msgstr "Pokaži opozorila o dostopnosti"
#: gtk/inspector/visual.ui:632
#, fuzzy
msgid "Show Graphics Offload"
msgstr "Pokaži grafično razbremenitev"
@@ -7508,6 +7505,19 @@ msgid ""
" info Print information about the path\n"
"\n"
msgstr ""
"Uporaba:\n"
" gtk4-path-tool [UKAZ] [MOŽNOST ...] POT\n"
"\n"
"Opravite različna opravila na poteh.\n"
"\n"
"Ukazi:\n"
" decompose Razčleni pot\n"
" reverse Preobrni pot\n"
" restrict Omeji pot na odsek\n"
" show Prikaži pot v oknu\n"
" render Upodobi pot kot sliko\n"
" info Izpis informacij o poti\n"
"\n"
#: tools/gtk-path-tool-decompose.c:84
msgid "Allow quadratic Bézier curves"
@@ -7626,7 +7636,6 @@ msgid "Point color"
msgstr "Barva točke"
#: tools/gtk-path-tool-render.c:129 tools/gtk-path-tool-show.c:151
#, fuzzy
msgid "Fill rule (winding, even-odd)"
msgstr "Pravilo polnjenja (navijajoče, sodo-liho)"
@@ -7645,13 +7654,12 @@ msgid "Line width (number)"
msgstr "Širina vrstice (številka)"
#: tools/gtk-path-tool-render.c:134 tools/gtk-path-tool-show.c:156
#, fuzzy
msgid "Line cap (butt, round, square)"
msgstr "Konec črte (zaobljeno, okroglo, oglato)"
#: tools/gtk-path-tool-render.c:135 tools/gtk-path-tool-show.c:157
msgid "Line join (miter, miter-clip, round, bevel, arcs)"
msgstr ""
msgstr "Spoj črt (sredica, sredica-sponka, okrogla, izbočena, loki)"
#: tools/gtk-path-tool-render.c:136 tools/gtk-path-tool-show.c:158
msgid "Miter limit (number)"
@@ -7698,17 +7706,14 @@ msgid "Can only render a single path"
msgstr "Izrisati je mogoče le eno pot"
#: tools/gtk-path-tool-render.c:250 tools/gtk-path-tool-show.c:221
#, fuzzy
msgid "fill rule"
msgstr "pravilo polnjenja"
#: tools/gtk-path-tool-render.c:255 tools/gtk-path-tool-show.c:226
#, fuzzy
msgid "line cap"
msgstr "konec črte"
#: tools/gtk-path-tool-render.c:256 tools/gtk-path-tool-show.c:227
#, fuzzy
msgid "line join"
msgstr "spoj črte"
@@ -7723,7 +7728,6 @@ msgid "Output written to '%s'."
msgstr "Odvod je zapisan v »%s«."
#: tools/gtk-path-tool-restrict.c:36
#, fuzzy
msgid "Beginning of segment"
msgstr "Začetek odseka"
@@ -7732,7 +7736,6 @@ msgid "LENGTH"
msgstr "DOLŽINA"
#: tools/gtk-path-tool-restrict.c:37
#, fuzzy
msgid "End of segment"
msgstr "Konec odseka"
@@ -7793,7 +7796,7 @@ msgid "Failed to parse '%s' as number"
msgstr "Razčlenjevanje »%s« kot število je spodletelo"
#: tools/gtk-rendernode-tool.c:35
#, fuzzy, c-format
#, c-format
msgid ""
"Usage:\n"
" gtk4-rendernode-tool [COMMAND] [OPTION…] FILE\n"
@@ -7814,17 +7817,16 @@ msgstr ""
"Izvajanje različnih opravil z vozlišči izrisovanja GTK.\n"
"\n"
"Ukazi:\n"
" benchmark Testno izrisovanje vozlišča\n"
" benchmark Preizkusno izrisovanje vozlišča\n"
" compare Primerja vozlišča ali slike\n"
" info Izpiše podatke o vozlišču\n"
" show Prikaže vozlišče\n"
" show Pokaže vozlišče\n"
" render Izdela zaslonsko sliko vozlišča\n"
"\n"
#: tools/gtk-rendernode-tool-benchmark.c:94
#, fuzzy
msgid "Add renderer to benchmark"
msgstr "Dodaj izrisovalnik v benchmark"
msgstr "Dodaj izrisovalnik v preizkušanje"
#: tools/gtk-rendernode-tool-benchmark.c:94
#: tools/gtk-rendernode-tool-compare.c:65
@@ -7841,12 +7843,10 @@ msgid "RUNS"
msgstr "PONOVITVE"
#: tools/gtk-rendernode-tool-benchmark.c:96
#, fuzzy
msgid "Dont download result/wait for GPU to finish"
msgstr "Ne prenašaj rezultatov/čakajte na zaključek dela GPE"
msgstr "Ne prenašaj rezultatov/čakaj na zaključek dela GPE"
#: tools/gtk-rendernode-tool-benchmark.c:114
#, fuzzy
msgid "Benchmark rendering of a .node file."
msgstr "Preizkusno izrisovanje datoteke .node."
@@ -7858,7 +7858,7 @@ msgid "No .node file specified\n"
msgstr "Ni določene nobene datoteke .node\n"
#: tools/gtk-rendernode-tool-benchmark.c:133
#, fuzzy, c-format
#, c-format
msgid "Can only benchmark a single .node file\n"
msgstr "Preizkušati je mogoče le eno datoteko .node\n"
@@ -7898,9 +7898,9 @@ msgid "Failed to load %s: %s\n"
msgstr "Datoteke %s ni mogoče naložiti: %s\n"
#: tools/gtk-rendernode-tool-compare.c:122
#, fuzzy, c-format
#, c-format
msgid "Could not save diff image to %s\n"
msgstr "Datoteke diff ni možno shraniti v %s\n"
msgstr "Slike diff ni možno shraniti v %s\n"
#: tools/gtk-rendernode-tool-compare.c:132
#, c-format