Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: In Lighttable, selecting a range of images or selecting multiple images does not work #11927

Closed
caigner opened this issue May 29, 2022 · 30 comments
Labels
bug: pending someone needs to start working on that difficulty: hard big changes across different parts of the code base no-issue-activity priority: medium core features are degraded in a way that is still mostly usable, software stutters reproduce: peculiar the bug seems to affect only a specific target and cannot be reproduced elsewhere scope: UI user interface and interactions

Comments

@caigner
Copy link

caigner commented May 29, 2022

I am on Gentoo Linux and am using Darktable v3.8.1-r1.

In Lighttable selecting multiple images by pressing CTRL-left mouse click and selecting a range of images by pressing SHIFT-left mouse click does not work.

Currently I can select multiple images only by hovering over images and pressing space bar.

Does anyone else have this problem or is it just me?

@Nilvus
Copy link
Contributor

Nilvus commented May 29, 2022

Probably just you. Such standard function would have been reported since 3.8.1 release few months ago. It works great on 3.8.1 and on master. I suggest you to check your shortcuts configuration. Maybe something broken on your side.
If you don't set customized shortcuts, first try to restore default shortcuts: click on keyboard icon on top right of thumbnails view, then click on a thumbnail for example to show shortcuts dialog window, then restore on bottom right. If that doesn't fix your issue, try to remove, with darktable closed, your darktablerc and shortcuts files in .config/darktable folder (save them of course to restore them if needed). I suggest to test that by removing on file first, then launch darktable and check what behavior you have.

Try also to check if you have same issue in other apps.

@Nilvus Nilvus added the bug: upstream he bug needs a fix outside of the scope of darktable, in an external lib or in a driver label May 29, 2022
@caigner
Copy link
Author

caigner commented May 29, 2022

This really puzzles me. I did as you said. Deleted darktablerc and all shortcut files. Did not make any difference. I wonder, what could be the cause of this behaviour. In all other applications ctrl- and shift-left click works as expected. I welcome any input you can give me.

@Nilvus
Copy link
Contributor

Nilvus commented May 29, 2022

Really strange. I hope you remove both files with darktable closed. Those files are updated if darktable is launched during this operation.
Another thing, is Ctrl+a works to select all images?

If yes, I so can't update more here. Your issue is really strange and I don't have more ideas to help. Maybe someone else will see that and think about something else. As it works on darktable for most users, maybe try to ask also on discuss.pixls.us forum.

@Nilvus Nilvus added the reproduce: peculiar the bug seems to affect only a specific target and cannot be reproduced elsewhere label May 29, 2022
@caigner
Copy link
Author

caigner commented May 30, 2022

Yes, I removed both files while darktable was closed. CTRL-a works as expected.

I just tested selecting multiple entries in Thunderbird, and both CTRL-left click and SHIFT-left click work.
I also checked it in Nemo.

I think I will now downgrade Darktable and see if this makes a difference.

@caigner
Copy link
Author

caigner commented May 30, 2022

I just installed darktable v3.8.0-r3 and I can select multiple images! Hurra!

Just for fun I shall upgrade to v3.8.1-r1 again.

@caigner
Copy link
Author

caigner commented May 30, 2022

I can confirm now that the problem is back again with version 3.8.1-r1 on Gentoo Linux.
So I guess I have to downgrade to 3.8.0-r3 and live with it for a while.

@Nilvus
Copy link
Contributor

Nilvus commented May 30, 2022

As 3.8.1 works great, there's probably an issue with 3.8.1 Gentoo package.
3.8.1 fix a lot of bugs and was probably one of the top bugfixes release.
I so suggest you to send an issue to Gentoo maintainer of darktable package.

I so close as it's not a darktable issue but probably a package one.

@Nilvus Nilvus closed this as completed May 30, 2022
@caigner
Copy link
Author

caigner commented Jun 1, 2022

Just to add to my investigations: I also installed darktable 3.8.1 from source provided on the darktable website.
Same result: I can't select multiple images with CTRL or SHIFT left click.

@caigner
Copy link
Author

caigner commented Jun 1, 2022

And: The flatpak version doesn't work either for me.

@AlicVB
Copy link
Contributor

AlicVB commented Jun 1, 2022

@caigner : I definitively can't reproduce, and considering the importance of your issue, I fear that very few people experienced it... (That doesn't mean we won't do anything, just that we'll need your help to solve it)

do I read correctly that you can compile from source yourself ? In that case, that would be great :

  • can you try to compile darktable master and see if your issue has been solved (would be by "accident", but...) Be careful to backup everything before (or better, use a "blank" config dir, just for the tests)
  • if you still experiment the issue, may I propose you some line to add in the code, before recompiling, to try to find where the issue comes from...

@victoryforce
Copy link
Collaborator

darktable 3.8.1 on Ubuntu 22.04 (and Ubuntu 21.10 earlier): works fine.
darktable 3.8.1 on Windows 10: works fine.
darktable development builds on both OSes: works fine.

As we can easily see, the only constant factor that accompanies this problem is your Gentoo Linux distro. So I conclude that it would be best to address this issue to the Gentoo distro's darktable package maintainer. At least he/she works with this distribution and therefore can debug the issue if it's reproducible not only on your specific Gentoo installation.

@caigner
Copy link
Author

caigner commented Jun 1, 2022

I opened a bug report on https://bugs.gentoo.org/848492

@caigner
Copy link
Author

caigner commented Jun 1, 2022

* can you try to compile darktable master and see if your issue has been solved (would be by "accident", but...) Be careful to backup everything before (or better, use a "blank" config dir, just for the tests)

I compiled from this source: https://github.com/darktable-org/darktable/releases/download/release-3.8.1/darktable-3.8.1.tar.xz

I will try the master branch now and will report soon.

* if you still experiment the issue, may I propose you some line to add in the code, before recompiling, to try to find where the issue comes from...

I am not a C programmer, so I don't know, where I should add some text in the code.

@caigner
Copy link
Author

caigner commented Jun 1, 2022

Update: I compiled the master branch (v3.9.0+1672~g8d699d714), but my problem persists:
Ctrl-a works.
Hover and press space works.
Ctrl-click and Shift-click don't work.

@AlicVB
Copy link
Contributor

AlicVB commented Jun 13, 2022

@caigner : sorry for the delay, I admit to have completely forgotten your issue...
So I've looked at the commits between 3.8.0 and 3.8.1. 2 commits seems related : fbf662d and 8b5ebb1

I would be great if you can change the following in current master :

  • in src/common/selection.c add // at the beginning of line 287, so the line should now be //if(!dt_collection_get_selected_count(darktable.collection)) return; (fyi, this desactivate the line)
  • in src/dtgtk/thumbtable.c after line 1046 add if(event->detail == GDK_NOTIFY_VIRTUAL) printf("leave virtual\n");

Now compile darktable as you do usually, launch darktable from a terminal and report :

  1. if range selection works
  2. if you have any msg in the terminal

Thanks again for you help !

@Nilvus
Copy link
Contributor

Nilvus commented Jun 13, 2022

I so reopen this one.

@Nilvus Nilvus reopened this Jun 13, 2022
@Nilvus Nilvus added priority: medium core features are degraded in a way that is still mostly usable, software stutters understood: incomplete devs lack some important info to start fixing scope: UI user interface and interactions bug: pending someone needs to start working on that and removed bug: upstream he bug needs a fix outside of the scope of darktable, in an external lib or in a driver labels Jun 13, 2022
@Nilvus
Copy link
Contributor

Nilvus commented Jun 13, 2022

@caigner: @rand00 posted same issue (#12037). He precise that he uses StumpWM tiling manager on #12038 issue. Depending on what you use, maybe such isdue is darktable one on specific WM. That could explain why we can't reproduce.

@rand00
Copy link

rand00 commented Jun 14, 2022

Copy paste from #12037 :
I manually fixed another compilation problem on 3.8.0, and got it built.

The UI problems are not present in 3.8.0. So selection of multiple images works again + switch window focus doesn't stop shortcuts from working.

I'll try to bisect in the evening if I don't hit the same amount of compilation problems on other versions. Is there a flag I can pass to ignore minor warnings so I can be sure dt compiles while bisecting?

@AlicVB
Copy link
Contributor

AlicVB commented Jun 14, 2022

@rand00 : if you experiment problems with bisecting, you can also try the changes I have proposed to @caigner here : #11927 (comment)
They have to be applied on current master...
Thanks !

@rand00
Copy link

rand00 commented Jun 14, 2022

I tried your changes to master:

  • Shift-select works, but Ctrl select still doesn't.
  • Switch window focus back/forth also keeps shortcuts working now.
  • And dt now prints 'leave virtual' every time I left-click, no matter what key is pressed at the same time.

@AlicVB
Copy link
Contributor

AlicVB commented Jun 14, 2022

  • Shift-select works

Well I suppose that it doesn't works very well regarding the start of the selection... right ?

  • And dt now prints 'leave virtual' every time I left-click, no matter what key is pressed at the same time.

here is the issue I think... As I understand this, in your WM, for some reason, the leave event doesn't work the same than in "classic" WM...
first point will be to try to understand how it works... so I will need your help again !
remove the changes, and add printf("leave detail=%d mode=%d\n", event->detail, event->mode); in src/dtgtk/thumbtable.c in line 1043
Then I would be interested of the terminal output associated with the following action :

  1. move between thumbnails (try slow and quick movements from different parts of the thumb) => doesn't produce anything here
  2. go to the end of the thumbnail list. You may have a "blank" area with no thumbnails at the bottom (or change the zoom level). what id the output if you move from thumbnail to this "blank" area
  3. ensure you have some thumbnail "half shown" at the bottom. What is the output if you move from thumbnail to the bottom bar (quickly)
  4. output when you click on a new thumbnail (try with ctrl or shift to see if that change anything)

That's all what I'm thinking of for instance... Thanks again for your help here !

For the record, the problematic commit seems 8b5ebb1 which is fixing #10667 by changing what has been done in #9996...

@rand00
Copy link

rand00 commented Jun 14, 2022

Well I suppose that it doesn't works very well regarding the start of the selection... right ?

I can select single images fine, and shift select works perfectly. Only Ctrl-select that doesn't work.

first point will be to try to understand how it works... so I will need your help again !

Will try this out when I have some time - probably tomorrow. And thanks to you for fixing it (: I've used dt a lot for many years - fantastic software

@rand00
Copy link

rand00 commented Jun 15, 2022

  1. Moving mouse between thumbnails, and on top of same thumbnail, doesn't trigger the print-event.
  2. I get leave detail=2 mode=0 when moving in to a thumbnail from the blank area. There is no printing when moving from thumbnail to blank area.
  3. With thumbnail half-down at the bottom
  • I get leave detail=1 mode=0 when moving slowly
  • I get leave detail=4 mode=0 when moving fast
  1. When clicking new thumbnail
  • I get leave detail=1 mode=0 when just left-clicking
  • The same event with both Ctrl/Shift click

@AlicVB
Copy link
Contributor

AlicVB commented Jun 16, 2022

Everything seems ok, except this :

  • I get leave detail=1 mode=0 when just left-clicking

which is very very suspicious : detail = 1 means GDK_NOTIFY_VIRTUAL, which means, according to gdk doc : the pointer moves between an ancestor and an inferior of the window.
But here : the mouse is already inside an inferior of the thumbtable : a thumbnail. And when you "click" on it gtk seems to report that you leave this inferior for an ancestor of the thumbtable ??? Either there's something I don't understand in gtk code and docs, either your WM is doing something very strange...

I don't really know what to do here :/

Note that it's not the first time we have some strange events fired on some specific WM (fluxbox) : I remember we have had hard time to implement a workaround for something about double-click in lighttable, about 8 years ago... but when I have rewritten lighttable code, this was fixed upstream (sorry, I don't have the reference)

@rand00
Copy link

rand00 commented Jun 17, 2022

I agree that this behaviour seems weird, though I'm not experienced with GTK. Though from my point of view as a user:

  • I don't have the same problems in other applications, of which many surely use GTK
  • and darktable used to work with my WM before a certain version

@Nilvus Nilvus added difficulty: hard big changes across different parts of the code base and removed understood: incomplete devs lack some important info to start fixing labels Jun 25, 2022
@github-actions
Copy link

This issue did not get any activity in the past 60 days and will be closed in 365 days if no update occurs. Please check if the master branch has fixed it and report again or close the issue.

@caigner
Copy link
Author

caigner commented Mar 13, 2023

Hi, all you wonderful developer people!

I can report that in version 4.2.1 both shift-select and ctrl-select works now as expected.

Thank you so much! I am so happy!

@victoryforce
Copy link
Collaborator

@caigner If you confirm that the problem no longer exists, you can also close this issue.

@caigner
Copy link
Author

caigner commented Mar 13, 2023

As I opened this issue and the solution (whatever it was) works for me, I close it now.
Thanks to all who participated.

@caigner caigner closed this as completed Mar 13, 2023
@rand00
Copy link

rand00 commented Mar 18, 2023

Yay :P I can also confirm it works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: pending someone needs to start working on that difficulty: hard big changes across different parts of the code base no-issue-activity priority: medium core features are degraded in a way that is still mostly usable, software stutters reproduce: peculiar the bug seems to affect only a specific target and cannot be reproduced elsewhere scope: UI user interface and interactions
Projects
None yet
Development

No branches or pull requests

5 participants