Set VirtualTerminal into KD_GRAPHICS mode

This commit is contained in:
Martin Gräßlin 2015-04-15 17:52:14 +02:00
parent efa0500313
commit 9efada5bb6

View file

@ -27,6 +27,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <QSocketNotifier> #include <QSocketNotifier>
// linux // linux
#include <linux/major.h> #include <linux/major.h>
#include <linux/kd.h>
#include <linux/vt.h> #include <linux/vt.h>
// system // system
#include <fcntl.h> #include <fcntl.h>
@ -109,6 +110,11 @@ void VirtualTerminal::setup(int vtNr)
closeFd(); closeFd();
return; return;
} }
if (ioctl(m_vt, KDSETMODE, KD_GRAPHICS) < 0) {
qCWarning(KWIN_CORE()) << "Failed to set tty " << vtNr << " in graphics mode";
closeFd();
return;
}
if (!createSignalHandler()) { if (!createSignalHandler()) {
qCWarning(KWIN_CORE) << "Failed to create signalfd"; qCWarning(KWIN_CORE) << "Failed to create signalfd";
closeFd(); closeFd();