Thunar right-click menu not expanded

Bug #1822380 reported by Eddie Boyette on 2019-03-29
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Fix Released
Thunar File Manager
Fix Released
gtk+3.0 (Ubuntu)
thunar (Ubuntu)

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.


 * 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)

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.

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

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.

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.

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

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.

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

Created attachment 8362
Commit log of git-bisect

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.

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

Eddie Boyette (eddiekimberly02) wrote :
Changed in thunar:
importance: Unknown → Medium
status: Unknown → Confirmed

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

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

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:

And here:

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.

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

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.

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

Changed in thunar (Ubuntu):
status: New → Confirmed
Sean Davis (bluesabre) on 2019-04-09
summary: - right-click menu
+ Thunar right-click menu not expanded

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

Created attachment 8408

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.

That fixed it for me.

Thanks Andre!

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?

(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.

Sean Davis (bluesabre) wrote :

Attaching debdiff.

description: updated
Sean Davis (bluesabre) on 2019-04-16
Changed in thunar (Ubuntu):
status: Confirmed → In Progress
In , Gitbot (gitbot) wrote :

Andre Miranda referenced this bugreport in commit 6f980dbd6fed2b471d9fb9c7e1dd11d95b502150

Load templates synchronously (Bug #15200)

Nemo is also affected (includes link to upstream):

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
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 (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. (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.

In , Gitbot (gitbot) wrote :

Andre Miranda referenced this bugreport in commit 9004a8237c4192f54e32a38e29ee29f625d72e2a

Load templates synchronously (Bug #15200)

(In reply to Andre Miranda from comment #21)
> Nemo is also affected (includes link to upstream):

Just to be clear, I meant the unnecessary arrow scrolls.
Upstream bug:

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

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 ??

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?

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

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

git clone --branch thunar-1.8.4
cd thunar
curl | git am

Created attachment 8506
Thunar Slackbuid

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 ./ but it does not work.
The script compiles without any issue if I remove the patch.

In , Gitbot (gitbot) wrote :

Andre Miranda referenced this bugreport in commit fe9eec8d923d318ab49044724334370bfbbb06d3

Job is now optional for thunar_io_scan_directory

Tim Ritberg (xpert-reactos) wrote :

This bug is annyoing, please fix it for 19.04.

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!

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.

Changed in gtk:
status: Unknown → New
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:

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

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
Mathew Hodson (mhodson) on 2019-06-23
Changed in thunar (Ubuntu):
importance: Undecided → Low
Simon Quigley (tsimonq2) wrote :

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

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  Edit
Everyone can see this information.

Other bug subscribers

Related blueprints


Remote bug watches

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