-
Notifications
You must be signed in to change notification settings - Fork 49
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
Mouse off by height of title bar in main menu in windowed mode #650
Comments
What Linux distro and window manager you have? I did not see any problem using Linux Mint 19.1 Mate 64bit. Can you record animgif about that bug with https://github.com/phw/peek and attach that animgif directly to comment to this issue? |
Hmmm. Does the TSC window overlap with any kind of task bar? @Skarfester had the problem that if the TSC window overlapped with the XFCE task bar, X.org reported wrong coordinates to the window that were off by exactly the height of the overlap with the task bar. You can try a smaller TSC window (change the resolution in the Options menu) and restart TSC. Then check if the problem persists. |
Aha. Its the thickness of the window title. |
At Ubuntu Mate you can change to other layout so there is only one bar: |
Ah I see. GNOME's CSDs play its role probably. I think it's possible for a programme to signal somehow that its window doesn't want CSDs, which maybe resolves the problem. We ought to do that in our code.
That's probably correct and maybe even works around the problem, but running TSC should not require people to change their window layout preferences (except for obvious things such as not choosing a resolution too high for their screen space as was the case with @Skarfester). Looks to me like a bug in TSC's window handling that should be fixed. |
Hmm this feels vaguely familiar, I should try reproducing it.... (AFAIK CSDs don't really affect this; given that we're just using SFML's window APIs, decorations are still being drawn by the compositor here.) |
Maybe then there's a mismatch in the reported height of the window and the Y coordinate reported by SFML for the mouse cursor? TSC mostly just processes the mouse cursor coordinates as they come in from SFML, with any in-game scaling applied. |
Hello, |
It must be the window header's height. I think i've seen in an old bug, some one saying something about fixing the position of (0,0). Maybe the error happened there. |
The problem probably occurs in the translation of SFML's reported coordinates to the game world. If that's true, other items in the game world that can be selected by mouse also suffer from that problem. @sydneyjd Could you please:
If my suspicion is true, then you should see the offset also in the level editor. As for the original problem, I think the main menu's entries should be implemented via CEGUI anyway rather than manually as it's currently the case. That doesn't fix the underlying issue with the coordinate mis-translation, though. I cannot reproduce on i3. It's appearently something that only occurs with these "modern" window managers. |
@refi64 Did you try reproducing this as you announced, and if so, what were the results? I don't see it on my system, and I'll have to setup something in a VM to try it out, so it'd be nice if you could take a look. |
Well this was probably an issue at some point, but I can't seem to reproduce at all anymore. Hopefully it was a dependency issue that just got fixed from an update... |
Interesting. I am still able to reproduce this in my Ubuntu 18.04 VM with LXDE using the 2.1.0-Beta1 package provided by Xet7. And I did delete my .cache/tsc and .config/tsc directories as well. |
Mouse positions do work exactly right on newest Linux Mint 64bit. I am unable to reproduce this. I don't think TSC would be playable enough in VM, you could get VM environment related errors. |
I will test this on LXDE without VM. |
At 1024x768 it is not terrible, but it gets progressively worse the higher the resolution. Im not saying it is not fixed with newer software, I'm just saying that I can still reproduce it on my Ubuntu 18.04 VM, and I don't have any other mouse related issues in the VM. If we know it is fixed, and 18.04 is not a huge target for users, I don't see a problem with overlooking the issue, but that is up to everyone to decide. The game is actually decently playable in the VM, despite not having great hardware. |
18.04 is huge target, it's Ubuntu LTS release and Linux Mint uses it as base in newest Linux Mint release. |
facepalm, I am using Mate. The Icon theme threw me off. |
Is that Ubuntu Mate ? |
18.04 64bit ? |
Correct. Ubuntu Mate Version 18.04.3 LTS 64-Bit. |
What would be the chances of literally sending us the VM disk image?
…On Mon, Dec 23, 2019, 11:04 AM Lauri Ojansivu ***@***.***> wrote:
I can not duplicate this on Ubuntu Mate 18.04 64bit and Lubuntu LXDE 64bit.
Here is Ubuntu Mate:
[image: ubumate-tsc]
<https://user-images.githubusercontent.com/15545/71370554-eb4a1d80-25b6-11ea-9eee-341d9d3ea241.png>
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#650?email_source=notifications&email_token=AAM4YSPG2TLG2K22RJGOKYLQ2DVQJA5CNFSM4HMGKNAKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHRQWTY#issuecomment-568527695>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAM4YSMOQUZTYU2ANETXJXDQ2DVQJANCNFSM4HMGKNAA>
.
|
It would take me at least 4 days to upload the VM Disk Image (14GB). Let me whip up a fresh install and see if I can still reproduce it. |
Suggestion: Compress it with xz (there's probably lots of zero bytes in the VM image, it should compress well), burn it to a DVD, and mail it to refi (who's in the US, contrary to xet7 and me). |
I did install Ubuntu Mate to VirtualBox VM and test this. This "bug" happens because TSC window is too big to fit the screen. Solution is to change TSC window resolution to be smaller, regenerate cache of images, and use that smaller resolution in TSC window. Then all is visible. I don't know is there anything we could do to "fix" this. |
I spun up two new Ubuntu 18.04 installs this afternoon to play with this. Xet7 is correct, if the window is too large for the actual screen resolution, it causes the issue to appear. I do not know how I did not notice that sooner. |
Interesting. In this regard this is similar to the problem with the docks. It appears that such unusual modifications of the available screen space confuse something in TSC or its dependencies.
I actually suspect that we're looking at a bug in SFML. This needs further investigation (minimal reproducing example with just SFML). We're currently bound with the release work for 2.1.0, thus I think it's not something we should cater for now. It's an edge case anyway -- playing in full-screen mode does not exhibit this problem, does it?
I agree. I'll write something up.
Definitely, now we have something to work with. Thanks! |
Or in CEGUI. In which case we'd need a minimal reproducing example with just CEGUI. |
Some additional findings and details: Having this bug requires:
There is now these workarounds for VirtualBox:
|
@sydneyjd You don't need to mail DVD's etc, because here below is info how to duplicate this bug on any OS, without VirtualBox:
On my laptop bare metal, TSC resolution 1024x786 does not work on fullscreen, display is distorted. To play TSC, I need to set both desktop and TSC resolution to be same, to play at fullscreen. |
Oops, I fixed to above comment, that Linux desktop resolution and TSC resolution needs to be same, and TSC running in window, to duplicate this bug. No VirtualBox necessary. |
Doh, duplicate bug I mean. |
In windowed mode, in the main menu. You need to position the mouse one line bellow the item you want to click. The tabed menus, are ok.
I find it strange that no one noticed this issue in the main menu. I don't see any relevant open issue.
I installed tsc_2.1.0+git20190323-alpha3_amd64.deb on ubuntu 18.04
The text was updated successfully, but these errors were encountered: