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

neko doesnt go between monitors if one monitor is of lower resolution #12

Open
Jankeczek opened this issue Apr 14, 2024 · 12 comments
Open

Comments

@Jankeczek
Copy link

Jankeczek commented Apr 14, 2024

neko will go from the bigger (in terms of resolution) to the smaller monitor but not vice versa, it just teleports back to the smaller monitor

how it works:

2024-04-14.13-02-34.mp4

how it should work:

2024-04-14.13-03-48.mp4
@Aqueuse
Copy link
Owner

Aqueuse commented Apr 14, 2024

Amazing :O sadly I don't have two screens with different resolutions to debug this but I will scratch my head on it. Thank you for the issue !

@techguyone
Copy link

My Neko doesn't even move between two monitors that are the same model and resolution although the accessories like the ball of wool do. Windows 11

@Aqueuse
Copy link
Owner

Aqueuse commented Jul 16, 2024

My Neko doesn't even move between two monitors that are the same model and resolution although the accessories like the ball of wool do. Windows 11

hello, is it the same in all the different modes ? (follow the mouse, independant, etc)

@techguyone
Copy link

Yes it seems to be stuck to one screen only sadly regardless of mode.

@Aqueuse
Copy link
Owner

Aqueuse commented Jul 16, 2024

what java version do you use to run Neko ? @techguyone

@techguyone
Copy link

techguyone commented Jul 16, 2024

Checking now:

jre-8u421-windows-x64

My monitors are Dell S2722DGM running 2K resolution

As it reaches the edge, it momentarily appears on the second monitor and then disappears and re-appears in the centre of the original monitor.

@Aqueuse
Copy link
Owner

Aqueuse commented Jul 16, 2024

@techguyone could I know the spatial configuration of your screens ? are they stacked vertically, horizontally, an other way ?

@techguyone
Copy link

techguyone commented Jul 16, 2024

I have 3, one is only a small 9 inch system panel though. The two main ones are 27 inch side by side horizontally.
The nekop uses screen 1 only

Screenshot 2024-07-16 193037

@Aqueuse
Copy link
Owner

Aqueuse commented Jul 16, 2024

@techguyone thank you, I will investigate with all this informations and find a solution. For the moment, Neko is moving in a rectangle witch contain all the screens, but I don't have test it on three screens so it will be needed. I think for the last version to a solution where you could choose between the possible screens and neko will have a non rectangular field to move in, but it will need some work ^^

@Aqueuse
Copy link
Owner

Aqueuse commented Jul 16, 2024

Could you test with two screens (1 and 2) and tell me the result ? (you will need to relaunch Neko)

@techguyone
Copy link

Of course.

I disconnected my 3rd monitor (1280 x 400) 60 Hz refresh which is just used as a system monitor panel, leaving only the 2 x 27 inch dell monitors (2560 x 1440) 166 Hz refresh.
Sadly nothing changed, the Neko only reaches the border then reappears in the centre of Display 1
I wonder is the neko only designed to work with1080p monitors ?

@Aqueuse
Copy link
Owner

Aqueuse commented Jul 17, 2024

Of course.

I disconnected my 3rd monitor (1280 x 400) 60 Hz refresh which is just used as a system monitor panel, leaving only the 2 x 27 inch dell monitors (2560 x 1440) 166 Hz refresh. Sadly nothing changed, the Neko only reaches the border then reappears in the centre of Display 1 I wonder is the neko only designed to work with1080p monitors ?

Thank you so much for your help.

Actually no, Neko should work with any display of any size. The management of his playground is in the Pet class :

https://github.com/Aqueuse/NekoV2/blob/master/src/pet/Pet.java

    public Rectangle getVirtualScreenRectangle() {
        Rectangle virtualBounds = new Rectangle();

        GraphicsEnvironment graphicsEnvironment = GraphicsEnvironment.getLocalGraphicsEnvironment();
        GraphicsDevice[] screenDevices = graphicsEnvironment.getScreenDevices();

        for (GraphicsDevice graphicsDevice : screenDevices) {
            GraphicsConfiguration[] graphicsConfigurations = graphicsDevice.getConfigurations();
            for (GraphicsConfiguration graphicsConfiguration : graphicsConfigurations) {
                virtualBounds = virtualBounds.union(graphicsConfiguration.getBounds());
            }
        }

        return virtualBounds;
    }

This is what Neko use to know where he can go (and also the toy), but what is strange is that you tell me that the toy work correctly ?

I will need to replicate your issue very precisely I think to find what is happening (and provide more options in the settings, as it's programmed, to exclude/include screens and crop the playground of neko, that would be awesome).

You must know that I use Neko, with these exact code, on two screens of 1920*1080px horizontally stack and it's working perfectly fine. I'm very sad that you have problem, but the next release, your experience will help me a lot.

Maybe you have an idea about why

            for (GraphicsConfiguration graphicsConfiguration : graphicsConfigurations) {
                virtualBounds = virtualBounds.union(graphicsConfiguration.getBounds());
            }

don't work for you ? It's pretty embarassing. If I find time these evening, I will find on the web some usecase like yours in the hope that it could help me to understand.

If I find a fix, I will do a new release ASAP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants