Changeset View
Changeset View
Standalone View
Standalone View
workspace.cpp
Show First 20 Lines • Show All 655 Lines • ▼ Show 20 Line(s) | |||||
656 | void Workspace::addUnmanaged(Unmanaged* c) | 656 | void Workspace::addUnmanaged(Unmanaged* c) | ||
657 | { | 657 | { | ||
658 | unmanaged.append(c); | 658 | unmanaged.append(c); | ||
659 | markXStackingOrderAsDirty(); | 659 | markXStackingOrderAsDirty(); | ||
660 | } | 660 | } | ||
661 | 661 | | |||
662 | /** | 662 | /** | ||
663 | * Destroys the client \a c | 663 | * Destroys the client \a c | ||
664 | */ | 664 | **/ | ||
665 | void Workspace::removeClient(Client* c) | 665 | void Workspace::removeClient(Client* c) | ||
666 | { | 666 | { | ||
667 | if (c == active_popup_client) | 667 | if (c == active_popup_client) | ||
668 | closeActivePopup(); | 668 | closeActivePopup(); | ||
669 | if (m_userActionsMenu->isMenuClient(c)) { | 669 | if (m_userActionsMenu->isMenuClient(c)) { | ||
670 | m_userActionsMenu->close(); | 670 | m_userActionsMenu->close(); | ||
671 | } | 671 | } | ||
672 | 672 | | |||
▲ Show 20 Lines • Show All 189 Lines • ▼ Show 20 Line(s) | |||||
862 | 862 | | |||
863 | void Workspace::reconfigure() | 863 | void Workspace::reconfigure() | ||
864 | { | 864 | { | ||
865 | reconfigureTimer.start(200); | 865 | reconfigureTimer.start(200); | ||
866 | } | 866 | } | ||
867 | 867 | | |||
868 | /** | 868 | /** | ||
869 | * Reread settings | 869 | * Reread settings | ||
870 | */ | 870 | **/ | ||
871 | 871 | | |||
872 | void Workspace::slotReconfigure() | 872 | void Workspace::slotReconfigure() | ||
873 | { | 873 | { | ||
874 | qCDebug(KWIN_CORE) << "Workspace::slotReconfigure()"; | 874 | qCDebug(KWIN_CORE) << "Workspace::slotReconfigure()"; | ||
875 | reconfigureTimer.stop(); | 875 | reconfigureTimer.stop(); | ||
876 | 876 | | |||
877 | bool borderlessMaximizedWindows = options->borderlessMaximizedWindows(); | 877 | bool borderlessMaximizedWindows = options->borderlessMaximizedWindows(); | ||
878 | 878 | | |||
▲ Show 20 Lines • Show All 130 Lines • ▼ Show 20 Line(s) | 982 | { | |||
1009 | return FocusChain::self()->getForActivation(desktop); | 1009 | return FocusChain::self()->getForActivation(desktop); | ||
1010 | } | 1010 | } | ||
1011 | 1011 | | |||
1012 | /** | 1012 | /** | ||
1013 | * Updates the current activity when it changes | 1013 | * Updates the current activity when it changes | ||
1014 | * do *not* call this directly; it does not set the activity. | 1014 | * do *not* call this directly; it does not set the activity. | ||
1015 | * | 1015 | * | ||
1016 | * Shows/Hides windows according to the stacking order | 1016 | * Shows/Hides windows according to the stacking order | ||
1017 | */ | 1017 | **/ | ||
1018 | 1018 | | |||
1019 | void Workspace::updateCurrentActivity(const QString &new_activity) | 1019 | void Workspace::updateCurrentActivity(const QString &new_activity) | ||
1020 | { | 1020 | { | ||
1021 | #ifdef KWIN_BUILD_ACTIVITIES | 1021 | #ifdef KWIN_BUILD_ACTIVITIES | ||
1022 | if (!Activities::self()) { | 1022 | if (!Activities::self()) { | ||
1023 | return; | 1023 | return; | ||
1024 | } | 1024 | } | ||
1025 | //closeActivePopup(); | 1025 | //closeActivePopup(); | ||
▲ Show 20 Lines • Show All 117 Lines • ▼ Show 20 Line(s) | 1135 | Xcb::selectInput(rootWindow(), | |||
1143 | XCB_EVENT_MASK_EXPOSURE | 1143 | XCB_EVENT_MASK_EXPOSURE | ||
1144 | ); | 1144 | ); | ||
1145 | } | 1145 | } | ||
1146 | 1146 | | |||
1147 | /** | 1147 | /** | ||
1148 | * Sends client \a c to desktop \a desk. | 1148 | * Sends client \a c to desktop \a desk. | ||
1149 | * | 1149 | * | ||
1150 | * Takes care of transients as well. | 1150 | * Takes care of transients as well. | ||
1151 | */ | 1151 | **/ | ||
1152 | void Workspace::sendClientToDesktop(AbstractClient* c, int desk, bool dont_activate) | 1152 | void Workspace::sendClientToDesktop(AbstractClient* c, int desk, bool dont_activate) | ||
1153 | { | 1153 | { | ||
1154 | if ((desk < 1 && desk != NET::OnAllDesktops) || desk > static_cast<int>(VirtualDesktopManager::self()->count())) | 1154 | if ((desk < 1 && desk != NET::OnAllDesktops) || desk > static_cast<int>(VirtualDesktopManager::self()->count())) | ||
1155 | return; | 1155 | return; | ||
1156 | int old_desktop = c->desktop(); | 1156 | int old_desktop = c->desktop(); | ||
1157 | bool was_on_desktop = c->isOnDesktop(desk) || c->isOnAllDesktops(); | 1157 | bool was_on_desktop = c->isOnDesktop(desk) || c->isOnAllDesktops(); | ||
1158 | c->setDesktop(desk); | 1158 | c->setDesktop(desk); | ||
1159 | if (c->desktop() != desk) // No change or desktop forced | 1159 | if (c->desktop() != desk) // No change or desktop forced | ||
Show All 22 Lines | |||||
1182 | 1182 | | |||
1183 | /** | 1183 | /** | ||
1184 | * checks whether the X Window with the input focus is on our X11 screen | 1184 | * checks whether the X Window with the input focus is on our X11 screen | ||
1185 | * if the window cannot be determined or inspected, resturn depends on whether there's actually | 1185 | * if the window cannot be determined or inspected, resturn depends on whether there's actually | ||
1186 | * more than one screen | 1186 | * more than one screen | ||
1187 | * | 1187 | * | ||
1188 | * this is NOT in any way related to XRandR multiscreen | 1188 | * this is NOT in any way related to XRandR multiscreen | ||
1189 | * | 1189 | * | ||
1190 | */ | 1190 | **/ | ||
1191 | extern bool is_multihead; // main.cpp | 1191 | extern bool is_multihead; // main.cpp | ||
1192 | bool Workspace::isOnCurrentHead() | 1192 | bool Workspace::isOnCurrentHead() | ||
1193 | { | 1193 | { | ||
1194 | if (!is_multihead) { | 1194 | if (!is_multihead) { | ||
1195 | return true; | 1195 | return true; | ||
1196 | } | 1196 | } | ||
1197 | 1197 | | |||
1198 | Xcb::CurrentInput currentInput; | 1198 | Xcb::CurrentInput currentInput; | ||
Show All 18 Lines | |||||
1217 | { | 1217 | { | ||
1218 | if (rootInfo()) { | 1218 | if (rootInfo()) { | ||
1219 | rootInfo()->sendPing(window, timestamp); | 1219 | rootInfo()->sendPing(window, timestamp); | ||
1220 | } | 1220 | } | ||
1221 | } | 1221 | } | ||
1222 | 1222 | | |||
1223 | /** | 1223 | /** | ||
1224 | * Delayed focus functions | 1224 | * Delayed focus functions | ||
1225 | */ | 1225 | **/ | ||
1226 | void Workspace::delayFocus() | 1226 | void Workspace::delayFocus() | ||
1227 | { | 1227 | { | ||
1228 | requestFocus(delayfocus_client); | 1228 | requestFocus(delayfocus_client); | ||
1229 | cancelDelayFocus(); | 1229 | cancelDelayFocus(); | ||
1230 | } | 1230 | } | ||
1231 | 1231 | | |||
1232 | void Workspace::requestDelayFocus(AbstractClient* c) | 1232 | void Workspace::requestDelayFocus(AbstractClient* c) | ||
1233 | { | 1233 | { | ||
Show All 14 Lines | |||||
1248 | bool Workspace::checkStartupNotification(xcb_window_t w, KStartupInfoId &id, KStartupInfoData &data) | 1248 | bool Workspace::checkStartupNotification(xcb_window_t w, KStartupInfoId &id, KStartupInfoData &data) | ||
1249 | { | 1249 | { | ||
1250 | return startup->checkStartup(w, id, data) == KStartupInfo::Match; | 1250 | return startup->checkStartup(w, id, data) == KStartupInfo::Match; | ||
1251 | } | 1251 | } | ||
1252 | 1252 | | |||
1253 | /** | 1253 | /** | ||
1254 | * Puts the focus on a dummy window | 1254 | * Puts the focus on a dummy window | ||
1255 | * Just using XSetInputFocus() with None would block keyboard input | 1255 | * Just using XSetInputFocus() with None would block keyboard input | ||
1256 | */ | 1256 | **/ | ||
1257 | void Workspace::focusToNull() | 1257 | void Workspace::focusToNull() | ||
1258 | { | 1258 | { | ||
1259 | if (m_nullFocus) { | 1259 | if (m_nullFocus) { | ||
1260 | m_nullFocus->focus(); | 1260 | m_nullFocus->focus(); | ||
1261 | } | 1261 | } | ||
1262 | } | 1262 | } | ||
1263 | 1263 | | |||
1264 | void Workspace::setShowingDesktop(bool showing) | 1264 | void Workspace::setShowingDesktop(bool showing) | ||
▲ Show 20 Lines • Show All 509 Lines • Show Last 20 Lines |