processing4 icon indicating copy to clipboard operation
processing4 copied to clipboard

Resize cursor not showing in P2D & P3D

Open Aryszin opened this issue 2 years ago • 5 comments

Cursors in P2D Mode & P3D would be great, because if you resize the window it doesnt show it!

Aryszin avatar Jan 27 '23 14:01 Aryszin

Thank you for bringing this issue to our attention! Can you please provide more information about what you are experiencing with cursors in P2D and P3D modes? It would also be helpful if you could follow the provided issue template to give us a better understanding of your setup and the steps you've taken to reproduce this issue.

Additionally, could you please specify what you mean by "if you resize the window it doesn't show it"? Are you referring to the cursor not being displayed or not being displayed correctly when the window is resized?

Any additional details or screenshots that you can provide will be greatly appreciated. Thank you!

SableRaf avatar Feb 06 '23 14:02 SableRaf

So heres a detailed explanation of alle the things i want to adress:

Firstly the cursors that windows show, when resizing the window, are not shown if using other Renderes than the default one.

Secondly there is a bug, when the "cursor()" keyword is used too often in the draw loop, that it doesnt change after a while, even if "cursor()" is called with a different keyword in the brackets.

Thirdly the cursors in P2D & P3D are not the same as in the default renderer, i don't know if this is changeable because of OpenGL but the standard operating cursor would be great!

Also here are a few bugs/glitches i noticed while trying out the different available renderers (Default, P2D, P3D, FX2D), that are not related to cursors:

  • when using "surface.setResizale(true)" and use the default renderer, while resizing the sketch will randomly freeze
  • when using the P2D renderer, it has very weird behaviour when trying to show it in OBS (very laggy, sometimes not?!)
  • when using FX2D renderer, OBS doesnt show the window!

I hope this helped!

Aryszin avatar Mar 15 '23 12:03 Aryszin

follow the provided issue template to give us a better understanding of your setup and the steps you've taken to reproduce this issue.

Description

The mouse cursor is not displayed correctly when resizing the window. The arrow cursor is shown instead of the east-west resize cursor.

Expected Behavior

The mouse cursor changes to east-west resize cursor at the edge of the window where it can be resized.

Current Behavior

The mouse cursor does not change.

Steps to Reproduce

  1. surface.setResizable(true);
  2. run the sketch. move your cursor to the edge of the window.

Your Environment

  • Processing version: 4.0.1
  • Operating System and OS version: Windows 11 10.0.22621 Build 22621

Additionally, could you please specify what you mean by "if you resize the window it doesn't show it"? Are you referring to the cursor not being displayed or not being displayed correctly when the window is resized? It is not displayed correctly. The arrow cursor is shown instead of the east-west resize cursor.

Any additional details or screenshots that you can provide will be greatly appreciated. Thank you!

I believe it is a windows only issue but I have not checked.

https://user-images.githubusercontent.com/32994314/234109470-3b98d530-e1cb-4c34-bd65-631bcf40069c.mp4

dman2210 avatar Apr 24 '23 20:04 dman2210

https://jogamp.org/bugzilla/show_bug.cgi?id=1296

retiutut avatar May 15 '24 21:05 retiutut

A workaround can be achieved using built-in Processing.

int prevMouseX, prevMouseY;
int windowW, windowH;
boolean isMouseResizing = false;

void settings() {
    size(400, 600, P2D);
}

void setup() {
    surface.setResizable(true);    
}

void draw() {
    background(100);
    fill(255);
    text(millis(), width/2, height/2);
    rect(width - 10, 0, 10, height);
    prevMouseX = mouseX;
    
}

void mouseDragged() {
    if (mouseX > width - 10) {
        cursor(MOVE);
        isMouseResizing = true;
    }
    println("MOUSE DRAGGED--"+millis());
}

void mouseReleased() {
    if (isMouseResizing) {
        cursor(ARROW);
        isMouseResizing = false;
        windowResize(mouseX, height);
    }
    println("MOUSE RELEASED");
}

retiutut avatar May 15 '24 22:05 retiutut