Compare commits
29 Commits
wayland-po
...
malloc-tri
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0927c3638a | ||
|
|
b1eed1c153 | ||
|
|
fac6f6c712 | ||
|
|
3f1fc798f0 | ||
|
|
e6a86f61dc | ||
|
|
2799632c02 | ||
|
|
8ffa681e02 | ||
|
|
154035e76f | ||
|
|
1d4c664bfa | ||
|
|
85a650afce | ||
|
|
f6c4d3731c | ||
|
|
5e9070145e | ||
|
|
81ced841dd | ||
|
|
9837a9dcfd | ||
|
|
1704ec3c7d | ||
|
|
c70a326055 | ||
|
|
53616a73e9 | ||
|
|
2d3a3d6a78 | ||
|
|
6ca9e5987b | ||
|
|
2c1590001f | ||
|
|
82aee038e9 | ||
|
|
a94d7abf0d | ||
|
|
3b87903889 | ||
|
|
191f826075 | ||
|
|
5d52c43074 | ||
|
|
f6a67aeb20 | ||
|
|
370e2f0940 | ||
|
|
34028ea31e | ||
|
|
4244314a40 |
@@ -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 \
|
||||
|
||||
@@ -185,7 +185,6 @@
|
||||
"builddir" : true,
|
||||
"config-opts" : [
|
||||
"--libdir=/app/lib",
|
||||
"-Dvulkan=disabled",
|
||||
"-Dbuildtype=debugoptimized",
|
||||
"-Ddemo-profile=devel"
|
||||
],
|
||||
|
||||
@@ -114,7 +114,6 @@
|
||||
"builddir" : true,
|
||||
"config-opts" : [
|
||||
"--libdir=/app/lib",
|
||||
"-Dvulkan=disabled",
|
||||
"-Dbuildtype=debugoptimized",
|
||||
"-Ddemo-profile=devel"
|
||||
],
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
@@ -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 *
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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" },
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
19
gdk/wayland/gdkwaylandpresentationtime-private.h
Normal 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
|
||||
152
gdk/wayland/gdkwaylandpresentationtime.c
Normal 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);
|
||||
}
|
||||
@@ -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 = []
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -60,6 +60,7 @@ is
|
||||
it
|
||||
ja
|
||||
ka
|
||||
kab
|
||||
kg
|
||||
kk
|
||||
km
|
||||
|
||||
54
po/sl.po
@@ -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 "Don’t 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
|
||||
|
||||