Changeset View
Changeset View
Standalone View
Standalone View
app/mainwindow.cpp
Show First 20 Lines • Show All 79 Lines • ▼ Show 20 Line(s) | 76 | { | |||
---|---|---|---|---|---|
80 | 80 | | |||
81 | m_skin = new Skin(); | 81 | m_skin = new Skin(); | ||
82 | m_menu = new QMenu(this); | 82 | m_menu = new QMenu(this); | ||
83 | m_helpMenu = new KHelpMenu(this, KAboutData::applicationData()); | 83 | m_helpMenu = new KHelpMenu(this, KAboutData::applicationData()); | ||
84 | m_sessionStack = new SessionStack(this); | 84 | m_sessionStack = new SessionStack(this); | ||
85 | m_tabBar = new TabBar(this); | 85 | m_tabBar = new TabBar(this); | ||
86 | m_titleBar = new TitleBar(this); | 86 | m_titleBar = new TitleBar(this); | ||
87 | m_firstRunDialog = NULL; | 87 | m_firstRunDialog = NULL; | ||
88 | m_isFullscreen = false; | ||||
88 | 89 | | |||
89 | #if HAVE_X11 | 90 | #if HAVE_X11 | ||
90 | m_kwinAssistPropSet = false; | 91 | m_kwinAssistPropSet = false; | ||
91 | m_isX11 = QX11Info::isPlatformX11(); | 92 | m_isX11 = QX11Info::isPlatformX11(); | ||
92 | #else | 93 | #else | ||
93 | m_isX11 = false; | 94 | m_isX11 = false; | ||
94 | #endif | 95 | #endif | ||
95 | m_isWayland = QGuiApplication::platformName().startsWith(QLatin1String("wayland")); | 96 | m_isWayland = QGuiApplication::platformName().startsWith(QLatin1String("wayland")); | ||
▲ Show 20 Lines • Show All 1210 Lines • ▼ Show 20 Line(s) | |||||
1306 | 1307 | | |||
1307 | void MainWindow::sharedPreOpenWindow() | 1308 | void MainWindow::sharedPreOpenWindow() | ||
1308 | { | 1309 | { | ||
1309 | applyWindowGeometry(); | 1310 | applyWindowGeometry(); | ||
1310 | 1311 | | |||
1311 | updateUseTranslucency(); | 1312 | updateUseTranslucency(); | ||
1312 | 1313 | | |||
1313 | if (Settings::pollMouse()) toggleMousePoll(false); | 1314 | if (Settings::pollMouse()) toggleMousePoll(false); | ||
1315 | if (Settings::rememberFullscreen()) setFullScreen(m_isFullscreen); | ||||
1314 | } | 1316 | } | ||
1315 | 1317 | | |||
1316 | void MainWindow::sharedAfterOpenWindow() | 1318 | void MainWindow::sharedAfterOpenWindow() | ||
1317 | { | 1319 | { | ||
1318 | if (!Settings::firstRun()) KWindowSystem::forceActiveWindow(winId()); | 1320 | if (!Settings::firstRun()) KWindowSystem::forceActiveWindow(winId()); | ||
1319 | 1321 | | |||
1320 | connect(KWindowSystem::self(), &KWindowSystem::activeWindowChanged, | 1322 | connect(KWindowSystem::self(), &KWindowSystem::activeWindowChanged, | ||
1321 | this, &MainWindow::wmActiveWindowChanged); | 1323 | this, &MainWindow::wmActiveWindowChanged); | ||
▲ Show 20 Lines • Show All 61 Lines • ▼ Show 20 Line(s) | 1378 | { | |||
1383 | } | 1385 | } | ||
1384 | 1386 | | |||
1385 | actionCollection()->action(QStringLiteral("keep-open"))->setChecked(keepOpen); | 1387 | actionCollection()->action(QStringLiteral("keep-open"))->setChecked(keepOpen); | ||
1386 | m_titleBar->setFocusButtonState(keepOpen); | 1388 | m_titleBar->setFocusButtonState(keepOpen); | ||
1387 | } | 1389 | } | ||
1388 | 1390 | | |||
1389 | void MainWindow::setFullScreen(bool state) | 1391 | void MainWindow::setFullScreen(bool state) | ||
1390 | { | 1392 | { | ||
1393 | if (isVisible()) m_isFullscreen = state; | ||||
1391 | if (state) | 1394 | if (state) | ||
1392 | { | 1395 | { | ||
1393 | setWindowState(windowState() | Qt::WindowFullScreen); | 1396 | setWindowState(windowState() | Qt::WindowFullScreen); | ||
1394 | setWindowGeometry(100, 100, Settings::position()); | 1397 | setWindowGeometry(100, 100, Settings::position()); | ||
1395 | } | 1398 | } | ||
1396 | else | 1399 | else | ||
1397 | { | 1400 | { | ||
1398 | setWindowState(windowState() & ~Qt::WindowFullScreen); | 1401 | setWindowState(windowState() & ~Qt::WindowFullScreen); | ||
▲ Show 20 Lines • Show All 136 Lines • Show Last 20 Lines |