summaryrefslogtreecommitdiffstats
path: root/widget/gtk/nsWindow.h
diff options
context:
space:
mode:
Diffstat (limited to 'widget/gtk/nsWindow.h')
-rw-r--r--widget/gtk/nsWindow.h29
1 files changed, 13 insertions, 16 deletions
diff --git a/widget/gtk/nsWindow.h b/widget/gtk/nsWindow.h
index f8fe344f09..25d68129d8 100644
--- a/widget/gtk/nsWindow.h
+++ b/widget/gtk/nsWindow.h
@@ -175,6 +175,7 @@ class nsWindow final : public nsBaseWidget {
void MoveToWorkspace(const nsAString& workspaceID) override;
void Enable(bool aState) override;
void SetFocus(Raise, mozilla::dom::CallerType aCallerType) override;
+ void ResetScreenBounds();
LayoutDeviceIntRect GetScreenBounds() override;
LayoutDeviceIntRect GetClientBounds() override;
LayoutDeviceIntSize GetClientSize() override;
@@ -411,7 +412,6 @@ class nsWindow final : public nsBaseWidget {
*/
static GtkWindowDecoration GetSystemGtkWindowDecoration();
- static bool GetTopLevelWindowActiveState(nsIFrame* aFrame);
static bool TitlebarUseShapeMask();
bool IsRemoteContent() { return HasRemoteContent(); }
void NativeMoveResizeWaylandPopupCallback(const GdkRectangle* aFinalSize,
@@ -461,8 +461,6 @@ class nsWindow final : public nsBaseWidget {
// rendering queue blocking (see Bug 1782948).
void ClearRenderingQueue();
- void DisableRendering();
-
bool ApplyEnterLeaveMutterWorkaround();
void NotifyOcclusionState(mozilla::widget::OcclusionState aState) override;
@@ -553,6 +551,9 @@ class nsWindow final : public nsBaseWidget {
GtkWidget* mShell = nullptr;
MozContainer* mContainer = nullptr;
GdkWindow* mGdkWindow = nullptr;
+ mozilla::Maybe<GdkPoint> mGdkWindowOrigin;
+ mozilla::Maybe<GdkPoint> mGdkWindowRootOrigin;
+
PlatformCompositorWidgetDelegate* mCompositorWidgetDelegate = nullptr;
mozilla::Atomic<WindowCompositorState, mozilla::Relaxed> mCompositorState{
COMPOSITOR_ENABLED};
@@ -633,10 +634,14 @@ class nsWindow final : public nsBaseWidget {
mozilla::Mutex mTitlebarRectMutex;
LayoutDeviceIntRect mTitlebarRect MOZ_GUARDED_BY(mTitlebarRectMutex);
- mozilla::Mutex mDestroyMutex;
+ // This mutex protect window visibility changes.
+ mozilla::Mutex mWindowVisibilityMutex;
+ // This track real window visibility from OS perspective.
+ // It's set by OnMap/OnUnmap which is based on Gtk events.
+ mozilla::Atomic<bool, mozilla::Relaxed> mIsMapped;
// Has this widget been destroyed yet?
- bool mIsDestroyed : 1;
+ mozilla::Atomic<bool, mozilla::Relaxed> mIsDestroyed;
// mIsShown tracks requested visible status from browser perspective, i.e.
// if the window should be visible or now.
bool mIsShown : 1;
@@ -646,9 +651,6 @@ class nsWindow final : public nsBaseWidget {
// that the window is not actually visible but we report to browser that
// it is visible (mIsShown == true).
bool mNeedsShow : 1;
- // This track real window visibility from OS perspective.
- // It's set by OnMap/OnUnmap which is based on Gtk events.
- bool mIsMapped : 1;
// is this widget enabled?
bool mEnabled : 1;
// has the native window for this been created yet?
@@ -802,11 +804,6 @@ class nsWindow final : public nsBaseWidget {
void DispatchMissedButtonReleases(GdkEventCrossing* aGdkEvent);
- // When window widget gets mapped/unmapped we need to configure
- // underlying GdkWindow properly. Otherwise we'll end up with
- // rendering to released window.
- void ConfigureGdkWindow();
- void ReleaseGdkWindow();
void ConfigureCompositor();
bool IsAlwaysUndecoratedWindow() const;
@@ -996,9 +993,9 @@ class nsWindow final : public nsBaseWidget {
void RequestRepaint(LayoutDeviceIntRegion& aRepaintRegion);
#ifdef MOZ_X11
- typedef enum {GTK_WIDGET_COMPOSIDED_DEFAULT = 0,
- GTK_WIDGET_COMPOSIDED_DISABLED = 1,
- GTK_WIDGET_COMPOSIDED_ENABLED = 2} WindowComposeRequest;
+ typedef enum {GTK_WIDGET_COMPOSITED_DEFAULT = 0,
+ GTK_WIDGET_COMPOSITED_DISABLED = 1,
+ GTK_WIDGET_COMPOSITED_ENABLED = 2} WindowComposeRequest;
void SetCompositorHint(WindowComposeRequest aState);
bool ConfigureX11GLVisual();
#endif