[CSD] Update toplevel GdkWindow property when it's recreated at nsWindow::SetDrawsInTitlebar()

RESOLVED FIXED in Firefox 61

Status

()

defect
P2
normal
RESOLVED FIXED
a year ago
11 months ago

People

(Reporter: stransky, Assigned: stransky)

Tracking

(Blocks 1 bug)

Trunk
mozilla62
Unspecified
Linux
Points:
---

Firefox Tracking Flags

(firefox61 fixed, firefox62 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

a year ago
Toplevel GdkWindow is re-created at nsWindow::SetDrawsInTitlebar() we also need to set correct window attributes as we do at nsWindow::Create().

It means to set _NET_WM_BYPASS_COMPOSITOR and gdk_window_set_role()/XSetClassHint.
(Assignee)

Updated

a year ago
Priority: -- → P2
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)

Comment 3

11 months ago
mozreview-review
Comment on attachment 8970850 [details]
Bug 1456451 - [CSD] Update toplevel GdkWindow property when it's recreated at nsWindow::SetDrawsInTitlebar(),

https://reviewboard.mozilla.org/r/239632/#review249166

::: commit-message-6eeb9:9
(Diff revision 2)
> +at nsWindow::SetDrawsInTitlebar().
> +
> +Window role/class is handled by nsWindow::RefreshWindowClass(), it uses stored window class
> +passed to nsWindow::SetWindowClass().
> +
> +Also set "nsWindow" data property to new mGdkWindow as we do at nsWindow::Create().

Are you sure? I don't see any touching mGdkWindow in the code.

::: widget/gtk/nsWindow.h:492
(Diff revision 2)
> +                   GTK_WIDGET_COMPOSIDED_ENABLED = 2
> +    } WindowComposeRequest;
> +
> +    void                SetCompositorHint(WindowComposeRequest aState);
> +#endif
> +    char               *mGtkWindowTypeName;

I guess you're leaking mGtkWindowTypeName when window is closed/destroyed.
(Assignee)

Comment 4

11 months ago
mozreview-review
Comment on attachment 8970850 [details]
Bug 1456451 - [CSD] Update toplevel GdkWindow property when it's recreated at nsWindow::SetDrawsInTitlebar(),

https://reviewboard.mozilla.org/r/239632/#review249174

::: commit-message-6eeb9:9
(Diff revision 2)
> +at nsWindow::SetDrawsInTitlebar().
> +
> +Window role/class is handled by nsWindow::RefreshWindowClass(), it uses stored window class
> +passed to nsWindow::SetWindowClass().
> +
> +Also set "nsWindow" data property to new mGdkWindow as we do at nsWindow::Create().

You're right, that's already checked in.
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)

Comment 7

11 months ago
mozreview-review
Comment on attachment 8970850 [details]
Bug 1456451 - [CSD] Update toplevel GdkWindow property when it's recreated at nsWindow::SetDrawsInTitlebar(),

https://reviewboard.mozilla.org/r/239632/#review249510
Attachment #8970850 - Flags: review?(jhorak) → review+

Comment 8

11 months ago
Pushed by stransky@redhat.com:
https://hg.mozilla.org/integration/autoland/rev/b44a1b57b301
[CSD] Update toplevel GdkWindow property when it's recreated at nsWindow::SetDrawsInTitlebar(), r=jhorak

Comment 9

11 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/b44a1b57b301
Status: NEW → RESOLVED
Last Resolved: 11 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
Is this something that needs uplift consideration for 61, or can it ride the trains?
Flags: needinfo?(stransky)
(Assignee)

Comment 11

11 months ago
(In reply to Ryan VanderMeulen [:RyanVM] from comment #10)
> Is this something that needs uplift consideration for 61, or can it ride the
> trains?

Yes, it may be uplifted after some testing time at nightly.
Flags: needinfo?(stransky)
Please nominate this for Beta (and ESR60?) approval if this has baked long enough.
Flags: needinfo?(stransky)
(Assignee)

Comment 13

11 months ago
Comment on attachment 8970850 [details]
Bug 1456451 - [CSD] Update toplevel GdkWindow property when it's recreated at nsWindow::SetDrawsInTitlebar(),

Approval Request Comment
[Feature/Bug causing the regression]: Bug 1283299
[User impact if declined]: Various Gtk+/system integration issues (missing/misplaced mouse clicks, missing Firefox window grouping and so on)
[Is this code covered by automated tests?]: no
[Has the fix been verified in Nightly?]: yes
[Needs manual test from QE? If yes, steps to reproduce]: no
[List of other uplifts needed for the feature/fix]: none
[Is the change risky?]: low risk
[Why is the change risky/not risky?]: Not risky, it reuses an existing code and applies it to newly created GtkWindow. 
[String changes made/needed]: none
Flags: needinfo?(stransky)
Attachment #8970850 - Flags: approval-mozilla-beta?
Comment on attachment 8970850 [details]
Bug 1456451 - [CSD] Update toplevel GdkWindow property when it's recreated at nsWindow::SetDrawsInTitlebar(),

Fixes various window issues with tabs in the titlebar enabled on Linux. Approved for 61.0b10.
Attachment #8970850 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.