Nullptr check for rootInfo when setting active client

Summary:
Preparation for X free KWin. Code is called for both X11 and Wayland
windows. So make it not crash if we would not have an X server.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D6908
This commit is contained in:
Martin Flöser 2017-07-26 07:09:49 +02:00
parent 150a0357b4
commit da036098cf

View file

@ -270,7 +270,9 @@ void Workspace::setActiveClient(AbstractClient* c)
updateStackingOrder(); // e.g. fullscreens have different layer when active/not-active updateStackingOrder(); // e.g. fullscreens have different layer when active/not-active
if (rootInfo()) {
rootInfo()->setActiveWindow(active_client ? active_client->window() : 0); rootInfo()->setActiveWindow(active_client ? active_client->window() : 0);
}
emit clientActivated(active_client); emit clientActivated(active_client);
--set_active_client_recursion; --set_active_client_recursion;