no virtual desktop...
i used XF86VidModeSwitchToMode to switch to fullscreen for my OpenGL program. i noticed, that there''s a virtual desktop and i can scroll around on it with the mouse. i don''t want this to be possible within my app, so does anyone know, how to turn off the v-desktop ? i don''t mean the configuration in XF86Config... i know, how that works... i want to have fullscreen without v-desktop on systems with v-desk enabled in the X-config, too. if this is impossible, maybe i could just set borders for the mouse, so it''s not possible to scroll around any longer... does anyone know, how THAT works (setting mouse-borders) ?
The only time you can scroll around a virtual desktop with your mouse is if the resolution you pick is greater than the screen resolution. Make sure the resolution and bitdepth you''re choosing is a combination that you can actually use.
Don''t listen to me. I''ve had too much coffee.
Don''t listen to me. I''ve had too much coffee.
so what exactly is the ''screen resolution'' and what is the ''resolution'' and how can i change them from within my application ? i''m not asking for X-server configuration (as i already mentioned), i''m asking for how to get my program to switch to a specific resolution without any v-screen.
my configured resolutions are : 1280x1024 (STD), 800x600, 640x480
when i use XF86VidModeSwitchToMode to set a resolution of 800x600 for my game, the resolution is changed, but i can scroll around on a VIRTUAL desktop of 1280x1024. i DON''T want that !
what''s that for a game, if it scrolls out-of-sight when you touch the screen''s border ?!?
if i can''t disable the v-screen scrolling, i''m still looking for a possibility to restrict the mouse to a rectangle, so one can''t touch any border...
and again : i''m NOT asking for X-configuration... i''m asking for how to code an app, that does it.
my configured resolutions are : 1280x1024 (STD), 800x600, 640x480
when i use XF86VidModeSwitchToMode to set a resolution of 800x600 for my game, the resolution is changed, but i can scroll around on a VIRTUAL desktop of 1280x1024. i DON''T want that !
what''s that for a game, if it scrolls out-of-sight when you touch the screen''s border ?!?
if i can''t disable the v-screen scrolling, i''m still looking for a possibility to restrict the mouse to a rectangle, so one can''t touch any border...
and again : i''m NOT asking for X-configuration... i''m asking for how to code an app, that does it.
October 15, 2002 06:16 AM
Snetfel explained what you need to do.
You gave us the resolutions your display is configured to support, but not the associated bit depth.
If you request a 800 * 600 * 16 fullscreen window, and that your display is configured to handle the following:
1024 * 768 * 32, 800 * 600 * 32, 640 * 480 * 16, you''ll likely get a 800 * 600 window on a 640 * 480 * 16 display, because it''s the only 16 bit resolution X is configured to handle. Because your window is larger than the screen, you''ll have a "virtual display" of sort.
You''ll have to use XF86VidModeGetAllModeLines and friends to find out if the display supports the visual you need. There is no guarantee than it will.
Hope this helps.
You gave us the resolutions your display is configured to support, but not the associated bit depth.
If you request a 800 * 600 * 16 fullscreen window, and that your display is configured to handle the following:
1024 * 768 * 32, 800 * 600 * 32, 640 * 480 * 16, you''ll likely get a 800 * 600 window on a 640 * 480 * 16 display, because it''s the only 16 bit resolution X is configured to handle. Because your window is larger than the screen, you''ll have a "virtual display" of sort.
You''ll have to use XF86VidModeGetAllModeLines and friends to find out if the display supports the visual you need. There is no guarantee than it will.
Hope this helps.
yes...right... didn''t tell about the bitdepth... all modes are set to 32 bit in my config... i deleted all modelines for 8 & 16 bit. i''m also requesting a 32-bit mode, so the bpp don''t matter at all for my problem. but maybe i should have mentioned that...
after a few more hours of excessive search thru google, i found a text that said, a ''normal'' user can only change the monitor''s (physical) resolution, but not the desktop''s (virtual) resolution. this can only be done by root. the virtual screen is always as ''resolutive'' [] as the ''standard'' video mode (or as is explicitely set). so i guess, what i want to do is just not possible. (change the display-resolution windows-like)
my next thought was about ''catching'' the mouse within a given rectangle (as i already did successfully in DOS & Windows, before). i also didn''t find anything about that in google, nor did i get an answer here (would still appreciate if anyone did answer !). so i just ''caught'' the mouse by setting it to the middle of my window frequently & counting my own mouse coordinates from the relative coords. i think, in quake3 for linux they do just the same (at least it strongly looks as if they did).
well... that ''solved'' my problem, but it''s not a very elegant way to do it... if anyone got any more advice about ''no desktop scrolling'' or ''mouse catching'', please tell me !
after a few more hours of excessive search thru google, i found a text that said, a ''normal'' user can only change the monitor''s (physical) resolution, but not the desktop''s (virtual) resolution. this can only be done by root. the virtual screen is always as ''resolutive'' [] as the ''standard'' video mode (or as is explicitely set). so i guess, what i want to do is just not possible. (change the display-resolution windows-like)
my next thought was about ''catching'' the mouse within a given rectangle (as i already did successfully in DOS & Windows, before). i also didn''t find anything about that in google, nor did i get an answer here (would still appreciate if anyone did answer !). so i just ''caught'' the mouse by setting it to the middle of my window frequently & counting my own mouse coordinates from the relative coords. i think, in quake3 for linux they do just the same (at least it strongly looks as if they did).
well... that ''solved'' my problem, but it''s not a very elegant way to do it... if anyone got any more advice about ''no desktop scrolling'' or ''mouse catching'', please tell me !
October 15, 2002 07:57 PM
Another AP here...
You want to create a window covering the physical and grab the keyboard&mouse. Like in the GLX ports of NeHe tutorials, does they not work for you?
You want to create a window covering the physical and grab the keyboard&mouse. Like in the GLX ports of NeHe tutorials, does they not work for you?
mmh... didn''t think about grabbing the mouse... if i do so, will this prevent the desktop from scrolling, when i touch the border ? didn''t think so, but i''ll check it tomorrow (no time today).
the NeHes didn''t work for me at all... don''t remember, why... didn''t try to fix it... wasn''t that important to me.
the NeHes didn''t work for me at all... don''t remember, why... didn''t try to fix it... wasn''t that important to me.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement