diff options
Diffstat (limited to 'video/out/wayland_common.c')
-rw-r--r-- | video/out/wayland_common.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c index 8ef230c754..73ef5ed570 100644 --- a/video/out/wayland_common.c +++ b/video/out/wayland_common.c @@ -4,18 +4,18 @@ * Copyright © 2012-2013 Collabora, Ltd. * Copyright © 2013 Alexander Preisinger <alexander.preisinger@gmail.com> * - * mpv is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * mpv is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. * * mpv is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * GNU Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License along - * with mpv. If not, see <http://www.gnu.org/licenses/>. + * You should have received a copy of the GNU Lesser General Public + * License along with mpv. If not, see <http://www.gnu.org/licenses/>. */ #include <stdio.h> @@ -141,6 +141,11 @@ static void ssurface_handle_configure(void *data, { struct vo_wayland_state *wl = data; schedule_resize(wl, edges, width, height); + + // check for every resize if the window is in fullscreen mode and reset the + // mode accordingly, this prevents gnome from resizing mpvs fullscreen + // window to a smaller size + vo_wayland_fullscreen(wl->vo); } static void ssurface_handle_popup_done(void *data, @@ -1051,7 +1056,6 @@ static void vo_wayland_ontop (struct vo *vo) MP_DBG(wl, "going ontop\n"); vo->opts->ontop = 1; window_set_toplevel(wl); - schedule_resize(wl, 0, wl->window.width, wl->window.height); } static void vo_wayland_fullscreen (struct vo *vo) @@ -1076,7 +1080,6 @@ static void vo_wayland_fullscreen (struct vo *vo) MP_DBG(wl, "leaving fullscreen\n"); wl->window.is_fullscreen = false; window_set_toplevel(wl); - schedule_resize(wl, 0, wl->window.p_width, wl->window.p_height); } } @@ -1224,9 +1227,6 @@ static void vo_wayland_update_screeninfo(struct vo *vo, struct mp_rect *screenrc screenrc->y1 = wl->display.current_output->height; } } - - wl->window.fs_width = screenrc->x1; - wl->window.fs_height = screenrc->y1; } int vo_wayland_control (struct vo *vo, int *events, int request, void *arg) @@ -1301,6 +1301,7 @@ bool vo_wayland_config (struct vo *vo) wl->window.width = vo->dwidth; wl->window.height = vo->dheight; + vo_wayland_fullscreen(vo); return true; |