Her is a partial implementation of ChangeDisplaySettings and friends.
It currently works if "Desktop" is set to the size the display is changed to or if Managed=N.
For Desktop not the size that the display is changed to the code tries SetWindowPos and XResizeWindow witch work in sawfis but dosent in kde. How does i change the size of the desktop shouldent this work?
I haven't got any gut ideas how to implement this in Managed=Y. Does any of you?
Dispay size changes does ony take place if xvidmode is used.
"Sorry for my bad English"
MVH Tommy.
What does this one ?
--- Tommy Schultz Lassen tlassen@tlassen.dk a écrit :
Her is a partial implementation of ChangeDisplaySettings and friends.
It currently works if "Desktop" is set to the size the display is changed to or if Managed=N.
For Desktop not the size that the display is changed to the code tries SetWindowPos and XResizeWindow witch work in sawfis but dosent in kde. How does i change the size of the desktop shouldent this work?
I haven't got any gut ideas how to implement this in Managed=Y. Does any of you?
Dispay size changes does ony take place if xvidmode is used.
"Sorry for my bad English"
MVH Tommy.
___________________________________________________________ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com
Sylvain Petreolle spetreolle@yahoo.fr writes:
What does this one ?
When in Desktop mode it: 1: Tries to change the desktop's size to the size specified in the call to ChangeDisplaySettings. Dosent work in kdm. I don't know whey yet. 2: Confines the pointer to the desktop window. 3: Changes the screen size to that specified in the call to ChangeDisplaySettings. Only works if xvidmode is used. When Managed=N 1: Creates a new window of the size specified in the call to ChangeDisplaySettings. 2: Grabs The mouse to the newly created window. 3: Changes the screen size to that specified in the call to ChangeDisplaySettings. Only works if xvidmode is used. When Managed=Y 1: Dosend do any thing yet. I cant use the method of Managed=N because i don't know where the other windows are and cant confine the to the newly created window.
Tees makes Neverwinter Nights playable even when running it on a XServer with a hirer resolution than the game is using because the mouse is confined th the resolution specified by the game.
MVH Tommy.
Okay, then I have a question : What happens in mode "Desktop" = "N" ? Without your patch applied at this time, Quake III Arena can resize it's screen but is complaining about this function being a stub.
I write this because i don't know what function can be used to resize screen / change video mode. In this way it's difficult to know if the call to the other function has been made prior to the ChangeDisplaySettings call.
Consider that the other fnction resizes the screen and ChangeDisplaySettings is called after : - the game resizes the screen without problem. - a call to ChangeDisplaySettings is made. Would the resize be made twice ?
When in Desktop mode it: 1: Tries to change the desktop's size to the size specified in the call to ChangeDisplaySettings. Dosent work in kdm. I don't know whey yet. 2: Confines the pointer to the desktop window. 3: Changes the screen size to that specified in the call to ChangeDisplaySettings. Only works if xvidmode is used. When Managed=N 1: Creates a new window of the size specified in the call to ChangeDisplaySettings. 2: Grabs The mouse to the newly created window. 3: Changes the screen size to that specified in the call to ChangeDisplaySettings. Only works if xvidmode is used. When Managed=Y 1: Dosend do any thing yet. I cant use the method of Managed=N because i don't know where the other windows are and cant confine the to the newly created window.
Tees makes Neverwinter Nights playable even when running it on a XServer with a hirer resolution than the game is using because the mouse is confined th the resolution specified by the game.
MVH Tommy.
___________________________________________________________ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com
Sylvain Petreolle spetreolle@yahoo.fr writes:
Okay, then I have a question : What happens in mode "Desktop" = "N" ?
That depends. If Managed=N it would change the mode. If Managed=Y it is still uninplimentet and dosend change anything.
Without your patch applied at this time, Quake III Arena can resize it's screen but is complaining about this function being a stub.
I write this because i don't know what function can be used to resize screen / change video mode. In this way it's difficult to know if the call to the other function has been made prior to the ChangeDisplaySettings call.
Consider that the other fnction resizes the screen and ChangeDisplaySettings is called after :
- the game resizes the screen without problem.
- a call to ChangeDisplaySettings is made.
Would the resize be made twice ?
I haven't tested it but if the mode specified in ChangeDisplaySettings is different the mode is changed again. If not It shouldend be changed.
MVH Tommy
It currently works if "Desktop" is set to the size the display is changed to or if Managed=N.
Well, I just have one problem with this patch : you call XGrabPointer in your code :
+ TSXGrabPointer(thread_display(), window, True, 0, GrabModeAsync, GrabModeAsync, window, None, CurrentTime);
That means that, after this, only this particular thread will receive any mouse inputs. Ie if your application has one thread doing a resolution change and another doing the mouse input, you will break it (at least this is my understanding of the whole 'thread_display' 'mess' :-) ).
So to really have a desktop full screen option working (I was working on it some times ago), you would need :
1) either a 'grabless' window retriction X extension (ie say to X that you want the mouse to be restricted to one particular window but to still send events to all the connections)
2) do what I was trying to do : have an X extension to 'lock' the viewport after having done a resolution change (I started on it, but was a bit stuck on some implementation details). After, you would need, of course, some Window Manager extensions to tell 'hey, from now on, I do not want to switch desktops when going at the edge of the screen'.
This is why DXGrab works, because the grabbing is done in the context of the thread initializating DInput (ie the thread that will do the actual input event handling).
Lionel