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

Mac Dockable Hangs #29

Open
xpenatan opened this issue Jul 19, 2014 · 8 comments
Open

Mac Dockable Hangs #29

xpenatan opened this issue Jul 19, 2014 · 8 comments

Comments

@xpenatan
Copy link

Hi, Its me again. I was testing your framework on mac mini 2012 (os x 10.9.4) and java 7u65 64 bit

and it sometimes hangs.

image

Both 1.1.1 and Preview 12 has this issue. Have not detected this issue on windows.

for an sample, docking-frames-demo-size-and-color.jar has this issue.

Thanks =).

@Benoker
Copy link
Owner

Benoker commented Jul 20, 2014

Since I do not have access to a mac, fixing this issue is a bit problematic... (means: I don't have any chance of reproducing the issue). Knowing how "well" Swing-UIs run on Linux (really buggy), I guess there is a chance that this is a Java-issue, not a DockingFrames-issue.

Do you have any exceptions? Or did you ever run the app in a debugger and then checked if it is in an endless loop?

@xpenatan
Copy link
Author

no endless loop and no exeptions, the dock just doesn't undock correctly. Title stay on the position I drag and the dock body stay in the same spot. When I try to undock again (2x-3x) the buggy title return to its original position and then it works. I'm going to make a small video of it and also try with java 6.

@xpenatan
Copy link
Author

Okay, Java 6 works well but not java 7 or 8. Here is a video on java 8u11 on mac: http://youtu.be/U0xa_GFf3Vo
When there is multiple tabs, the first doesnt allways trigger the bug but the second, third and so does.

@Benoker
Copy link
Owner

Benoker commented Jul 27, 2014

Looks as if the framework would not receive or process the "button released MouseEvent". I don't know what changed with Java 7, but I know of other similar bugs that appeared with 7 - so I guess this is more an issue of the JRE than of DockingFrames.

@Benoker
Copy link
Owner

Benoker commented Jul 27, 2014

One thing that could be interesting is to add a global MouseListener like this:

CControl ccontrol = ...
DockController controller = ccontrol.getController();
GlobalMouseDispatcher dispatcher = controller.getGlobalMouseDispatcher();
dispatcher.addMouseListener(new MouseAdapter(){
  public void mouseReleased(MouseEvent e){
     System.out.println(e);
  }
});

Now if the moved parts get stuck like in the video, do you still get the MouseEvent?
If no: currently I have no idea what to do in this case.

@xpenatan
Copy link
Author

nope, mouseReleased dont get a event when it get stuck =/.

Which class does the job of dragging the dock to a new area and highlights it before I release the mouse button so I can help debuging ? its losing focus when the mouse holding the dock move to a new corner.

Java 7-8 also gave problems on mac os x with lwjgl framework (opengl canvas) that was showing on wrong position.

Thanks for you help =)

@Benoker
Copy link
Owner

Benoker commented Jul 27, 2014

The main hub for dragging around Dockables is the class "DefaultDockRelocator", the actual moving of a Dockable happens in "DefaultDockRelocator.dragMouseReleased". The DefaultDockRelocator gets all the MouseEvents from an inner class called "MouseRepresentativeListener".

As far as I know, when the mouse is pressed on a Component, there should always be a "mouse released" event. If that event is not arriving, then where is it? And how could the framework find about the released mouse?

@Benoker
Copy link
Owner

Benoker commented Jul 27, 2014

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

2 participants