Thunar right-click menu not expanded

Bug #1822380 reported by Eddie Boyette
30
This bug affects 6 people
Affects Status Importance Assigned to Milestone
GTK+
Fix Released
Unknown
Thunar File Manager
Fix Released
Medium
gtk+3.0 (Ubuntu)
Triaged
Low
Unassigned
thunar (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Submitting this bug report with the SRU template, but hopefully we can go ahead have this uploaded before the final images have been built.

[Impact]

 * The "Create Document" submenu in Thunar does not expand to a usable length.

 * The submenu is displayed at just a few pixels tall, enough to see menu items as you scroll, but not enough to read any item.

 * This breaks a standard use case for file managers: creating new files.

 * The proposed upload fixes the bug by loading the menu items synchronously, making the menu load with the items already populated instead of having to redraw once the items are added.

 * The patch provided comes from the upstream maintainer.

[Test Case]

 * Open Thunar.

 * Right click in the blank space (not on an item).

 * Move the cursor to the "Create Document" menu.
   * Bug Present: The submenu is displayed but short, and no items are visible.
   * Bug Resolved: The submenu is displayed, items present in the ~/Templates folder are displayed.

[Regression Potential]

 * Regression potential is minimal:
   * The modified code affects only the drawing of the submenu items.
   * The submenu is already ununsable, no items are displayed.

 * Some limited testing has already been completed:
   * 2 users confirmed the patch fixes the issue on the upstream bug report.
   * 2 Xubuntu team members (bluesabre, Unit193) have also confirmed the patch and no regressions.

[Original Report]

In Thunar, when I right click to create a new file, the menu shows up so small that I can't see the options. I have rebooted and the problem persists. Haven't checked other file managers yet. Running Xubuntu 19.04 (Development Branch), Thunar 1.8.4.

ProblemType: Bug
DistroRelease: Ubuntu 19.04
Package: thunar 1.8.4-1
ProcVersionSignature: Ubuntu 5.0.0-7.8-generic 5.0.0
Uname: Linux 5.0.0-7-generic x86_64
NonfreeKernelModules: wl
ApportVersion: 2.20.10-0ubuntu23
Architecture: amd64
CurrentDesktop: XFCE
Date: Fri Mar 29 16:41:29 2019
InstallationDate: Installed on 2019-03-29 (0 days ago)
InstallationMedia: Xubuntu 19.04 "Disco Dingo" - Alpha amd64 (20190326.1)
SourcePackage: thunar
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
In , Tony-paulic (tony-paulic) wrote :

As of gtk 3.24.7 (Arch), Thunar's "Create Document" submenu no long displays any content. Hovering over the thin line that is shown, generates the error message:

*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed
Set a breakpoint on '_pixman_log_error' to debug

Reverting back to previous version of GTK3 (3.24.5) results in a working sub-menu again.

The "Create Document" submenu in xfdesktop is unaffected.

Revision history for this message
In , Alexxcons-x (alexxcons-x) wrote :

Meh, yet another gtk3 problem :/ .. thanks for reporting !

Revision history for this message
In , Tony-paulic (tony-paulic) wrote :

Noticed another odd idiosyncrasy. When right-clicking on a file, the popup menu is compressed with arrows at the top an bottom. If I scroll through all of the options, then the complete menu will show (without the arrows) from there on in until thunar is restarted.

Looks like it might be related to the issue above.

Revision history for this message
In , Alexxcons-x (alexxcons-x) wrote :

I am on debian testing, which currently ships gtk 3.24.5 ... soo I will just wait a bit till 3.24.7 is available here ... dont want to build gtk3 from source.
Though AndreLDM as well uses arch ... I'll ask if he feels like taking a look into it.

Revision history for this message
In , Andreldm-2 (andreldm-2) wrote :

*** Bug 15221 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Andreldm-2 (andreldm-2) wrote :

Yes, I can reproduce, tried to investigate it last week, but no luck. I suspect this is caused because the menu is populated asynchronously (ThunarJob), but it could be a gtk regression. Perhaps git bisect'ing gtk could yield some answers.

Revision history for this message
In , Murari (murari-ksr) wrote :

*** Bug 15224 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Thomas-lange2 (thomas-lange2) wrote :

Created attachment 8362
Commit log of git-bisect

Revision history for this message
In , Thomas-lange2 (thomas-lange2) wrote :

The GTK+ commit 57300b49602b856b53f5d30ab3174591c0fb2845 is the culprit for this issue.
I have also attached the log of git-bisect here and hope this was helpful.

https://gitlab.gnome.org/GNOME/gtk/commit/57300b49602b856b53f5d30ab3174591c0fb2845

Revision history for this message
In , Thomas-lange2 (thomas-lange2) wrote :

Reverting only this commit for 3.24.7 resolves this issue, so it is definitively this commit which breaks the menu.

Revision history for this message
Eddie Boyette (eddiekimberly02) wrote :
Changed in thunar:
importance: Unknown → Medium
status: Unknown → Confirmed
Revision history for this message
In , Andreldm-2 (andreldm-2) wrote :

*** Bug 15226 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Tony-paulic (tony-paulic) wrote :

*** Bug 15246 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Andreldm-2 (andreldm-2) wrote :

Thanks Thomas for the bisect, unfortunately that commit doesn't show anything that I can related to this bug.
I already spent some time investigating this, but nothing conclusive yet, just that the problem may stem from here:
https://git.xfce.org/xfce/thunar/tree/thunar/thunar-templates-action.c?id=a7a6aabb955df4c59190c012daab98424905735b#n170

And here:
https://git.xfce.org/xfce/thunar/tree/thunar/thunar-templates-action.c?id=a7a6aabb955df4c59190c012daab98424905735b#n495

Menu items are added after the show signal and only after a ThunarJob is finished. That causes the menu to have scrollbars, I just don't know why the menu items aren't shown. If they are hardcoded to be added right after the "show" signal, they will appear.

Xfdesktop is not affected because menu items for file templates are created before the menu is shown (i.e. synchronously). This seems to be a race condition we are dealing with.

I'm working on a reproducer sample so I can report this to gtk devs.

Revision history for this message
In , Amade-h (amade-h) wrote :

*** Bug 15255 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Amade-h (amade-h) wrote :

If you want a reproducer, I guess you can use one of gnome apps, for example take 'evince' and use open dialog.

Steps would be:

1. Launch evince
2. Click 'open' button
3. Select 'All files'
4. Move open dialog window, so 'All files' is just below top of screen
5. Click 'All files' and then scroll down (using mouse scroll) and click back on window to unselect menu ('All files' still should be selected after this)
6. Move open dialog window back to the center of screen, so it has lots of space and shouldn't need to do scrolled menus
7. Click 'All files' and observe that it creates scrolled menu

Overall I would say there is something wrong with how gtk3 calculates if menus need scroll arrows.

Revision history for this message
Launchpad Janitor (janitor) wrote : Re: right-click menu

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in thunar (Ubuntu):
status: New → Confirmed
Sean Davis (bluesabre)
summary: - right-click menu
+ Thunar right-click menu not expanded
Revision history for this message
In , Tony-paulic (tony-paulic) wrote :

*** Bug 15283 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Andreldm-2 (andreldm-2) wrote :

Created attachment 8408
fix.patch

The attached patch changes the template loading to be synchronous.
I didn't notice any side-effect, with hundreds of files in ~/Templates the context menu appears without any delay.

Revision history for this message
In , Beth Moth (hookedbehemoth) wrote :

That fixed it for me.

Thanks Andre!

Revision history for this message
In , Tony-paulic (tony-paulic) wrote :

Thanks. This fixes the missing templates folder.

The scrolling right-click menu issue still exists though. Does the same asynchronous menu population routines exist for the context menu?

Revision history for this message
In , Andreldm-2 (andreldm-2) wrote :

(In reply to ToZ from comment #18)
> The scrolling right-click menu issue still exists though.
I think that's a GTK regression, need to check if there's a bug for this.

> Does the same
> asynchronous menu population routines exist for the context menu?
I don't know that part of code very well, but I'm almost sure everything else is sync.

Revision history for this message
Sean Davis (bluesabre) wrote :

Attaching debdiff.

description: updated
Sean Davis (bluesabre)
Changed in thunar (Ubuntu):
status: Confirmed → In Progress
Revision history for this message
In , Gitbot (gitbot) wrote :

Andre Miranda referenced this bugreport in commit 6f980dbd6fed2b471d9fb9c7e1dd11d95b502150

Load templates synchronously (Bug #15200)

https://git.xfce.org/xfce/thunar/commit?id=6f980dbd6fed2b471d9fb9c7e1dd11d95b502150

Revision history for this message
In , Andreldm-2 (andreldm-2) wrote :

Nemo is also affected (includes link to upstream):
https://github.com/linuxmint/nemo/issues/2118

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "debdiff" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package thunar - 1.8.4-1ubuntu1

---------------
thunar (1.8.4-1ubuntu1) disco; urgency=medium

  * d/p/lp1822380.patch:
    - Fix display of right-click menu (LP: #1822380)

 -- Sean Davis <email address hidden> Mon, 15 Apr 2019 19:36:31 -0400

Changed in thunar (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
creatxr@gmail.com (creatxr) wrote :

xubuntu 19.04

it lost some popup-menu (right-click menu) just now : e.g. open terminal, new file submenu

before it works.

Revision history for this message
creatxr@gmail.com (creatxr) wrote :

before it lost popup-menu.

it seems that the popup-menu show as scroll-able menu for some hours:

it cannot see all the menu by right-click, it have to scroll the menu.

Revision history for this message
In , Gitbot (gitbot) wrote :

Andre Miranda referenced this bugreport in commit 9004a8237c4192f54e32a38e29ee29f625d72e2a

Load templates synchronously (Bug #15200)

https://git.xfce.org/xfce/thunar/commit?id=9004a8237c4192f54e32a38e29ee29f625d72e2a

Revision history for this message
In , Andreldm-2 (andreldm-2) wrote :

(In reply to Andre Miranda from comment #21)
> Nemo is also affected (includes link to upstream):
> https://github.com/linuxmint/nemo/issues/2118

Just to be clear, I meant the unnecessary arrow scrolls.
Upstream bug: https://gitlab.gnome.org/GNOME/gtk/issues/1843

I'm closing this bug since the fix landed the development branches and will be available in the next release.

Changed in thunar:
status: Confirmed → Fix Released
Revision history for this message
In , Martin Dauskardt (md001) wrote :

I still have the unnecessary arrow scrolls. What does it mean "the fix landed the development branches and will be available in the next release". Which release? Ubuntu 19.10 ??

Revision history for this message
In , Mariolpantunes (mariolpantunes) wrote :

Dear all,

I tried to apply the patch in the version 1.8.4 but I have this error during compile time:
make[3]: *** No rule to make target 'thunar-misc-jobs.c', needed by 'thunar-thunar-misc-jobs.o'. Stop.

How can I fix this?

Revision history for this message
In , Alexxcons-x (alexxcons-x) wrote :

Looks like you are mising a generated Makefile ? Possibly try to make clean and ./autogen.sh again before make.

Or if nothing helps, do a fresh clone. The following should do:

git clone https://git.xfce.org/xfce/thunar --branch thunar-1.8.4
cd thunar
curl https://git.xfce.org/xfce/thunar/patch/?id=9004a8237c4192f54e32a38e29ee29f625d72e2a | git am
./autogen.sh
make

Revision history for this message
In , Mariolpantunes (mariolpantunes) wrote :

Created attachment 8506
Thunar Slackbuid

Revision history for this message
In , Mariolpantunes (mariolpantunes) wrote :

Comment on attachment 8506
Thunar Slackbuid

This is the Slackbuild I am trying to use to compile Thunar.
I have already tried to add the ./autogen.sh but it does not work.
The script compiles without any issue if I remove the patch.

Revision history for this message
In , Evangelos Foutras (foutrelis) wrote :
Revision history for this message
In , Gitbot (gitbot) wrote :

Andre Miranda referenced this bugreport in commit fe9eec8d923d318ab49044724334370bfbbb06d3

Job is now optional for thunar_io_scan_directory

https://git.xfce.org/xfce/thunar/commit?id=fe9eec8d923d318ab49044724334370bfbbb06d3

Revision history for this message
Tim Ritberg (xpert-reactos) wrote :

This bug is annyoing, please fix it for 19.04.

Revision history for this message
Martin Dauskardt (md001) wrote :

Please change the status to „open“, as the bug is NOT FIXED in 19.04
There are still unnecessaey arrow scrolls!

Revision history for this message
Sean Davis (bluesabre) wrote :

The patch we provided helped reduce the effect of this bug. There is actually an upstream GTK issue related to this.

https://gitlab.gnome.org/GNOME/gtk/issues/1843

Changed in gtk:
status: Unknown → New
Revision history for this message
Martin Dauskardt (md001) wrote :

I can't see any effect of the thunar patch for THIS isue(unnecessaey arrow scrolls).

There is now a workaround for Nemo:
https://github.com/leigh123linux/nemo/commit/15b3f99a1de6a1d5164bf3d8d66b2246cea734c3

Isn't it possible to implement a similar fix for Thunar?

Revision history for this message
Theo Linkspfeifer (lastonestanding) wrote :

A workaround is not a proper fix. Would it not make more sense to revert the GTK commit which broke the menu behavior?

Changed in gtk+3.0 (Ubuntu):
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Martin Dauskardt (md001) wrote :
Mathew Hodson (mhodson)
Changed in thunar (Ubuntu):
importance: Undecided → Low
Revision history for this message
Simon Quigley (tsimonq2) wrote :

Unsubscribing the sponsors team as there's nothing left to sponsor here.

Revision history for this message
Martin Dauskardt (md001) wrote :

For all who are annoyed about the unnecessaey arrow scrolls I attach a patched libgtk3 for Ubuntu 64bit. It includes the patch I mentioned in #44.

Changed in gtk:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

Bug watches keep track of this bug in other bug trackers.