Hello Guest

Problems with 2nd monitor activated

  • 28 Replies
  • 16247 Views
*

Offline Matzon

  • *****
  • 2242
Problems with 2nd monitor activated
« Reply #15 on: October 05, 2006, 19:51:56 »
so to test, do you still get the issue if you create a 640x480 AWTGLCanvas ?

*

Offline Spezi

  • *
  • 43
Problems with 2nd monitor activated
« Reply #16 on: October 05, 2006, 20:06:19 »
Quote from: "Matzon"
so to test, do you still get the issue if you create a 640x480 AWTGLCanvas ?

No, runs fine.

*

Offline Matzon

  • *****
  • 2242
Problems with 2nd monitor activated
« Reply #17 on: October 05, 2006, 21:04:30 »
k, so something must be messing up when you "approach" the secondary monitor.
I'm not sure what we can do to prevent that ?

*

Offline elias

  • *****
  • 899
    • http://oddlabs.com
Problems with 2nd monitor activated
« Reply #18 on: October 06, 2006, 08:06:48 »
Are you using the built in java2d fullscreen feature in GraphicsDevice?

 - elias

*

Offline Spezi

  • *
  • 43
Problems with 2nd monitor activated
« Reply #19 on: October 06, 2006, 08:24:59 »
Quote from: "elias"
Are you using the built in java2d fullscreen feature in GraphicsDevice?

Never heard of that, how can I check it?

*

Offline elias

  • *****
  • 899
    • http://oddlabs.com
Problems with 2nd monitor activated
« Reply #20 on: October 06, 2006, 08:34:54 »
Take a loot at GraphicsDevice.setFullscreenWindow() in the javadocs. Or search for a fullscreen java2d sample to use. It should work with a Window or Frame with an AWTGLCanvas inside, but I haven't actually tried it :)

 - elias

*

Offline Spezi

  • *
  • 43
Problems with 2nd monitor activated
« Reply #21 on: October 06, 2006, 08:56:54 »
Hmm no, this unfortunately also doesn't solve the problem.

*

Offline Spezi

  • *
  • 43
Problems with 2nd monitor activated
« Reply #22 on: October 09, 2006, 17:24:06 »
Is there any chance that this issue can be solved in the next 2 days?
Else I have to implement some user request to disable any additional monitors.

*

Offline Matzon

  • *****
  • 2242
Problems with 2nd monitor activated
« Reply #23 on: October 09, 2006, 17:44:49 »
Could you make the smallest testcase possible, then we might have a chance of figuring out whats going on?
I guess its because that you're approaching the other monitor - but I have no clue really.

*

Offline Spezi

  • *
  • 43
Problems with 2nd monitor activated
« Reply #24 on: October 09, 2006, 23:01:16 »
Quote from: "Matzon"
Could you make the smallest testcase possible, then we might have a chance of figuring out whats going on?


There is a small version of the game wrapping: http://mitglied.lycos.de/spezi/

This is meant for a resolution of 1280x1024.

With just one active monitor this should give a blue screen, with more than one the blue background texture will not be shown and the background is white.

If I comment MainWindow:14-15 and uncomment MainWindow:16-17 the blue screen is visible in both situations, but with small borders around the window and the taskbar overlapping it.

I maybe found the problem but don't know how to fix it:
With the original width and height values comment MainWindow:42-43.
Then it also works in both situations as it should. But this imagePanel is used to display a simple image as loading screen, thus is needed.

*

Offline Matzon

  • *****
  • 2242
Problems with 2nd monitor activated
« Reply #25 on: October 11, 2006, 08:37:06 »
I'm not sure whats going on here - however I have a small workaround for you:
In you MainWindow, if you comment out one of these lines, it all works:
Code: [Select]
gameWindow.setBounds(-1, -1, 1, 1); // Spielefenster verstecken

Code: [Select]
add(imagePanel);

*

Offline elias

  • *****
  • 899
    • http://oddlabs.com
Problems with 2nd monitor activated
« Reply #26 on: October 11, 2006, 14:09:06 »
Ok, I fixed a bug that could cause LWJGL to confuse pixel formats and allow the GDI renderer even though only accelerated formats should be used. The fix won't help you much though, since all it does is properly detect GDI and throw an exception on the first paintGL().

I believe the real problem is caused by the fact that you set the AWTGLCanvas position outside any screen coordinates (the gameWindow.setLocation(-1, -1, 1, 1) part). You'll need to find some other way to overlay AWT stuff, I'm afraid.

 - elias

Problems with 2nd monitor activated
« Reply #27 on: October 11, 2006, 14:53:48 »
THe Canvas can be overlayed with any heavyweight AWT Widget. To overlay it with any lowweight Swing Widget you have to set the Swing Widget to Heavy Weight.
Code: [Select]

JPopupMenu.setDefaultLightWeightPopupEnabled(false);    // disable leightweight
// any widget defined within these two lines will be heavyweight and overlay the awtglcanvas
// thats extremly usefull for menus :)
JPopupMenu.setDefaultLightWeightPopupEnabled(true);     // enable leightweight

*

Offline Spezi

  • *
  • 43
Problems with 2nd monitor activated
« Reply #28 on: October 12, 2006, 15:39:37 »
Quote from: "Matzon"
I'm not sure whats going on here - however I have a small workaround for you:
In you MainWindow, if you comment out one of these lines, it all works:
Code: [Select]
gameWindow.setBounds(-1, -1, 1, 1); // Spielefenster verstecken
Code: [Select]
add(imagePanel);


Oh well, after disabling the first one, everything's fine now. I don't know why this line was still in there, but I really appreciate your suggestion.
Sometimes a second sight just works wonders. :wink: Thank you for this one.