trippsc2 / OpenTracker

An open-source cross-platform tracking application for A Link to the Past Randomizer.
MIT License
35 stars 9 forks source link

Right-click doesn't work (Linux, maybe NixOS-specific) #58

Closed IslandUsurper closed 3 years ago

IslandUsurper commented 3 years ago

I have packaged OpenTracker for NixOS, but I have found that right-click doesn't work on anything. At first I thought it was because I was using a trackpad, but plugging in a mouse didn't work either.

I can't tell if this is rooted in OpenTracker, Avalonia, or just .NET in general, but I figured I'd start here. If this is the first time the issue has come up, it's probably the way I've packaged it, as NixOS needs an explicit list of dependencies to build things. That said, I'm starting from the .deb provided in the GitHub releases (version 1.5.2, specifically), so anything bundled in it should be working.

trippsc2 commented 3 years ago

This is definitely the first time I've heard about that issue. I'm not very familiar with NixOS. Can you send me your package files and let me know which DE you're using? I'm going to build out a VM and see if I can help figure it out.

IslandUsurper commented 3 years ago

I'm using KDE. GitHub won't let me attach a Nix file, so rename default.nix.txt to default.nix and run nix-build in the directory. You'll be able to run result/bin/OpenTracker once it's done.

IslandUsurper commented 3 years ago

If you have some other VM already, you can just install the Nix package manager in it, and build it that way. NixOS just makes it so that the whole system, from GRUB and the kernel up are handled by Nix. The things Nix installs are completely separate from the rest of the system, and you can uninstall it all easily with sudo rm -r /nix/store.

trippsc2 commented 3 years ago

I can reproduce the issue on a fresh install of nixOS KDE. I'll try to do the same in GNOME later today and also try it on an Ubuntu VM with Nix over the top. That should narrow down where the issue lies.

trippsc2 commented 3 years ago

The issue can be reproduced in Nix packages on all platforms. My best guess is that the event arguments for Avalonia click events don't work in the Nix instance.

IslandUsurper commented 3 years ago

I suspected that would be the case. Because we have to be explicit about dependencies in Nix, there's probably a library missing that Avalonia assumes will be installed already on a "normal" Linux system. I don't do a lot of GUI work, and I'm fairly new at packaging things for Nix, so I'll be shooting blind for the most part.

Hm. I do know there are multiple parts of GTK in nixpkgs, so I'll probably start there.

IslandUsurper commented 3 years ago

Oh hey, I figured it out. I needed to add xorg.xinput to the ld_path list, and now right clicking works. Seems obvious in hindsight, but it was not one of the things I thought of first.

rjwren79 commented 1 year ago

Oh hey, I figured it out. I needed to add xorg.xinput to the ld_path list, and now right clicking works. Seems obvious in hindsight, but it was not one of the things I thought of first.

Where is the ld_path list?

IslandUsurper commented 3 months ago

@rjwren79, it's part of the chicanery Nix does to make sure linkers can find the libraries it installs in very non-standard locations. My comment was referring to the default.nix file I posted earlier.