Changeset View
Changeset View
Standalone View
Standalone View
src/client/shell.cpp
Show First 20 Lines • Show All 256 Lines • ▼ Show 20 Line(s) | |||||
257 | { | 257 | { | ||
258 | auto s = reinterpret_cast<ShellSurface::Private*>(data); | 258 | auto s = reinterpret_cast<ShellSurface::Private*>(data); | ||
259 | Q_ASSERT(s->surface == shellSurface); | 259 | Q_ASSERT(s->surface == shellSurface); | ||
260 | s->ping(serial); | 260 | s->ping(serial); | ||
261 | } | 261 | } | ||
262 | 262 | | |||
263 | void ShellSurface::Private::popupDoneCallback(void *data, wl_shell_surface *shellSurface) | 263 | void ShellSurface::Private::popupDoneCallback(void *data, wl_shell_surface *shellSurface) | ||
264 | { | 264 | { | ||
265 | // not needed, we don't have popups | 265 | auto s = reinterpret_cast<ShellSurface::Private*>(data); | ||
266 | Q_UNUSED(data) | 266 | Q_ASSERT(s->surface == shellSurface); | ||
267 | Q_UNUSED(shellSurface) | 267 | emit s->q->popupDone(); | ||
268 | } | 268 | } | ||
269 | 269 | | |||
270 | void ShellSurface::setup(wl_shell_surface *surface) | 270 | void ShellSurface::setup(wl_shell_surface *surface) | ||
271 | { | 271 | { | ||
272 | d->setup(surface); | 272 | d->setup(surface); | ||
273 | } | 273 | } | ||
274 | 274 | | |||
275 | void ShellSurface::Private::ping(uint32_t serial) | 275 | void ShellSurface::Private::ping(uint32_t serial) | ||
Show All 34 Lines | 309 | { | |||
310 | Q_ASSERT(isValid()); | 310 | Q_ASSERT(isValid()); | ||
311 | uint32_t wlFlags = 0; | 311 | uint32_t wlFlags = 0; | ||
312 | if (flags.testFlag(TransientFlag::NoFocus)) { | 312 | if (flags.testFlag(TransientFlag::NoFocus)) { | ||
313 | wlFlags |= WL_SHELL_SURFACE_TRANSIENT_INACTIVE; | 313 | wlFlags |= WL_SHELL_SURFACE_TRANSIENT_INACTIVE; | ||
314 | } | 314 | } | ||
315 | wl_shell_surface_set_transient(d->surface, *parent, offset.x(), offset.y(), wlFlags); | 315 | wl_shell_surface_set_transient(d->surface, *parent, offset.x(), offset.y(), wlFlags); | ||
316 | } | 316 | } | ||
317 | 317 | | |||
318 | void ShellSurface::setTransientPopup(Surface *parent, Seat *grabbedSeat, quint32 grabSerial, const QPoint &offset, TransientFlags flags) | ||||
319 | { | ||||
320 | Q_ASSERT(isValid()); | ||||
321 | Q_ASSERT(parent); | ||||
322 | Q_ASSERT(grabbedSeat); | ||||
323 | uint32_t wlFlags = 0; | ||||
324 | if (flags.testFlag(TransientFlag::NoFocus)) { | ||||
325 | wlFlags |= WL_SHELL_SURFACE_TRANSIENT_INACTIVE; | ||||
326 | } | ||||
327 | wl_shell_surface_set_popup(d->surface, *grabbedSeat, grabSerial, *parent, offset.x(), offset.y(), wlFlags); | ||||
328 | } | ||||
329 | | ||||
318 | void ShellSurface::requestMove(Seat *seat, quint32 serial) | 330 | void ShellSurface::requestMove(Seat *seat, quint32 serial) | ||
319 | { | 331 | { | ||
320 | Q_ASSERT(isValid()); | 332 | Q_ASSERT(isValid()); | ||
321 | Q_ASSERT(seat); | 333 | Q_ASSERT(seat); | ||
322 | 334 | | |||
323 | wl_shell_surface_move(d->surface, *seat, serial); | 335 | wl_shell_surface_move(d->surface, *seat, serial); | ||
324 | } | 336 | } | ||
325 | 337 | | |||
▲ Show 20 Lines • Show All 53 Lines • Show Last 20 Lines |