New upstream version 3.24.49
This commit is contained in:
commit
fe42c464d6
22
NEWS
22
NEWS
@ -1,3 +1,25 @@
|
||||
Overview of Changes in GTK+ 3.24.49, 05-03-2025
|
||||
===============================================
|
||||
|
||||
* Fix a crash in GtkIMContext
|
||||
|
||||
* Fix crashes in DND with GtkPlug/GtkSocket
|
||||
|
||||
* Wayland:
|
||||
- Fix erroneous crossing events, causing menus to malfunction
|
||||
- Support the cursor-shape protocol
|
||||
|
||||
* X11:
|
||||
- Enforce size limits on windows, preventing lockups
|
||||
|
||||
* macOS:
|
||||
- Fix pen tilt handling
|
||||
|
||||
* Translation updates
|
||||
Bulgarian
|
||||
Thai
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.24.48, 25-02-2025
|
||||
===============================================
|
||||
|
||||
|
BIN
docs/reference/gdk/images/all_resize_cursor.png
Normal file
BIN
docs/reference/gdk/images/all_resize_cursor.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.7 KiB |
BIN
docs/reference/gdk/images/dnd_ask_cursor.png
Normal file
BIN
docs/reference/gdk/images/dnd_ask_cursor.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
@ -142,6 +142,8 @@ images = [
|
||||
'images/X_cursor.png',
|
||||
'images/zoom_in_cursor.png',
|
||||
'images/zoom_out_cursor.png',
|
||||
'images/dnd_ask_cursor.png',
|
||||
'images/all_resize_cursor.png',
|
||||
]
|
||||
|
||||
src_dir = [ gdkinc ]
|
||||
|
@ -285,6 +285,11 @@ gdk_cursor_new_for_display (GdkDisplay *display,
|
||||
* -  "zoom-in"
|
||||
* -  "zoom-out"
|
||||
*
|
||||
* Additionally, the following cursor names are supported, which are
|
||||
* not in the CSS specification:
|
||||
* -  "dnd-ask"
|
||||
* -  "all-resize"
|
||||
*
|
||||
*
|
||||
* Returns: (nullable): a new #GdkCursor, or %NULL if there is no
|
||||
* cursor with the given name
|
||||
|
@ -1088,7 +1088,7 @@ fill_button_event (GdkWindow *window,
|
||||
axes[1] = y;
|
||||
axes[2] = [nsevent pressure];
|
||||
axes[3] = [nsevent tilt].x;
|
||||
axes[4] = [nsevent tilt].y;
|
||||
axes[4] = -[nsevent tilt].y;
|
||||
}
|
||||
|
||||
event->any.type = type;
|
||||
@ -1131,7 +1131,7 @@ fill_motion_event (GdkWindow *window,
|
||||
axes[1] = y;
|
||||
axes[2] = [nsevent pressure];
|
||||
axes[3] = [nsevent tilt].x;
|
||||
axes[4] = [nsevent tilt].y;
|
||||
axes[4] = -[nsevent tilt].y;
|
||||
}
|
||||
|
||||
event->any.type = GDK_MOTION_NOTIFY;
|
||||
|
@ -122,6 +122,7 @@ static const struct {
|
||||
{ "nwse-resize", "bd_double_arrow" },
|
||||
{ "zoom-in", "left_ptr" },
|
||||
{ "zoom-out", "left_ptr" },
|
||||
{ "all-resize", "move" }, /* not CSS, but we want to guarantee it anyway */
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
||||
@ -210,6 +211,13 @@ gdk_wayland_cursor_get_surface (GdkCursor *cursor,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
const char *
|
||||
_gdk_wayland_cursor_get_name (GdkCursor *cursor)
|
||||
{
|
||||
GdkWaylandCursor *wayland_cursor = GDK_WAYLAND_CURSOR (cursor);
|
||||
return wayland_cursor->name;
|
||||
}
|
||||
|
||||
struct wl_buffer *
|
||||
_gdk_wayland_cursor_get_buffer (GdkCursor *cursor,
|
||||
guint image_index,
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include "gdkseatprivate.h"
|
||||
#include "pointer-gestures-unstable-v1-client-protocol.h"
|
||||
#include "tablet-unstable-v2-client-protocol.h"
|
||||
#include "cursor-shape-v1-client-protocol.h"
|
||||
|
||||
#include <xkbcommon/xkbcommon.h>
|
||||
|
||||
@ -99,6 +100,7 @@ struct _GdkWaylandPointerData {
|
||||
uint32_t grab_time;
|
||||
|
||||
struct wl_surface *pointer_surface;
|
||||
struct wp_cursor_shape_device_v1 *shape_device;
|
||||
GdkCursor *cursor;
|
||||
guint cursor_timeout_id;
|
||||
guint cursor_image_index;
|
||||
@ -115,6 +117,7 @@ struct _GdkWaylandTabletToolData
|
||||
{
|
||||
GdkSeat *seat;
|
||||
struct zwp_tablet_tool_v2 *wp_tablet_tool;
|
||||
struct wp_cursor_shape_device_v1 *shape_device;
|
||||
GdkAxisFlags axes;
|
||||
GdkDeviceToolType type;
|
||||
guint64 hardware_serial;
|
||||
@ -406,6 +409,76 @@ gdk_wayland_device_manager_find_pad (GdkWaylandSeat *seat,
|
||||
}
|
||||
|
||||
|
||||
static const struct
|
||||
{
|
||||
const char *cursor_name;
|
||||
unsigned int shape;
|
||||
unsigned int version;
|
||||
} shape_map[] = {
|
||||
{ "default", WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_DEFAULT, 1 },
|
||||
{ "context-menu", WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_CONTEXT_MENU, 1 },
|
||||
{ "help", WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_HELP, 1 },
|
||||
{ "pointer", WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_POINTER, 1 },
|
||||
{ "progress", WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_PROGRESS },
|
||||
{ "wait", WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_WAIT, 1 },
|
||||
{ "cell", WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_CELL, 1 },
|
||||
{ "crosshair", WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_CROSSHAIR, 1 },
|
||||
{ "text", WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_TEXT, 1 },
|
||||
{ "vertical-text", WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_VERTICAL_TEXT, 1 },
|
||||
{ "alias", WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ALIAS, 1 },
|
||||
{ "copy", WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_COPY, 1 },
|
||||
{ "move", WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_MOVE, 1 },
|
||||
{ "no-drop", WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_NO_DROP, 1 },
|
||||
{ "not-allowed", WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_NOT_ALLOWED, 1 },
|
||||
{ "grab", WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_GRAB, 1 },
|
||||
{ "grabbing", WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_GRABBING, 1 },
|
||||
{ "e-resize", WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_E_RESIZE, 1 },
|
||||
{ "n-resize", WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_N_RESIZE, 1 },
|
||||
{ "ne-resize", WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_NE_RESIZE, 1 },
|
||||
{ "nw-resize", WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_NW_RESIZE, 1 },
|
||||
{ "s-resize", WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_S_RESIZE, 1 },
|
||||
{ "se-resize", WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_SE_RESIZE, 1 },
|
||||
{ "sw-resize", WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_SW_RESIZE, 1 },
|
||||
{ "w-resize", WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_W_RESIZE, 1 },
|
||||
{ "ew-resize", WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_EW_RESIZE, 1 },
|
||||
{ "ns-resize", WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_NS_RESIZE, 1 },
|
||||
{ "nesw-resize", WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_NESW_RESIZE, 1 },
|
||||
{ "nwse-resize", WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_NWSE_RESIZE, 1 },
|
||||
{ "col-resize", WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_COL_RESIZE, 1 },
|
||||
{ "row-resize", WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ROW_RESIZE, 1 },
|
||||
{ "all-scroll", WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ALL_SCROLL, 1 },
|
||||
{ "zoom-in", WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ZOOM_IN, 1 },
|
||||
{ "zoom-out", WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ZOOM_OUT, 1 },
|
||||
{ "all-scroll", WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ALL_SCROLL, 1 },
|
||||
/* the following a v2 additions, with a fallback for v1 */
|
||||
{ "dnd-ask", WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_DND_ASK, 2 },
|
||||
{ "dnd-ask", WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_CONTEXT_MENU, 1 },
|
||||
{ "all-resize", WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ALL_RESIZE, 2 },
|
||||
{ "all-resize", WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_MOVE, 1 },
|
||||
};
|
||||
|
||||
static unsigned int
|
||||
_gdk_wayland_cursor_get_shape (GdkCursor *cursor,
|
||||
int version)
|
||||
{
|
||||
gsize i;
|
||||
const char *cursor_name;
|
||||
|
||||
cursor_name = _gdk_wayland_cursor_get_name (cursor);
|
||||
if (cursor_name == NULL ||
|
||||
g_str_equal (cursor_name, "none"))
|
||||
return 0;
|
||||
|
||||
for (i = 0; i < G_N_ELEMENTS (shape_map); i++)
|
||||
{
|
||||
if (g_str_equal (shape_map[i].cursor_name, cursor_name) &&
|
||||
version >= shape_map[i].version)
|
||||
return shape_map[i].shape;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gdk_wayland_device_update_window_cursor (GdkDevice *device)
|
||||
{
|
||||
@ -416,29 +489,50 @@ gdk_wayland_device_update_window_cursor (GdkDevice *device)
|
||||
guint next_image_index, next_image_delay;
|
||||
gboolean retval = G_SOURCE_REMOVE;
|
||||
GdkWaylandTabletData *tablet;
|
||||
unsigned int shape;
|
||||
|
||||
tablet = gdk_wayland_device_manager_find_tablet (seat, device);
|
||||
|
||||
if (!pointer->cursor)
|
||||
{
|
||||
pointer->cursor_timeout_id = 0;
|
||||
return G_SOURCE_REMOVE;
|
||||
}
|
||||
|
||||
if (tablet && !tablet->current_tool)
|
||||
{
|
||||
pointer->cursor_timeout_id = 0;
|
||||
return G_SOURCE_REMOVE;
|
||||
}
|
||||
|
||||
if (GDK_WAYLAND_DISPLAY (seat->display)->cursor_shape)
|
||||
{
|
||||
shape = _gdk_wayland_cursor_get_shape (pointer->cursor,
|
||||
wp_cursor_shape_manager_v1_get_version (GDK_WAYLAND_DISPLAY (seat->display)->cursor_shape));
|
||||
if (shape != 0)
|
||||
{
|
||||
if (tablet && tablet->current_tool->shape_device)
|
||||
{
|
||||
wp_cursor_shape_device_v1_set_shape (tablet->current_tool->shape_device, pointer->enter_serial, shape);
|
||||
return G_SOURCE_REMOVE;
|
||||
}
|
||||
else if (seat->wl_pointer && pointer->shape_device)
|
||||
{
|
||||
wp_cursor_shape_device_v1_set_shape (pointer->shape_device, pointer->enter_serial, shape);
|
||||
return G_SOURCE_REMOVE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (pointer->cursor)
|
||||
{
|
||||
buffer = _gdk_wayland_cursor_get_buffer (pointer->cursor,
|
||||
pointer->cursor_image_index,
|
||||
&x, &y, &w, &h, &scale);
|
||||
}
|
||||
else
|
||||
{
|
||||
pointer->cursor_timeout_id = 0;
|
||||
return G_SOURCE_REMOVE;
|
||||
}
|
||||
|
||||
if (tablet)
|
||||
{
|
||||
if (!tablet->current_tool)
|
||||
{
|
||||
pointer->cursor_timeout_id = 0;
|
||||
return G_SOURCE_REMOVE;
|
||||
}
|
||||
|
||||
zwp_tablet_tool_v2_set_cursor (tablet->current_tool->wp_tablet_tool,
|
||||
pointer->enter_serial,
|
||||
pointer->pointer_surface,
|
||||
@ -2856,6 +2950,8 @@ static void
|
||||
_gdk_wayland_seat_remove_tool (GdkWaylandSeat *seat,
|
||||
GdkWaylandTabletToolData *tool)
|
||||
{
|
||||
g_clear_pointer (&tool->shape_device, wp_cursor_shape_device_v1_destroy);
|
||||
|
||||
seat->tablet_tools = g_list_remove (seat->tablet_tools, tool);
|
||||
|
||||
gdk_seat_tool_removed (GDK_SEAT (seat), tool->tool);
|
||||
@ -3185,6 +3281,12 @@ seat_handle_capabilities (void *data,
|
||||
&gesture_pinch_listener, seat);
|
||||
}
|
||||
|
||||
if (display_wayland->cursor_shape)
|
||||
{
|
||||
seat->pointer_info.shape_device =
|
||||
wp_cursor_shape_manager_v1_get_pointer (display_wayland->cursor_shape, seat->wl_pointer);
|
||||
}
|
||||
|
||||
g_signal_emit_by_name (device_manager, "device-added", seat->pointer);
|
||||
}
|
||||
else if (!(caps & WL_SEAT_CAPABILITY_POINTER) && seat->wl_pointer)
|
||||
@ -3231,6 +3333,8 @@ seat_handle_capabilities (void *data,
|
||||
g_signal_emit_by_name (device_manager, "device-removed", seat->continuous_scrolling);
|
||||
g_clear_object (&seat->continuous_scrolling);
|
||||
}
|
||||
|
||||
g_clear_pointer (&seat->pointer_info.shape_device, wp_cursor_shape_device_v1_destroy);
|
||||
}
|
||||
|
||||
if ((caps & WL_SEAT_CAPABILITY_KEYBOARD) && !seat->wl_keyboard)
|
||||
@ -4625,6 +4729,7 @@ tablet_seat_handle_tool_added (void *data,
|
||||
{
|
||||
GdkWaylandSeat *seat = data;
|
||||
GdkWaylandTabletToolData *tool;
|
||||
GdkWaylandDisplay *display = GDK_WAYLAND_DISPLAY (seat->display);
|
||||
|
||||
tool = g_new0 (GdkWaylandTabletToolData, 1);
|
||||
tool->wp_tablet_tool = wp_tablet_tool;
|
||||
@ -4634,6 +4739,13 @@ tablet_seat_handle_tool_added (void *data,
|
||||
zwp_tablet_tool_v2_set_user_data (wp_tablet_tool, tool);
|
||||
|
||||
seat->tablet_tools = g_list_prepend (seat->tablet_tools, tool);
|
||||
|
||||
if (display->cursor_shape)
|
||||
{
|
||||
tool->shape_device =
|
||||
wp_cursor_shape_manager_v1_get_tablet_tool_v2 (
|
||||
display->cursor_shape, tool->wp_tablet_tool);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
@ -5029,7 +5141,8 @@ gdk_wayland_seat_grab (GdkSeat *seat,
|
||||
{
|
||||
GdkWaylandTabletData *tablet = l->data;
|
||||
|
||||
device_maybe_emit_grab_crossing (tablet->master, native, evtime);
|
||||
if (tablet->current_tool)
|
||||
device_maybe_emit_grab_crossing (tablet->master, native, evtime);
|
||||
|
||||
_gdk_display_add_device_grab (display,
|
||||
tablet->master,
|
||||
|
@ -553,6 +553,12 @@ gdk_registry_handle_global (void *data,
|
||||
display_wayland->xdg_activation_version);
|
||||
}
|
||||
#endif
|
||||
else if (strcmp (interface, wp_cursor_shape_manager_v1_interface.name) == 0)
|
||||
{
|
||||
display_wayland->cursor_shape =
|
||||
wl_registry_bind (display_wayland->wl_registry, id,
|
||||
&wp_cursor_shape_manager_v1_interface, 1);
|
||||
}
|
||||
|
||||
g_hash_table_insert (display_wayland->known_globals,
|
||||
GUINT_TO_POINTER (id), g_strdup (interface));
|
||||
|
@ -40,6 +40,7 @@
|
||||
#ifdef HAVE_XDG_ACTIVATION
|
||||
#include <gdk/wayland/xdg-activation-v1-client-protocol.h>
|
||||
#endif
|
||||
#include <gdk/wayland/cursor-shape-v1-client-protocol.h>
|
||||
|
||||
#include <glib.h>
|
||||
#include <gdk/gdkkeys.h>
|
||||
@ -108,6 +109,7 @@ struct _GdkWaylandDisplay
|
||||
#ifdef HAVE_XDG_ACTIVATION
|
||||
struct xdg_activation_v1 *xdg_activation;
|
||||
#endif
|
||||
struct wp_cursor_shape_manager_v1 *cursor_shape;
|
||||
|
||||
GList *async_roundtrips;
|
||||
|
||||
|
@ -89,6 +89,8 @@ gboolean _gdk_wayland_display_supports_cursor_color (GdkDisplay *display);
|
||||
void gdk_wayland_display_system_bell (GdkDisplay *display,
|
||||
GdkWindow *window);
|
||||
|
||||
const char *_gdk_wayland_cursor_get_name (GdkCursor *cursor);
|
||||
|
||||
struct wl_buffer *_gdk_wayland_cursor_get_buffer (GdkCursor *cursor,
|
||||
guint image_index,
|
||||
int *hotspot_x,
|
||||
|
@ -59,6 +59,7 @@ proto_sources = [
|
||||
['server-decoration', 'private' ],
|
||||
['xdg-output', 'unstable', 'v1', ],
|
||||
['primary-selection', 'unstable', 'v1', ],
|
||||
['cursor-shape-v1', 'private', ],
|
||||
]
|
||||
if wlprotocolsdep.version().version_compare('>=1.21')
|
||||
proto_sources += [['xdg-activation', 'staging', 'v1', ]]
|
||||
|
163
gdk/wayland/protocol/cursor-shape-v1.xml
Normal file
163
gdk/wayland/protocol/cursor-shape-v1.xml
Normal file
@ -0,0 +1,163 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<protocol name="cursor_shape_v1">
|
||||
<copyright>
|
||||
Copyright 2018 The Chromium Authors
|
||||
Copyright 2023 Simon Ser
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:
|
||||
The above copyright notice and this permission notice (including the next
|
||||
paragraph) shall be included in all copies or substantial portions of the
|
||||
Software.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
</copyright>
|
||||
|
||||
<interface name="wp_cursor_shape_manager_v1" version="2">
|
||||
<description summary="cursor shape manager">
|
||||
This global offers an alternative, optional way to set cursor images. This
|
||||
new way uses enumerated cursors instead of a wl_surface like
|
||||
wl_pointer.set_cursor does.
|
||||
|
||||
Warning! The protocol described in this file is currently in the testing
|
||||
phase. Backward compatible changes may be added together with the
|
||||
corresponding interface version bump. Backward incompatible changes can
|
||||
only be done by creating a new major version of the extension.
|
||||
</description>
|
||||
|
||||
<request name="destroy" type="destructor">
|
||||
<description summary="destroy the manager">
|
||||
Destroy the cursor shape manager.
|
||||
</description>
|
||||
</request>
|
||||
|
||||
<request name="get_pointer">
|
||||
<description summary="manage the cursor shape of a pointer device">
|
||||
Obtain a wp_cursor_shape_device_v1 for a wl_pointer object.
|
||||
|
||||
When the pointer capability is removed from the wl_seat, the
|
||||
wp_cursor_shape_device_v1 object becomes inert.
|
||||
</description>
|
||||
<arg name="cursor_shape_device" type="new_id" interface="wp_cursor_shape_device_v1"/>
|
||||
<arg name="pointer" type="object" interface="wl_pointer"/>
|
||||
</request>
|
||||
|
||||
<request name="get_tablet_tool_v2">
|
||||
<description summary="manage the cursor shape of a tablet tool device">
|
||||
Obtain a wp_cursor_shape_device_v1 for a zwp_tablet_tool_v2 object.
|
||||
|
||||
When the zwp_tablet_tool_v2 is removed, the wp_cursor_shape_device_v1
|
||||
object becomes inert.
|
||||
</description>
|
||||
<arg name="cursor_shape_device" type="new_id" interface="wp_cursor_shape_device_v1"/>
|
||||
<arg name="tablet_tool" type="object" interface="zwp_tablet_tool_v2"/>
|
||||
</request>
|
||||
</interface>
|
||||
|
||||
<interface name="wp_cursor_shape_device_v1" version="2">
|
||||
<description summary="cursor shape for a device">
|
||||
This interface allows clients to set the cursor shape.
|
||||
</description>
|
||||
|
||||
<enum name="shape">
|
||||
<description summary="cursor shapes">
|
||||
This enum describes cursor shapes.
|
||||
|
||||
The names are taken from the CSS W3C specification:
|
||||
https://w3c.github.io/csswg-drafts/css-ui/#cursor
|
||||
with a few additions.
|
||||
|
||||
Note that there are some groups of cursor shapes that are related:
|
||||
The first group is drag-and-drop cursors which are used to indicate
|
||||
the selected action during dnd operations. The second group is resize
|
||||
cursors which are used to indicate resizing and moving possibilities
|
||||
on window borders. It is recommended that the shapes in these groups
|
||||
should use visually compatible images and metaphors.
|
||||
</description>
|
||||
<entry name="default" value="1" summary="default cursor"/>
|
||||
<entry name="context_menu" value="2" summary="a context menu is available for the object under the cursor"/>
|
||||
<entry name="help" value="3" summary="help is available for the object under the cursor"/>
|
||||
<entry name="pointer" value="4" summary="pointer that indicates a link or another interactive element"/>
|
||||
<entry name="progress" value="5" summary="progress indicator"/>
|
||||
<entry name="wait" value="6" summary="program is busy, user should wait"/>
|
||||
<entry name="cell" value="7" summary="a cell or set of cells may be selected"/>
|
||||
<entry name="crosshair" value="8" summary="simple crosshair"/>
|
||||
<entry name="text" value="9" summary="text may be selected"/>
|
||||
<entry name="vertical_text" value="10" summary="vertical text may be selected"/>
|
||||
<entry name="alias" value="11" summary="drag-and-drop: alias of/shortcut to something is to be created"/>
|
||||
<entry name="copy" value="12" summary="drag-and-drop: something is to be copied"/>
|
||||
<entry name="move" value="13" summary="drag-and-drop: something is to be moved"/>
|
||||
<entry name="no_drop" value="14" summary="drag-and-drop: the dragged item cannot be dropped at the current cursor location"/>
|
||||
<entry name="not_allowed" value="15" summary="drag-and-drop: the requested action will not be carried out"/>
|
||||
<entry name="grab" value="16" summary="drag-and-drop: something can be grabbed"/>
|
||||
<entry name="grabbing" value="17" summary="drag-and-drop: something is being grabbed"/>
|
||||
<entry name="e_resize" value="18" summary="resizing: the east border is to be moved"/>
|
||||
<entry name="n_resize" value="19" summary="resizing: the north border is to be moved"/>
|
||||
<entry name="ne_resize" value="20" summary="resizing: the north-east corner is to be moved"/>
|
||||
<entry name="nw_resize" value="21" summary="resizing: the north-west corner is to be moved"/>
|
||||
<entry name="s_resize" value="22" summary="resizing: the south border is to be moved"/>
|
||||
<entry name="se_resize" value="23" summary="resizing: the south-east corner is to be moved"/>
|
||||
<entry name="sw_resize" value="24" summary="resizing: the south-west corner is to be moved"/>
|
||||
<entry name="w_resize" value="25" summary="resizing: the west border is to be moved"/>
|
||||
<entry name="ew_resize" value="26" summary="resizing: the east and west borders are to be moved"/>
|
||||
<entry name="ns_resize" value="27" summary="resizing: the north and south borders are to be moved"/>
|
||||
<entry name="nesw_resize" value="28" summary="resizing: the north-east and south-west corners are to be moved"/>
|
||||
<entry name="nwse_resize" value="29" summary="resizing: the north-west and south-east corners are to be moved"/>
|
||||
<entry name="col_resize" value="30" summary="resizing: that the item/column can be resized horizontally"/>
|
||||
<entry name="row_resize" value="31" summary="resizing: that the item/row can be resized vertically"/>
|
||||
<entry name="all_scroll" value="32" summary="something can be scrolled in any direction"/>
|
||||
<entry name="zoom_in" value="33" summary="something can be zoomed in"/>
|
||||
<entry name="zoom_out" value="34" summary="something can be zoomed out"/>
|
||||
<entry name="dnd_ask" value="35" summary="drag-and-drop: selected drag action is ASK (non-css value)" since="2"/>
|
||||
<entry name="all_resize" value="36" summary="resizing: something can be moved or resized in any direction (non-css value)" since="2"/>
|
||||
<entry name="none" value="37" summary="no cursor is rendered" since="2"/>
|
||||
</enum>
|
||||
|
||||
<enum name="error">
|
||||
<entry name="invalid_shape" value="1"
|
||||
summary="the specified shape value is invalid"/>
|
||||
</enum>
|
||||
|
||||
<request name="destroy" type="destructor">
|
||||
<description summary="destroy the cursor shape device">
|
||||
Destroy the cursor shape device.
|
||||
|
||||
The device cursor shape remains unchanged.
|
||||
</description>
|
||||
</request>
|
||||
|
||||
<request name="set_shape">
|
||||
<description summary="set device cursor to the shape">
|
||||
Sets the device cursor to the specified shape. The compositor will
|
||||
change the cursor image based on the specified shape.
|
||||
|
||||
The cursor actually changes only if the input device focus is one of
|
||||
the requesting client's surfaces. If any, the previous cursor image
|
||||
(surface or shape) is replaced.
|
||||
|
||||
The "shape" argument must be a valid enum entry, otherwise the
|
||||
invalid_shape protocol error is raised.
|
||||
|
||||
This is similar to the wl_pointer.set_cursor and
|
||||
zwp_tablet_tool_v2.set_cursor requests, but this request accepts a
|
||||
shape instead of contents in the form of a surface. Clients can mix
|
||||
set_cursor and set_shape requests.
|
||||
|
||||
The serial parameter must match the latest wl_pointer.enter or
|
||||
zwp_tablet_tool_v2.proximity_in serial number sent to the client.
|
||||
Otherwise the request will be ignored.
|
||||
</description>
|
||||
<arg name="serial" type="uint" summary="serial number of the enter event"/>
|
||||
<arg name="shape" type="uint" enum="shape"/>
|
||||
</request>
|
||||
</interface>
|
||||
</protocol>
|
@ -650,6 +650,7 @@ static const struct {
|
||||
{ "nwse-resize", "bd_double_arrow" },
|
||||
{ "zoom-in", "left_ptr" },
|
||||
{ "zoom-out", "left_ptr" },
|
||||
{ "all-resize", "move" }, /* not CSS, but we want to guarantee it anyway */
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
||||
|
@ -72,6 +72,8 @@
|
||||
#include <X11/extensions/Xdamage.h>
|
||||
#endif
|
||||
|
||||
#define XLIB_COORD_MAX 32767
|
||||
|
||||
const int _gdk_x11_event_mask_table[21] =
|
||||
{
|
||||
ExposureMask,
|
||||
@ -193,6 +195,14 @@ _gdk_x11_window_update_size (GdkWindowImplX11 *impl)
|
||||
{
|
||||
if (impl->cairo_surface)
|
||||
{
|
||||
if (impl->unscaled_width < 0)
|
||||
impl->unscaled_width = 0;
|
||||
else if (impl->unscaled_width > XLIB_COORD_MAX)
|
||||
impl->unscaled_width = XLIB_COORD_MAX;
|
||||
if (impl->unscaled_height < 0)
|
||||
impl->unscaled_height = 0;
|
||||
else if (impl->unscaled_height > XLIB_COORD_MAX)
|
||||
impl->unscaled_height = XLIB_COORD_MAX;
|
||||
cairo_xlib_surface_set_size (impl->cairo_surface,
|
||||
impl->unscaled_width, impl->unscaled_height);
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ gtk_boolean_cell_accessible_action_get_name (AtkAction *action,
|
||||
if (i == 0)
|
||||
return "toggle";
|
||||
|
||||
return parent_action_iface->get_description (action, i - 1);
|
||||
return parent_action_iface->get_name (action, i - 1);
|
||||
}
|
||||
|
||||
static const gchar *
|
||||
@ -62,7 +62,7 @@ gtk_boolean_cell_accessible_action_get_localized_name (AtkAction *action,
|
||||
if (i == 0)
|
||||
return C_("Action name", "Toggle");
|
||||
|
||||
return parent_action_iface->get_description (action, i - 1);
|
||||
return parent_action_iface->get_localized_name (action, i - 1);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
@ -1623,13 +1623,15 @@ gtk_status_icon_color_changed (GtkTrayIcon *tray,
|
||||
|
||||
if (name)
|
||||
{
|
||||
GdkRGBA rgba;
|
||||
GdkRGBA *rgba;
|
||||
|
||||
g_object_get (priv->tray_icon, pspec->name, &rgba, NULL);
|
||||
|
||||
rgba.alpha = 1;
|
||||
rgba->alpha = 1;
|
||||
|
||||
gtk_widget_override_symbolic_color (priv->image, name, &rgba);
|
||||
gtk_widget_override_symbolic_color (priv->image, name, rgba);
|
||||
|
||||
gdk_rgba_free (rgba);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3,8 +3,9 @@
|
||||
xmlns:gt="https://www.gnu.org/s/gettext/ns/its/extensions/1.0"
|
||||
version="2.0">
|
||||
<its:translateRule selector="/interface" translate="no"/>
|
||||
<its:translateRule selector="/interface//*[@translatable = 'yes']"
|
||||
translate="yes"/>
|
||||
<its:translateRule selector="/interface//*[@translatable = 'yes']" translate="yes"/>
|
||||
<its:translateRule selector="/interface//*[@translatable = 'true']" translate="yes"/>
|
||||
<its:translateRule selector="/interface//*[@translatable = '1']" translate="yes"/>
|
||||
|
||||
<!-- The 'comment' attribute should be extracted as a translator comment. -->
|
||||
<its:locNoteRule selector="/interface//*[@comments]"
|
||||
|
20
gtk/gtkdnd.c
20
gtk/gtkdnd.c
@ -2666,6 +2666,8 @@ gtk_drag_drop (GtkDragSourceInfo *info,
|
||||
{
|
||||
if (info->icon_window)
|
||||
gtk_widget_hide (info->icon_window);
|
||||
if (info->proxy_dest)
|
||||
g_object_ref (info->proxy_dest->context);
|
||||
|
||||
gdk_drag_drop (info->context, time);
|
||||
info->drop_timeout = gdk_threads_add_timeout (DROP_ABORT_TIME,
|
||||
@ -2759,7 +2761,7 @@ static void
|
||||
gtk_drag_source_info_free (GtkDragSourceInfo *info)
|
||||
{
|
||||
gtk_drag_remove_icon (info);
|
||||
gtk_widget_destroy (info->icon_window);
|
||||
g_clear_pointer (&info->icon_window, gtk_widget_destroy);
|
||||
g_free (info);
|
||||
}
|
||||
|
||||
@ -2814,7 +2816,11 @@ gtk_drag_source_info_destroy (GtkDragSourceInfo *info)
|
||||
gtk_target_list_unref (info->target_list);
|
||||
|
||||
if (info->drop_timeout)
|
||||
g_source_remove (info->drop_timeout);
|
||||
{
|
||||
g_source_remove (info->drop_timeout);
|
||||
if (info->proxy_dest)
|
||||
g_object_unref (info->proxy_dest->context);
|
||||
}
|
||||
|
||||
if (info->update_idle)
|
||||
g_source_remove (info->update_idle);
|
||||
@ -3260,14 +3266,20 @@ static gboolean
|
||||
gtk_drag_abort_timeout (gpointer data)
|
||||
{
|
||||
GtkDragSourceInfo *info = data;
|
||||
GdkDragContext *context = NULL;
|
||||
guint32 time = GDK_CURRENT_TIME;
|
||||
|
||||
if (info->proxy_dest)
|
||||
time = info->proxy_dest->proxy_drop_time;
|
||||
{
|
||||
time = info->proxy_dest->proxy_drop_time;
|
||||
context = info->proxy_dest->context;
|
||||
}
|
||||
|
||||
info->drop_timeout = 0;
|
||||
gtk_drag_drop_finished (info, GTK_DRAG_RESULT_TIMEOUT_EXPIRED, time);
|
||||
|
||||
|
||||
g_clear_object (&context);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -282,7 +282,8 @@ gtk_im_multicontext_get_slave (GtkIMMulticontext *multicontext)
|
||||
}
|
||||
|
||||
static void
|
||||
im_module_setting_changed (GtkSettings *settings,
|
||||
im_module_setting_changed (GtkSettings *settings,
|
||||
GParamSpec *pspec,
|
||||
GtkIMMulticontext *self)
|
||||
{
|
||||
gtk_im_multicontext_set_slave (self, NULL, FALSE);
|
||||
|
@ -612,7 +612,10 @@ scan_directory (const gchar *base_path,
|
||||
dir = g_dir_open (dir_path, 0, NULL);
|
||||
|
||||
if (!dir)
|
||||
return directories;
|
||||
{
|
||||
g_free (dir_path);
|
||||
return directories;
|
||||
}
|
||||
|
||||
dir_hash = g_hash_table_new (g_str_hash, g_str_equal);
|
||||
|
||||
@ -710,6 +713,7 @@ scan_directory (const gchar *base_path,
|
||||
|
||||
g_list_free_full (list, g_free);
|
||||
g_dir_close (dir);
|
||||
g_free (dir_path);
|
||||
|
||||
/* Move dir into the big file hash */
|
||||
g_hash_table_foreach_remove (dir_hash, foreach_remove_func, files);
|
||||
@ -1725,6 +1729,7 @@ main (int argc, char **argv)
|
||||
g_option_context_add_main_entries (context, args, GETTEXT_PACKAGE);
|
||||
|
||||
g_option_context_parse (context, &argc, &argv, NULL);
|
||||
g_option_context_free (context);
|
||||
|
||||
path = argv[1];
|
||||
#ifdef G_OS_WIN32
|
||||
|
@ -1,5 +1,5 @@
|
||||
project('gtk', 'c',
|
||||
version: '3.24.48',
|
||||
version: '3.24.49',
|
||||
default_options: [
|
||||
'buildtype=debugoptimized',
|
||||
'warning_level=1'
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -41,7 +41,7 @@ msgstr ""
|
||||
"Project-Id-Version: gtk+ 2.3.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2020-07-07 15:21+0000\n"
|
||||
"PO-Revision-Date: 2019-08-16 13:31+0200\n"
|
||||
"PO-Revision-Date: 2025-02-23 13:31+0200\n"
|
||||
"Last-Translator: Jordi Mas <jmas@softcatala.org>\n"
|
||||
"Language-Team: Catalan <tradgnome@softcatala.org>\n"
|
||||
"Language: ca\n"
|
||||
@ -5441,7 +5441,7 @@ msgstr ""
|
||||
|
||||
#: gtk/gtknotebook.c:802
|
||||
msgid "Enable Popup"
|
||||
msgstr "Disponible el menú emergent"
|
||||
msgstr "Habilita el menú emergent"
|
||||
|
||||
#: gtk/gtknotebook.c:803
|
||||
msgid ""
|
||||
@ -8874,7 +8874,7 @@ msgstr ""
|
||||
|
||||
#: gtk/gtktreeview.c:1127
|
||||
msgid "Hover Selection"
|
||||
msgstr "Segueix el punter"
|
||||
msgstr "Selecció al passar per sobre"
|
||||
|
||||
#: gtk/gtktreeview.c:1128
|
||||
msgid "Whether the selection should follow the pointer"
|
||||
@ -8882,7 +8882,7 @@ msgstr "Si la selecció ha de seguir el punter"
|
||||
|
||||
#: gtk/gtktreeview.c:1146
|
||||
msgid "Hover Expand"
|
||||
msgstr "Expandeix amb el punter"
|
||||
msgstr "Expandeix al passar per sobre"
|
||||
|
||||
#: gtk/gtktreeview.c:1147
|
||||
msgid ""
|
||||
|
13135
po-properties/th.po
13135
po-properties/th.po
File diff suppressed because it is too large
Load Diff
6
po/ca.po
6
po/ca.po
@ -348,12 +348,12 @@ msgstr "Silencia"
|
||||
#: gdk/keyname-table.h:6887
|
||||
msgctxt "keyboard label"
|
||||
msgid "AudioLowerVolume"
|
||||
msgstr "Apuja el volum"
|
||||
msgstr "Abaixa el volum"
|
||||
|
||||
#: gdk/keyname-table.h:6888
|
||||
msgctxt "keyboard label"
|
||||
msgid "AudioRaiseVolume"
|
||||
msgstr "Abaixa el volum"
|
||||
msgstr "Apuja el volum"
|
||||
|
||||
#: gdk/keyname-table.h:6889
|
||||
msgctxt "keyboard label"
|
||||
@ -853,7 +853,7 @@ msgstr "_Centrat"
|
||||
#: gtk/a11y/gtkimageaccessible.c:90 gtk/deprecated/gtkstock.c:396
|
||||
msgctxt "Stock label"
|
||||
msgid "_Fill"
|
||||
msgstr "_Justificat"
|
||||
msgstr "_Omple"
|
||||
|
||||
#. This is about text justification, "left-justified text"
|
||||
#: gtk/a11y/gtkimageaccessible.c:91 gtk/deprecated/gtkstock.c:398
|
||||
|
@ -603,32 +603,6 @@ run_tests (GtkTextBuffer *buffer)
|
||||
check_specific_tag (buffer, "end_tag");
|
||||
}
|
||||
|
||||
|
||||
static const char *book_closed_xpm[] = {
|
||||
"16 16 6 1",
|
||||
" c None s None",
|
||||
". c black",
|
||||
"X c red",
|
||||
"o c yellow",
|
||||
"O c #808080",
|
||||
"# c white",
|
||||
" ",
|
||||
" .. ",
|
||||
" ..XX. ",
|
||||
" ..XXXXX. ",
|
||||
" ..XXXXXXXX. ",
|
||||
".ooXXXXXXXXX. ",
|
||||
"..ooXXXXXXXXX. ",
|
||||
".X.ooXXXXXXXXX. ",
|
||||
".XX.ooXXXXXX.. ",
|
||||
" .XX.ooXXX..#O ",
|
||||
" .XX.oo..##OO. ",
|
||||
" .XX..##OO.. ",
|
||||
" .X.#OO.. ",
|
||||
" ..O.. ",
|
||||
" .. ",
|
||||
" "};
|
||||
|
||||
static void
|
||||
fill_buffer (GtkTextBuffer *buffer)
|
||||
{
|
||||
@ -674,7 +648,7 @@ fill_buffer (GtkTextBuffer *buffer)
|
||||
"font", "-*-courier-bold-r-*-*-10-*-*-*-*-*-*-*",
|
||||
NULL);
|
||||
|
||||
pixbuf = gdk_pixbuf_new_from_xpm_data (book_closed_xpm);
|
||||
pixbuf = gdk_pixbuf_new_from_resource ("/org/gtk/libgtk/icons/16x16/actions/application-exit.png", NULL);
|
||||
|
||||
g_assert (pixbuf != NULL);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user