Closed Bug 1433667 Opened 2 years ago Closed 11 months ago

When window control placement is "left", CSD displays window controls to right

Categories

(Core :: Widget: Gtk, defect)

Unspecified
Linux
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla66
Tracking Status
firefox60 --- affected
firefox66 --- fixed

People

(Reporter: yoasif, Assigned: stransky)

References

(Blocks 1 open bug)

Details

Attachments

(4 files)

Attached image left-mate-csd.png
Steps to reproduce:

1. Ensure you are using MATE
2. Install or launch MATE Tweak and ensure that Windows: Appearance is set to "left" for Window control placement. This moves the close, minimize, restore buttons in windows to the left side of windows, like macOS.
3. Enable CSD (customize > disable title bar).

What happens:

Window controls appear on right side of window. 

Expected result:

Window controls should appear on left. 

Screenshots attached.
Attached image left-mate-default.png
Duplicate of this bug: 1460401
Duplicate of this bug: 1460621
Today a user of the Italian Support Forum told that the same thing happens even using GNOME as Desktop Environment.
I can confirm this issue on Gnome in Ubuntu 18.04 
I can confirm that this is the case for Budgie on Solus Budgie too...
Duplicate of this bug: 1483313
Duplicate of this bug: 1487586
In addition, in 18.04, the buttons on the right side with Ubuntu 18.04 are slightly blurry and seem to not scale correctly when the title bar is removed.

https://bugzilla.mozilla.org/show_bug.cgi?id=1487586
Assignee: nobody → stransky
Summary: When MATE window control placement is "left", CSD displays window controls to right → When window control placement is "left", CSD displays window controls to right
Attached patch wip.patchSplinter Review
Dao, what do you think about this approach?

I'm not sure if this is the best way, especially the size computation is hacky, but I can't find anything better. Do you know how is that done on MacOS for instance?

Thanks.
Attachment #9014403 - Flags: feedback?(dao+bmo)
(In reply to Martin Stránský [:stransky] from comment #11)
> Created attachment 9014403 [details] [diff] [review]
> wip.patch
> 
> Dao, what do you think about this approach?
> 
> I'm not sure if this is the best way, especially the size computation is
> hacky, but I can't find anything better.

Mike is rewriting that in bug 1356920.
(In reply to Dão Gottwald [::dao] from comment #12)
> (In reply to Martin Stránský [:stransky] from comment #11)
> > Created attachment 9014403 [details] [diff] [review]
> > wip.patch
> > 
> > Dao, what do you think about this approach?
> > 
> > I'm not sure if this is the best way, especially the size computation is
> > hacky, but I can't find anything better.
> 
> Mike is rewriting that in bug 1356920.

Good to know, Thanks!
Depends on: 1356920
QA Contact: jmathies
QA Contact: jmathies
Comment on attachment 9014403 [details] [diff] [review]
wip.patch

We'll need to look into this once bug 1356920 is done.
Attachment #9014403 - Flags: feedback?(dao+bmo)
Keywords: checkin-needed

Pushed by dgottwald@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7d151a27de64
Honour system titlebar button left/right placement, r=dao

Keywords: checkin-needed
Blocks: 1521199
Status: NEW → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla66

On Ubuntu 18.10 with the theme Yaru, and all other themes i have, and with Gnome Teaks placed the buttons on the left, every program moves the buttons to left except Firefox (today Nightly). Am I doing something wrong or this this worth a new bug?

Depends on: 1521310
Depends on: 1521312
Flags: needinfo?(stransky)
No longer depends on: 1521312
Depends on: 1521312
Flags: needinfo?(stransky)

The current heuristic of looking for where the 'menu' element is placed in the GTK layout doesn't work if there is no 'menu' element at all, and that seems pretty normal in contemporary distros. The default Ubuntu layout when reversed doesn't include it, nor does the GNOME default. (This is why comment #20 is not seeing it working). I think the heuristic needs to go a bit deeper and evaluate which elements are on the left and right of the ':' and then decide whether to treat it as reversed or not.

Comment 20 is fixed for me since landing of bug 1521310.

Ah, I missed that. Glad it's already handled!

You need to log in before you can comment on or make changes to this bug.