Bug 1833855 [Linux] Update GtkCompositorWidget to work on X11 only builds r=emilio

Differential Revision: https://phabricator.services.mozilla.com/D178643
This commit is contained in:
stransky 2023-06-22 13:42:39 +00:00
parent c185d02a75
commit 6f2d44b5f8
2 changed files with 4 additions and 3 deletions

View File

@ -132,14 +132,14 @@ EGLNativeWindowType GtkCompositorWidget::GetEGLNativeWindow() {
return window;
}
#if defined(MOZ_WAYLAND)
void GtkCompositorWidget::SetEGLNativeWindowSize(
const LayoutDeviceIntSize& aEGLWindowSize) {
#if defined(MOZ_WAYLAND)
if (mWidget) {
mWidget->SetEGLNativeWindowSize(aEGLWindowSize);
}
}
#endif
}
LayoutDeviceIntRegion GtkCompositorWidget::GetTransparentRegion() {
// We need to clear target buffer alpha values of popup windows as

View File

@ -79,11 +79,12 @@ class GtkCompositorWidget : public CompositorWidget,
// Resume rendering with to given aXWindow (X11) or nsWindow (Wayland).
void EnableRendering(const uintptr_t aXWindow, const bool aShaped) override;
void SetEGLNativeWindowSize(const LayoutDeviceIntSize& aEGLWindowSize);
#if defined(MOZ_X11)
Window XWindow() const { return mXWindow; }
#endif
#if defined(MOZ_WAYLAND)
void SetEGLNativeWindowSize(const LayoutDeviceIntSize& aEGLWindowSize);
RefPtr<mozilla::layers::NativeLayerRoot> GetNativeLayerRoot() override;
#endif