|
Allegro windows show up on incorrect monitor |
Schyfis
Member #9,752
May 2008
|
So I'm working with Allegro again lately, and one thing is bugging me. Whenever I start any Allegro program (I'm using 5.0.7), including the A5 demos (5.0.5), they show up on the incorrect monitor. I'm using Windows 7 x64, and the Allegro windows always spawn on the monitor Windows identifies as #1, instead of the monitor designated as the primary monitor. It's not a huge issue, but it is slightly annoying! ________________________________________________________________________________________________________ |
J-Gamer
Member #12,491
January 2011
|
A similar problem: When compiling allegro programs for windows, I have to use al_set_new_window_position to make it even appear. " There are plenty of wonderful ideas in The Bible, but God isn't one of them." - Derezo |
Thomas Fjellstrom
Member #476
June 2000
|
Schyfis said: It's not a huge issue, but it is slightly annoying! How would you suggest that be fixed? If windows is telling us that monitor is #1, then it's #1. You'd have to somehow swap IDs, but which ones do you swap? You could have 6 or more screens plugged in. -- |
Elias
Member #358
May 2000
|
Is monitor #1 the one which has the taskbar on it? -- |
Thomas Fjellstrom
Member #476
June 2000
|
Elias said: Is monitor #1 the one which has the taskbar on it? No, that's the primary monitor. Windows will happily move monitors around, and change which is the primary, but it doesn't change the order in which they were detected. IIRC. -- |
Schyfis
Member #9,752
May 2008
|
Correct Thomas, monitor #1 is not the monitor with the taskbar. (That happens to be monitor #4!) Thomas Fjellstrom said: How would you suggest that be fixed? If windows is telling us that monitor is #1, then it's #1. You'd have to somehow swap IDs, but which ones do you swap? You could have 6 or more screens plugged in. Maybe there's a way to figure out which monitor the taskbar is on, and spawn the window on that monitor? ________________________________________________________________________________________________________ |
Thomas Fjellstrom
Member #476
June 2000
|
Schyfis said: Maybe there's a way to figure out which monitor the taskbar is on, and spawn the window on that monitor? Yeah, ok. That makes sense. In fact, you've reminded me thats how I tried to implement it for X. It'll try and find the "primary" screen via a number of methods, and then fall back to screen 0. It's not perfect, and there may be a better way of finding out which screen is primary, but I bet it depends on the DE, or possibly some obscure WM_HINT. -- |
Peter Wang
Member #23
April 2000
|
Is it because of our _al_win_get_window_center function? If we just passed CW_USEDEFAULT to CreateWindowEx in_al_win_create_window, would that do the right thing in the common case? Somebody with multiple monitors should fiddle with it.
|
|