Skip to content

Commit

Permalink
Merge #1252
Browse files Browse the repository at this point in the history
1252: X11 not experimental r=wmww a=AlanGriffiths

X11 is no longer "experimental".

A follow-up will provide a way to write to supply an FD to receive the display. (Like Xwayland's -displayfd.)

Maybe we should provide a way to select the socket from the command-line, but that's less urgent.

Co-authored-by: Alan Griffiths <[email protected]>
  • Loading branch information
bors[bot] and AlanGriffiths committed Feb 17, 2020
1 parent 6699a7f commit 67b47ad
Show file tree
Hide file tree
Showing 21 changed files with 68 additions and 372 deletions.
3 changes: 0 additions & 3 deletions debian/mir-demos.install
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
usr/bin/miral-shell
usr/bin/miral-run
usr/bin/miral-kiosk
usr/bin/miral-xrun
usr/bin/miral-desktop
usr/bin/miral-app
usr/bin/miral-system-compositor
usr/share/applications/miral-shell.desktop
Expand Down
1 change: 1 addition & 0 deletions examples/example-server-lib/decoration_provider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ void Printer::printhelp(BackgroundInfo const& region)
"Keyboard shortcuts:",
"",
" o Terminal: Ctrl-Alt-T/Ctrl-Alt-Shift-T",
" o X Terminal: Ctrl-Alt-X (if X11 is enabled)",
"",
" o Switch apps: Alt-Tab, tap or click on the corresponding window",
" o Next (previous) app window: Alt-` (Alt-Shift-`)",
Expand Down
4 changes: 1 addition & 3 deletions examples/mir_demo_server/server_example.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright © 2012-2019 Canonical Ltd.
* Copyright © 2012-2020 Canonical Ltd.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 or 3 as
Expand Down Expand Up @@ -31,7 +31,6 @@
#include <miral/runner.h>
#include <miral/set_window_management_policy.h>
#include <miral/wayland_extensions.h>
#include <miral/x11_support.h>

#include "mir/abnormal_exit.h"
#include "mir/server.h"
Expand Down Expand Up @@ -136,7 +135,6 @@ try
miral::display_configuration_options,
me::add_log_host_lifecycle_option_to,
me::add_glog_options_to,
miral::X11Support{},
miral::WaylandExtensions{}
.enable(miral::WaylandExtensions::zwlr_layer_shell_v1)
.enable(miral::WaylandExtensions::zxdg_output_manager_v1),
Expand Down
32 changes: 0 additions & 32 deletions examples/miral-shell/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,38 +1,6 @@
add_subdirectory(desktop)
add_subdirectory(spinner)

add_custom_target(miral-run ALL
cp ${CMAKE_CURRENT_SOURCE_DIR}/miral-run.sh ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/miral-run
)

install(PROGRAMS ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/miral-run
DESTINATION ${CMAKE_INSTALL_PREFIX}/bin
)

add_custom_target(miral-xrun ALL
cp ${CMAKE_CURRENT_SOURCE_DIR}/miral-xrun.sh ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/miral-xrun
)

install(PROGRAMS ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/miral-xrun
DESTINATION ${CMAKE_INSTALL_PREFIX}/bin
)

add_custom_target(miral-screencast ALL
cp ${CMAKE_CURRENT_SOURCE_DIR}/miral-screencast.sh ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/miral-screencast
)

install(PROGRAMS ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/miral-screencast
DESTINATION ${CMAKE_INSTALL_PREFIX}/bin
)

add_custom_target(miral-desktop ALL
cp ${CMAKE_CURRENT_SOURCE_DIR}/miral-desktop.sh ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/miral-desktop
)

install(PROGRAMS ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/miral-desktop
DESTINATION ${CMAKE_INSTALL_PREFIX}/bin
)

add_custom_target(miral-app ALL
cp ${CMAKE_CURRENT_SOURCE_DIR}/miral-app.sh ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/miral-app
)
Expand Down
6 changes: 4 additions & 2 deletions examples/miral-shell/miral-app.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ while [ -e "${XDG_RUNTIME_DIR}/wayland-${port}" ]; do
done
wayland_display=wayland-${port}

port=0

while [ $# -gt 0 ]
do
if [ "$1" == "--help" -o "$1" == "-h" ]
Expand Down Expand Up @@ -76,10 +78,10 @@ unset QT_QPA_PLATFORMTHEME
if [ "${miral_server}" == "miral-shell" ]
then
# miral-shell can launch it's own terminal with Ctrl-Alt-T
MIR_SERVER_FILE=${socket} WAYLAND_DISPLAY=${wayland_display} MIR_SERVER_SHELL_TERMINAL_EMULATOR=${terminal} NO_AT_BRIDGE=1 ${hostsocket} exec dbus-run-session -- ${bindir}${miral_server} ${enable_mirclient} $*
MIR_SERVER_FILE=${socket} WAYLAND_DISPLAY=${wayland_display} MIR_SERVER_ENABLE_X11=1 MIR_SERVER_SHELL_TERMINAL_EMULATOR=${terminal} NO_AT_BRIDGE=1 ${hostsocket} exec dbus-run-session -- ${bindir}${miral_server} ${enable_mirclient} $*
else
# miral-kiosk (and mir_demo_server) need a terminal launched
sh -c "MIR_SERVER_FILE=${socket} WAYLAND_DISPLAY=${wayland_display} ${hostsocket} ${bindir}${miral_server} ${enable_mirclient} $*"&
MIR_SERVER_FILE=${socket} WAYLAND_DISPLAY=${wayland_display} ${hostsocket} ${bindir}${miral_server} ${enable_mirclient} $*&

# Fixup for weird gnome-terminal script on Ubuntu
if [ "${terminal}" == "gnome-terminal" ] && [ -e "/usr/bin/gnome-terminal.real" ]
Expand Down
64 changes: 0 additions & 64 deletions examples/miral-shell/miral-desktop.sh

This file was deleted.

61 changes: 0 additions & 61 deletions examples/miral-shell/miral-run.sh

This file was deleted.

42 changes: 0 additions & 42 deletions examples/miral-shell/miral-screencast.sh

This file was deleted.

82 changes: 0 additions & 82 deletions examples/miral-shell/miral-xrun.sh

This file was deleted.

3 changes: 3 additions & 0 deletions include/server/mir/server.h
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,9 @@ class Server
/// Get the name of the Wayland endpoint (if any) usable as a $WAYLAND_DISPLAY value
auto wayland_display() const -> optional_value<std::string>;

/// Get the name of the X11 display usable as a $DISPLAY value
auto x11_display() const -> optional_value<std::string>;

/// Overrides the standard set of Wayland extensions (mir::frontend::get_standard_extensions()) with a new list
void set_enabled_wayland_extensions(std::vector<std::string> const& extensions);
/** @} */
Expand Down
Loading

0 comments on commit 67b47ad

Please sign in to comment.