diff --git a/widget/gtk/MozContainerSurfaceLock.h b/widget/gtk/MozContainerSurfaceLock.h deleted file mode 100644 --- a/widget/gtk/MozContainerSurfaceLock.h +++ /dev/null @@ -1,28 +0,0 @@ -/* -*- 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/. */ - -#ifndef widget_gtk_MozContainerSurfaceLock_h -#define widget_gtk_MozContainerSurfaceLock_h - -struct wl_surface; -struct _MozContainer; -typedef struct _MozContainer MozContainer; - -class MozContainerSurfaceLock { - public: - explicit MozContainerSurfaceLock(MozContainer* aContainer); - ~MozContainerSurfaceLock(); - - // wl_surface can be nullptr if we lock hidden MozContainer. - struct wl_surface* GetSurface(); - - private: -#ifdef MOZ_WAYLAND - MozContainer* mContainer = nullptr; -#endif - struct wl_surface* mSurface = nullptr; -}; - -#endif // widget_gtk_MozContainerSurfaceLock_h diff --git a/widget/gtk/MozContainerSurfaceLock.cpp b/widget/gtk/MozContainerSurfaceLock.cpp deleted file mode 100644 --- a/widget/gtk/MozContainerSurfaceLock.cpp +++ /dev/null @@ -1,31 +0,0 @@ -/* -*- 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; }