[wayland] ThumbnailItem supports ShellClients

icc-effect-5.14.5
Martin Gräßlin 2015-05-21 10:52:00 +02:00
parent 45c1eddf4a
commit aff93b1216
1 changed files with 11 additions and 1 deletions

View File

@ -25,6 +25,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "effects.h"
#include "workspace.h"
#include "composite.h"
#if HAVE_WAYLAND
#include "shell_client.h"
#include "wayland_server.h"
#endif
// Qt
#include <QDebug>
#include <QPainter>
@ -138,7 +142,13 @@ void WindowThumbnailItem::setWId(qulonglong wId)
}
m_wId = wId;
if (m_wId != 0) {
setClient(Workspace::self()->findClient(Predicate::WindowMatch, m_wId));
AbstractClient *c = Workspace::self()->findClient(Predicate::WindowMatch, m_wId);
#if HAVE_WAYLAND
if (!c && waylandServer()) {
c = waylandServer()->findClient(m_wId);
}
#endif
setClient(c);
} else if (m_client) {
m_client = NULL;
emit clientChanged();