mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2025-12-25 03:40:09 +01:00
terminal: Don't snap resize if we're maximized
We allow fullscreen to fill the requested size, do the same for maximize.
This commit is contained in:
parent
b7ed4cbbc7
commit
b36f7ef99e
1 changed files with 4 additions and 2 deletions
|
|
@ -763,7 +763,8 @@ resize_handler(struct widget *widget,
|
|||
columns = (width - m) / (int32_t) terminal->extents.max_x_advance;
|
||||
rows = (height - m) / (int32_t) terminal->extents.height;
|
||||
|
||||
if (window_is_fullscreen(terminal->window)) {
|
||||
if (!window_is_fullscreen(terminal->window) &&
|
||||
!window_is_maximized(terminal->window)) {
|
||||
width = columns * terminal->extents.max_x_advance + m;
|
||||
height = rows * terminal->extents.height + m;
|
||||
widget_set_size(terminal->widget, width, height);
|
||||
|
|
@ -777,7 +778,8 @@ terminal_resize(struct terminal *terminal, int columns, int rows)
|
|||
{
|
||||
int32_t width, height, m;
|
||||
|
||||
if (window_is_fullscreen(terminal->window))
|
||||
if (window_is_fullscreen(terminal->window) ||
|
||||
window_is_maximized(terminal->window))
|
||||
return;
|
||||
|
||||
m = 2 * terminal->margin;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue