Compare commits
25 Commits
main
...
resizing-f
Author | SHA1 | Date | |
---|---|---|---|
|
0935a50bf5 | ||
|
19d60d7234 | ||
|
f2c148c42d | ||
|
5af0e93de0 | ||
|
e21a7d70f1 | ||
|
bc05b0bba5 | ||
|
ece755ff62 | ||
|
8c1a99214f | ||
|
8ce83d03af | ||
|
29c83ef0b9 | ||
|
7def3bf542 | ||
|
6d855c307b | ||
|
baf05d816a | ||
|
490bfce319 | ||
|
a27fef3a27 | ||
|
294d45f0c7 | ||
|
1d068da0c9 | ||
|
109c48a082 | ||
|
21e730003a | ||
|
55b77278f2 | ||
|
b62802b52f | ||
|
2ba9c35195 | ||
|
bbb8c04323 | ||
|
89a15f6d03 | ||
|
16a7197586 |
@@ -1555,10 +1555,12 @@ gdk_broadway_toplevel_present (GdkToplevel *toplevel,
|
||||
|
||||
gdk_toplevel_size_init (&size, bounds_width, bounds_height);
|
||||
gdk_toplevel_notify_compute_size (toplevel, &size);
|
||||
g_warn_if_fail (size.width > 0);
|
||||
g_warn_if_fail (size.height > 0);
|
||||
width = size.width;
|
||||
height = size.height;
|
||||
surface->shadow_left = size.shadow_left;
|
||||
surface->shadow_right = size.shadow_right;
|
||||
surface->shadow_top = size.shadow_top;
|
||||
surface->shadow_bottom = size.shadow_bottom;
|
||||
|
||||
if (gdk_toplevel_layout_get_resizable (layout))
|
||||
{
|
||||
|
@@ -118,6 +118,31 @@ gdk_toplevel_size_set_min_size (GdkToplevelSize *size,
|
||||
size->min_height = min_height;
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_toplevel_size_set_shadow_size:
|
||||
* @size: a #GdkToplevelSize
|
||||
* @left: The left extent
|
||||
* @right: The right extent
|
||||
* @top: The top extent
|
||||
* @bottom: The bottom extent
|
||||
*
|
||||
* Determine the size of the shadow and border area that should be
|
||||
* considered “outside” for the purposes of window placement and
|
||||
* edge snapping.
|
||||
*/
|
||||
void
|
||||
gdk_toplevel_size_set_shadow_size (GdkToplevelSize *size,
|
||||
int left,
|
||||
int right,
|
||||
int top,
|
||||
int bottom)
|
||||
{
|
||||
size->shadow_left = left;
|
||||
size->shadow_right = right;
|
||||
size->shadow_top = top;
|
||||
size->shadow_bottom = bottom;
|
||||
}
|
||||
|
||||
void
|
||||
gdk_toplevel_size_validate (GdkToplevelSize *size)
|
||||
{
|
||||
@@ -132,4 +157,7 @@ gdk_toplevel_size_validate (GdkToplevelSize *size)
|
||||
if (size->min_width > size->width ||
|
||||
size->min_height > size->height)
|
||||
g_warning ("GdkToplevelSize: min_size exceeds size");
|
||||
|
||||
if (size->width <= 0 || size->height <= 0)
|
||||
g_warning ("GdkToplevelSize: size can't be zero");
|
||||
}
|
||||
|
@@ -54,6 +54,12 @@ void gdk_toplevel_size_set_min_size (GdkToplevelSize *
|
||||
int min_width,
|
||||
int min_height);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_toplevel_size_set_shadow_size (GdkToplevelSize *size,
|
||||
int left,
|
||||
int right,
|
||||
int top,
|
||||
int bottom);
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_TOPLEVEL_SIZE_H__ */
|
||||
|
@@ -30,6 +30,11 @@ struct _GdkToplevelSize
|
||||
int height;
|
||||
int min_width;
|
||||
int min_height;
|
||||
|
||||
int shadow_left;
|
||||
int shadow_right;
|
||||
int shadow_top;
|
||||
int shadow_bottom;
|
||||
};
|
||||
|
||||
void gdk_toplevel_size_init (GdkToplevelSize *size,
|
||||
|
@@ -128,10 +128,12 @@ _gdk_macos_toplevel_surface_present (GdkToplevel *toplevel,
|
||||
|
||||
gdk_toplevel_size_init (&size, bounds_width, bounds_height);
|
||||
gdk_toplevel_notify_compute_size (toplevel, &size);
|
||||
g_warn_if_fail (size.width > 0);
|
||||
g_warn_if_fail (size.height > 0);
|
||||
width = size.width;
|
||||
height = size.height;
|
||||
surface->shadow_left = size.shadow_left;
|
||||
surface->shadow_right = size.shadow_right;
|
||||
surface->shadow_top = size.shadow_top;
|
||||
surface->shadow_bottom = size.shadow_bottom;
|
||||
|
||||
if (gdk_toplevel_layout_get_resizable (layout))
|
||||
{
|
||||
|
@@ -901,24 +901,6 @@ gdk_wayland_surface_finalize (GObject *object)
|
||||
G_OBJECT_CLASS (gdk_wayland_surface_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_wayland_surface_resize (GdkSurface *surface,
|
||||
int width,
|
||||
int height,
|
||||
int scale)
|
||||
{
|
||||
GdkDisplay *display;
|
||||
GdkEvent *event;
|
||||
|
||||
event = gdk_configure_event_new (surface, width, height);
|
||||
|
||||
gdk_wayland_surface_update_size (surface, width, height, scale);
|
||||
_gdk_surface_update_size (surface);
|
||||
|
||||
display = gdk_surface_get_display (surface);
|
||||
_gdk_wayland_display_deliver_event (display, event);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
is_realized_shell_surface (GdkSurface *surface)
|
||||
{
|
||||
@@ -946,6 +928,21 @@ is_realized_popup (GdkSurface *surface)
|
||||
impl->display_server.zxdg_popup_v6);
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_wayland_surface_resize (GdkSurface *surface,
|
||||
int width,
|
||||
int height,
|
||||
int scale)
|
||||
{
|
||||
GdkWaylandSurface *impl = GDK_WAYLAND_SURFACE (surface);
|
||||
|
||||
gdk_wayland_surface_update_size (surface, width, height, scale);
|
||||
_gdk_surface_update_size (surface);
|
||||
|
||||
if (impl->mapped)
|
||||
g_signal_emit_by_name (surface, "size-changed", width, height);
|
||||
}
|
||||
|
||||
static void gdk_wayland_surface_show (GdkSurface *surface,
|
||||
gboolean already_mapped);
|
||||
static void gdk_wayland_surface_hide (GdkSurface *surface);
|
||||
@@ -1303,8 +1300,11 @@ configure_surface_geometry (GdkSurface *surface)
|
||||
gdk_toplevel_notify_compute_size (GDK_TOPLEVEL (surface), &size);
|
||||
width = size.width;
|
||||
height = size.height;
|
||||
g_warn_if_fail (width > 0);
|
||||
g_warn_if_fail (height > 0);
|
||||
|
||||
impl->margin_left = surface->shadow_left = size.shadow_left;
|
||||
impl->margin_right = surface->shadow_right = size.shadow_right;
|
||||
impl->margin_top = surface->shadow_top = size.shadow_top;
|
||||
impl->margin_bottom = surface->shadow_bottom = size.shadow_bottom;
|
||||
|
||||
layout = impl->toplevel.layout;
|
||||
if (gdk_toplevel_layout_get_resizable (layout))
|
||||
|
@@ -4969,10 +4969,11 @@ gdk_win32_toplevel_present (GdkToplevel *toplevel,
|
||||
|
||||
gdk_toplevel_size_init (&size, bounds_width, bounds_height);
|
||||
gdk_toplevel_notify_compute_size (toplevel, &size);
|
||||
g_warn_if_fail (size.width > 0);
|
||||
g_warn_if_fail (size.height > 0);
|
||||
width = size.width;
|
||||
height = size.height;
|
||||
gdk_win32_surface_set_shadow_width (surface,
|
||||
size.shadow_left, size.shadow_right,
|
||||
size.shadow_top, size.shadow_bottom);
|
||||
|
||||
if (gdk_toplevel_layout_get_resizable (layout))
|
||||
{
|
||||
|
@@ -4863,10 +4863,11 @@ gdk_x11_toplevel_present (GdkToplevel *toplevel,
|
||||
|
||||
gdk_toplevel_size_init (&size, bounds_width, bounds_height);
|
||||
gdk_toplevel_notify_compute_size (toplevel, &size);
|
||||
g_warn_if_fail (size.width > 0);
|
||||
g_warn_if_fail (size.height > 0);
|
||||
width = size.width;
|
||||
height = size.height;
|
||||
gdk_x11_surface_set_shadow_width (surface,
|
||||
size.shadow_left, size.shadow_right,
|
||||
size.shadow_top, size.shadow_bottom);
|
||||
|
||||
if (gdk_toplevel_layout_get_resizable (layout))
|
||||
{
|
||||
|
@@ -294,6 +294,9 @@ _gtk_bookmarks_manager_new (GtkBookmarksChangedFunc changed_func, gpointer chang
|
||||
manager->bookmarks_monitor_changed_id = g_signal_connect (manager->bookmarks_monitor, "changed",
|
||||
G_CALLBACK (bookmarks_file_changed), manager);
|
||||
|
||||
|
||||
g_file_load_contents_async (bookmarks_file, NULL, read_bookmarks_finish, manager);
|
||||
|
||||
g_object_unref (bookmarks_file);
|
||||
|
||||
return manager;
|
||||
|
@@ -1167,7 +1167,6 @@ gtk_grid_view_init (GtkGridView *self)
|
||||
|
||||
self->min_columns = 1;
|
||||
self->max_columns = DEFAULT_MAX_COLUMNS;
|
||||
self->n_columns = 1;
|
||||
|
||||
gtk_list_base_set_anchor_max_widgets (GTK_LIST_BASE (self),
|
||||
self->max_columns * GTK_GRID_VIEW_MAX_VISIBLE_ROWS,
|
||||
|
1020
gtk/gtkwindow.c
1020
gtk/gtkwindow.c
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user