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

Frame transitions between monitors #175

Open
NathanCheshire opened this issue Jul 22, 2022 · 4 comments
Open

Frame transitions between monitors #175

NathanCheshire opened this issue Jul 22, 2022 · 4 comments
Assignees

Comments

@NathanCheshire
Copy link
Owner

Moving a frame between monitors results in a super weird bug. This used to work in past versions so maybe figure out where it started and what changed.

@NathanCheshire NathanCheshire self-assigned this Jul 22, 2022
@NathanCheshire
Copy link
Owner Author

See if this exists with splash possibly. It's either a CyderFrame, CyderDragLablel, or FrameUtil bug.

@NathanCheshire
Copy link
Owner Author

Might be coming from this in CyderDragLabel:

if (effectFrame != null && effectFrame.isFocused() && draggingEnabled.get()) {
      int setX = x - mouseX.get() - xOffset.get();
      int setY = y - mouseY.get() - yOffset.get();

      effectFrame.setLocation(setX, setY);

      effectFrame.setRestoreX(effectFrame.getX());
      effectFrame.setRestoreY(effectFrame.getY());
 }

the xoffset and yoffset are initialized when the click first happens and that's where the frame glitches back and forth between, the new position and the original dragging position. These offsets are relative to the monitor they are on and not the monitor as a whole. Monitor operations should take the combined screens as a single monitor and that's how we should do our logic.

@NathanCheshire
Copy link
Owner Author

This also hints at anywhere we use screen util or get screen height or width or height, we need to access that through some transform methods.

@NathanCheshire
Copy link
Owner Author

Well ScreenUtil was disbanded and everything that gets a monitor height or width typically sends a screen device to go along with it. Rare cases use default screen device. This still did not solve the problem, however, regarding frame transitions between monitors.

@NathanCheshire NathanCheshire pinned this issue Aug 23, 2022
@NathanCheshire NathanCheshire unpinned this issue Sep 6, 2022
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

1 participant