Files
tubestation/widget/gtk/MozContainerSurfaceLock.cpp
Goloman Adrian 4896911f69 Backed out 16 changesets (bug 1934497) for causing mass failures. CLOSED TREE
Backed out changeset 795745f450df (bug 1934497)
Backed out changeset 6aff7ffeaff4 (bug 1934497)
Backed out changeset e6917a8311f2 (bug 1934497)
Backed out changeset 2bf4f54a3077 (bug 1934497)
Backed out changeset 87613cc32aa4 (bug 1934497)
Backed out changeset eea0eef40abf (bug 1934497)
Backed out changeset a9a38191e649 (bug 1934497)
Backed out changeset 5343854a37e5 (bug 1934497)
Backed out changeset 6806bbf97c86 (bug 1934497)
Backed out changeset ff8a92afd360 (bug 1934497)
Backed out changeset dcef70581e34 (bug 1934497)
Backed out changeset c0512daa9188 (bug 1934497)
Backed out changeset 693a7c400778 (bug 1934497)
Backed out changeset 75d095afa9cf (bug 1934497)
Backed out changeset 191397418056 (bug 1934497)
Backed out changeset 5ba05279a465 (bug 1934497)
2024-12-16 23:32:23 +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; }