Skip to content

Commit

Permalink
improve wayland support
Browse files Browse the repository at this point in the history
  • Loading branch information
jreidinger committed Apr 6, 2018
1 parent 7a7c53d commit 9f5bdd2
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions scripts/yast2
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ while true ; do
--kcontrol) Y2UI_ARGS="$Y2UI_ARGS --kcontrol_id YaST" ; shift ;;
--qt) export CMDLINE_UI="qt" ; shift ;;
--gtk) export CMDLINE_UI="gtk" ; shift ;;
--ncurses) unset DISPLAY ; shift ;;
--ncurses) unset DISPLAY ; unset WAYLAND_DISPLAY ; shift ;;
--) shift ; break ;;
*) echo "Unrecognized option $1" ; exit 1 ;;

Expand Down Expand Up @@ -304,6 +304,7 @@ case "`basename $0`" in
YaST|yast|yast1|zast)
if [ -z "$CMDLINE_UI" ]; then
unset DISPLAY;
unset WAYLAND_DISPLAY;
fi
;;
esac
Expand Down Expand Up @@ -335,9 +336,13 @@ fi

# Fallback GUI
SELECTED_GUI=ncurses
# if we have a DISPLAY, select a preferred GUI
if [ -n "$DISPLAY" ]; then
# if we have a DISPLAY or WAYLAND_DISPLAY, select a preferred GUI
if [ -n "$DISPLAY" -o -n "$WAYLAND_DISPLAY" ]; then
select_gui_frontend
# for wayland only environment, switch qt to use it
if [ -n "$WAYLAND_DISPLAY" -a -z "$DISPLAY" ]; then
export QT_QPA_PLATFORM=wayland
fi
fi

if [ -n "$TESTING_YAST2" ]; then
Expand Down

0 comments on commit 9f5bdd2

Please sign in to comment.