resizing screen support for wayland

This commit is contained in:
David A Brown 2023-10-27 14:19:24 -07:00 committed by Martin Wimpress
parent ae536570a4
commit 2a7fca0c7f

View File

@ -687,7 +687,7 @@ function vm_boot() {
if [ "${guest_os}" == "linux" ]; then if [ "${guest_os}" == "linux" ]; then
local X_RES=1152 local X_RES=1152
local Y_RES=648 local Y_RES=648
if [ "${XDG_SESSION_TYPE}" == "x11" ]; then if [ "${XDG_SESSION_TYPE}" == "x11" ] || [ "${XDG_SESSION_TYPE}" == "wayland" ]; then
if [ -z "${SCREEN}" ]; then if [ -z "${SCREEN}" ]; then
X_RES=$(xrandr --listmonitors | grep -v Monitors | cut -d' ' -f4 | cut -d'/' -f1 | sort | head -n1) X_RES=$(xrandr --listmonitors | grep -v Monitors | cut -d' ' -f4 | cut -d'/' -f1 | sort | head -n1)
Y_RES=$(xrandr --listmonitors | grep -v Monitors | cut -d' ' -f4 | cut -d'/' -f2 | cut -d'x' -f2 | sort | head -n1) Y_RES=$(xrandr --listmonitors | grep -v Monitors | cut -d' ' -f4 | cut -d'/' -f2 | cut -d'x' -f2 | sort | head -n1)