News:

Simutrans.com Portal
Our Simutrans site. You can find everything about Simutrans from here.

Mouse pointer does not appear on full screen

Started by Yona-TYT, January 29, 2022, 04:28:27 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Yona-TYT

Linux Fedora 35 on wayland.
When I activate the "borderless" option (full screen) the mouse cursor disappears and I can't use the gui interface.

By the way, this has been around for a long time (perhaps since the "borderless" option was implemented), so it has nothing to do with "https://forum.simutrans.com/index.php/topic,21326.0.html".

Roboron

Can't reproduce on Arch. Afaik, the "borderless" option on linux is just the "fullscreen" we had before, it was just re-branded for consistency. So that particular change should have no effect. You get the same results if you start the game with "-borderless" or "-fullscreen"?

Yona-TYT

Both start without the mouse pointer I'm afraid. I suspect it could be something related to the wayland or gnome composer.

Maybe simutrans should have its own cursor like supertux does ?, I also think I get a similar problem in supertukart (cursor not showing up).

Roboron

=> https://gitlab.gnome.org/GNOME/mutter/-/issues/1939

Try to force Simutrans to start in wayland mode, that might help. You can do so starting simutrans like this:

SDL_VIDEODRIVER=wayland simutrans

SDL2 still default to X11 in wayland sessions, but that is about to change in the upcoming SDL 2.0.22

prissi

Given these problems with Fedore, it is probably good that Simutrans does not find the Libaries by default ...

Yona-TYT

#5
Other OpenSource games like Minetest also have problems with full screen mode...

However in penguin (supertux) the course works fine in fullscreen mode, maybe we can learn something from them about the fullscreen implementation under wayland.

Yona-TYT

Quote from: Roboron on January 30, 2022, 05:01:31 PM
=> https://gitlab.gnome.org/GNOME/mutter/-/issues/1939

Try to force Simutrans to start in wayland mode, that might help. You can do so starting simutrans like this:

SDL_VIDEODRIVER=wayland simutrans

SDL2 still default to X11 in wayland sessions, but that is about to change in the upcoming SDL 2.0.22
Simutrans loads without decorations, however when switching to full screen the cursor is still missing.
The terminal says:
Failed to load plugin: '/lib64/libgobject-2.0.so.0: undefined symbol: g_uri_ref'
No plugins found, falling back on no decorations

Roboron

This must be a problem with you wayland compositor. Under Sway (wayland), cursor is shown correctly. You are going to have more luck complaining to GNOME/Mutter devs.

prissi

There shoudl be a flag to activate a softpointer somewhere in simuconf.tab. But not sure if it is working anymore.

Yona-TYT

Quote from: prissi on March 19, 2022, 03:14:34 AMsoftpointer
https://github.com/aburch/simutrans/search?q=softpointer
There it is, unfortunately I'm not compiling simutrans anymore since I lost my hard drive, so I can't test.

Maybe it is convenient to activate it with full screen mode only?.


Yona-TYT

I have recently switched to archlinux , and am running into the same cursor issue. However now with "SDL_VIDEODRIVER=wayland" it works fine for me.

Even so X11/Xorg still has problems with the cursor. @Prissi is it possible that implementing a custom cursor "like supertux in the image above" will solve the problem?.

Edit.
The cursor is still there (if I use a volume up hotkey, the cursor appears momentarily ) it seems the window is overlapping the cursor for some reason.

Quote from: prissi on March 19, 2022, 03:14:34 AMThere shoudl be a flag to activate a softpointer somewhere in simuconf.tab. But not sure if it is working anymore.
I didn't get a cursor anywhere, maybe the code doesn't exist anymore?.

ceeac

You need to compile with the -DUSE_SOFTPOINTER flag, the feature is disabled by default.

Yona-TYT

Quote from: ceeac on May 29, 2022, 06:11:45 PMYou need to compile with the -DUSE_SOFTPOINTER flag, the feature is disabled by default.
I am having trouble compiling simutrans on archlinux , as I am a newbie in this district.

I wonder if anyone has a command to install all the dependencies. 😅

Roboron

Quote from: Yona-TYT on May 29, 2022, 08:28:29 PMI am having trouble compiling simutrans on archlinux , as I am a newbie in this district.

I wonder if anyone has a command to install all the dependencies. 😅

You can install my package, which should download all the dependencies https://aur.archlinux.org/packages/simutrans-svn

Then cancel compilation step after the dependencies have been installed.

Yona-TYT

Quote from: Roboron on May 30, 2022, 02:54:54 PMYou can install my package, which should download all the dependencies https://aur.archlinux.org/packages/simutrans-svn

Then cancel compilation step after the dependencies have been installed.
Nice

Yona-TYT

Quote from: ceeac on May 29, 2022, 06:11:45 PMYou need to compile with the -DUSE_SOFTPOINTER flag, the feature is disabled by default.
I have tried this way:

# The following useful conditional compilation flags exist
#
# Needed to compile:
# SIM_BIG_ENDIAN: MUST be set for PPC/Motorola byte order! (old mac, amiga)
# NO_INTPTR_T: must be set if intptr_t is not available
#
# Changing appearance:
USE_SOFTPOINTER := 1


But it doesn't work or I'm not doing it right?. ???

TurfIt

# The following useful conditional compilation flags exist
#
# In order to use the flags, add a line like this: (-Dxxx)

FLAGS = -DUSE_SOFTPOINTER

Yona-TYT

Quote from: TurfIt on June 07, 2022, 07:28:15 PM# The following useful conditional compilation flags exist
#
# In order to use the flags, add a line like this: (-Dxxx)

FLAGS = -DUSE_SOFTPOINTER
The pointer solves the problem, but it has a graphical error in the pakset selection and load window (I have to report it).


Is it possible to enable it for linux ?, that would be a solution for this problem with full screen in wayland.

As with full screen, a button to activate it in display settings might be a good idea.

Yona-TYT

I have checked with the latest version of fedora (F38) and its recent versions of SDL2 and wayland, now everything is working as it should :) .


I'm going to move this as solved.