Files
tubestation/widget/gtk/MozContainerSurfaceLock.cpp
Norisz Fay add86802b2 Backed out 16 changesets (bug 1934497) for causing Wayland related mochitest failures and bustage on WaylandSurface.cpp CLOSED TREE
Backed out changeset b2f82cada9b0 (bug 1934497)
Backed out changeset e6b221a0e987 (bug 1934497)
Backed out changeset e535888994ed (bug 1934497)
Backed out changeset 31f0a398817f (bug 1934497)
Backed out changeset 6225ae4714a9 (bug 1934497)
Backed out changeset 2f0971ca8b41 (bug 1934497)
Backed out changeset ed34f4ff5a2b (bug 1934497)
Backed out changeset 739018e9ae4a (bug 1934497)
Backed out changeset 4f50bd47febd (bug 1934497)
Backed out changeset bbe16df11895 (bug 1934497)
Backed out changeset d6e7e274dda3 (bug 1934497)
Backed out changeset a1cf316b3e7a (bug 1934497)
Backed out changeset 2fbec9faf49c (bug 1934497)
Backed out changeset f6ea1323c158 (bug 1934497)
Backed out changeset fe1e2b1b4f8b (bug 1934497)
Backed out changeset 59b2a1f052e4 (bug 1934497)
2024-12-10 11:58:37 +02:00

32 lines
1023 B
C++

/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "MozContainerSurfaceLock.h"
#include "MozContainer.h"
#include "WidgetUtilsGtk.h"
using namespace mozilla::widget;
MozContainerSurfaceLock::MozContainerSurfaceLock(MozContainer* aContainer) {
#ifdef MOZ_WAYLAND
mContainer = aContainer;
if (GdkIsWaylandDisplay()) {
// mSurface can be nullptr if we lock hidden MozContainer and
// that's correct, MozContainer is still locked.
mSurface = moz_container_wayland_surface_lock(aContainer);
}
#endif
}
MozContainerSurfaceLock::~MozContainerSurfaceLock() {
#ifdef MOZ_WAYLAND
if (GdkIsWaylandDisplay()) {
moz_container_wayland_surface_unlock(mContainer, &mSurface);
}
#endif
}
struct wl_surface* MozContainerSurfaceLock::GetSurface() { return mSurface; }