Commit ab4d6325 authored by Adrien Plazas's avatar Adrien Plazas Committed by Alexander Mikhaylenko
Browse files

header-bar: Refine mobile window detection

This widens the mobile screen width to 480px and don't check the height
for vertical mobile detection to be a bit more inclusive, and at the
same time this considers only maximized windows as mobile to avoid
replacing the close button by a back button to close a floating window
on the desktop.

Fixes https://gitlab.gnome.org/GNOME/libhandy/-/issues/315
parent 0a439c58
Pipeline #58020 failed
......@@ -69,7 +69,7 @@
#define DEFAULT_SPACING 6
#define MIN_TITLE_CHARS 5
#define MOBILE_WINDOW_WIDTH 400
#define MOBILE_WINDOW_WIDTH 480
#define MOBILE_WINDOW_HEIGHT 800
typedef struct {
......@@ -614,7 +614,7 @@ compute_is_mobile_window (GtkWindow *window)
gtk_window_get_size (window, &window_width, &window_height);
if (window_width <= MOBILE_WINDOW_WIDTH &&
window_height <= MOBILE_WINDOW_HEIGHT)
gtk_window_is_maximized (window))
return TRUE;
/* Mobile landscape mode. */
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment