Changeset View
Changeset View
Standalone View
Standalone View
app/mainwindow.cpp
Show First 20 Lines • Show All 81 Lines • ▼ Show 20 Line(s) | 76 | { | |||
---|---|---|---|---|---|
82 | 82 | | |||
83 | m_skin = new Skin(); | 83 | m_skin = new Skin(); | ||
84 | m_menu = new QMenu(this); | 84 | m_menu = new QMenu(this); | ||
85 | m_helpMenu = new KHelpMenu(this, KAboutData::applicationData()); | 85 | m_helpMenu = new KHelpMenu(this, KAboutData::applicationData()); | ||
86 | m_sessionStack = new SessionStack(this); | 86 | m_sessionStack = new SessionStack(this); | ||
87 | m_tabBar = new TabBar(this); | 87 | m_tabBar = new TabBar(this); | ||
88 | m_titleBar = new TitleBar(this); | 88 | m_titleBar = new TitleBar(this); | ||
89 | m_firstRunDialog = NULL; | 89 | m_firstRunDialog = NULL; | ||
90 | m_isFullscreen = false; | ||||
90 | 91 | | |||
91 | #if HAVE_X11 | 92 | #if HAVE_X11 | ||
92 | m_kwinAssistPropSet = false; | 93 | m_kwinAssistPropSet = false; | ||
93 | m_isX11 = KWindowSystem::isPlatformX11(); | 94 | m_isX11 = KWindowSystem::isPlatformX11(); | ||
94 | #else | 95 | #else | ||
95 | m_isX11 = false; | 96 | m_isX11 = false; | ||
96 | #endif | 97 | #endif | ||
97 | m_isWayland = KWindowSystem::isPlatformWayland(); | 98 | m_isWayland = KWindowSystem::isPlatformWayland(); | ||
▲ Show 20 Lines • Show All 1215 Lines • ▼ Show 20 Line(s) | |||||
1313 | 1314 | | |||
1314 | void MainWindow::sharedPreOpenWindow() | 1315 | void MainWindow::sharedPreOpenWindow() | ||
1315 | { | 1316 | { | ||
1316 | applyWindowGeometry(); | 1317 | applyWindowGeometry(); | ||
1317 | 1318 | | |||
1318 | updateUseTranslucency(); | 1319 | updateUseTranslucency(); | ||
1319 | 1320 | | |||
1320 | if (Settings::pollMouse()) toggleMousePoll(false); | 1321 | if (Settings::pollMouse()) toggleMousePoll(false); | ||
1322 | if (Settings::rememberFullscreen()) setFullScreen(m_isFullscreen); | ||||
1321 | } | 1323 | } | ||
1322 | 1324 | | |||
1323 | void MainWindow::sharedAfterOpenWindow() | 1325 | void MainWindow::sharedAfterOpenWindow() | ||
1324 | { | 1326 | { | ||
1325 | if (!Settings::firstRun()) KWindowSystem::forceActiveWindow(winId()); | 1327 | if (!Settings::firstRun()) KWindowSystem::forceActiveWindow(winId()); | ||
1326 | 1328 | | |||
1327 | connect(KWindowSystem::self(), &KWindowSystem::activeWindowChanged, | 1329 | connect(KWindowSystem::self(), &KWindowSystem::activeWindowChanged, | ||
1328 | this, &MainWindow::wmActiveWindowChanged); | 1330 | this, &MainWindow::wmActiveWindowChanged); | ||
▲ Show 20 Lines • Show All 61 Lines • ▼ Show 20 Line(s) | 1385 | { | |||
1390 | } | 1392 | } | ||
1391 | 1393 | | |||
1392 | actionCollection()->action(QStringLiteral("keep-open"))->setChecked(keepOpen); | 1394 | actionCollection()->action(QStringLiteral("keep-open"))->setChecked(keepOpen); | ||
1393 | m_titleBar->setFocusButtonState(keepOpen); | 1395 | m_titleBar->setFocusButtonState(keepOpen); | ||
1394 | } | 1396 | } | ||
1395 | 1397 | | |||
1396 | void MainWindow::setFullScreen(bool state) | 1398 | void MainWindow::setFullScreen(bool state) | ||
1397 | { | 1399 | { | ||
1400 | if (isVisible()) m_isFullscreen = state; | ||||
1398 | if (state) | 1401 | if (state) | ||
1399 | { | 1402 | { | ||
1400 | setWindowState(windowState() | Qt::WindowFullScreen); | 1403 | setWindowState(windowState() | Qt::WindowFullScreen); | ||
1401 | setWindowGeometry(100, 100, Settings::position()); | 1404 | setWindowGeometry(100, 100, Settings::position()); | ||
1402 | } | 1405 | } | ||
1403 | else | 1406 | else | ||
1404 | { | 1407 | { | ||
1405 | setWindowState(windowState() & ~Qt::WindowFullScreen); | 1408 | setWindowState(windowState() & ~Qt::WindowFullScreen); | ||
▲ Show 20 Lines • Show All 136 Lines • Show Last 20 Lines |