home home

downloads files

forum forum

docs docs

wiki wiki

faq faq

Cube & Cube 2 FORUM


Windowed Mode, release capture mouse?

by TomCat39 on 11/20/2009 06:55, 10 messages, last message: 11/26/2009 23:25, 2311 views, last view: 05/03/2024 18:47

I did a few searches and looked through the documents area and the wiki area and came back empty handed.

When running in windowed mode, is there a way to release the mouse so you can adjust window positions? Then a command to regrab the mouse to go back to normal game play?

If there isn't, tis a pity for dual monitor support. It makes running dual monitors a royal pain in the ...

I'm hoping there are commands to do just as I described and I just didn't find them.

Please help.

   Board Index   

#1: ..

by baby~rabbit on 11/20/2009 08:44

Under osx I alt-tab, I assume most window managers have an equivalent switch application hot key...

reply to this message

#2: ..

by TomCat39 on 11/20/2009 16:21

with windows seven you alt tab but the mouse is still captured in either the status window of sauer or in the play window of sauer. you cannot move the mouse outside of the windows to adjust any window positions.

at least that's how it was for me last night when I was dinkering around with dual monitors and playing sauer.

reply to this message

#3: ..

by agmk on 11/20/2009 20:49

Its a windows bug IIRC. I added a command to break my mouse free, then bound it to a key.

ICOMMAND(togglemousegrab,"",(),{
SDL_GrabMode mode = SDL_WM_GrabInput(SDL_GRAB_QUERY);
if(mode == SDL_GRAB_ON) SDL_WM_GrabInput(SDL_GRAB_OFF);
else SDL_WM_GrabInput(SDL_GRAB_ON);
});

reply to this message

#4: windows vista

by |ice|sub-zero|L on 11/20/2009 23:22

on windows vista, these keys work to make your mouse come off the window for cube:

Alt + Tab

Start button

Alt + F4 (exits the program)

and if you don't want it to run windowed, look at the scripting inside... if it has -t remove it, and then you can run it full screen.

reply to this message

#5: ..

by TomCat39 on 11/21/2009 03:55

If this works for me, this will be perfect:

ICOMMAND(togglemousegrab,"",(),{
SDL_GrabMode mode = SDL_WM_GrabInput(SDL_GRAB_QUERY);
if(mode == SDL_GRAB_ON) SDL_WM_GrabInput(SDL_GRAB_OFF);
else SDL_WM_GrabInput(SDL_GRAB_ON);
});

Essentially, the idea of running in windowed mode is to not have to minimize at all to get to other applications if you are using a large enough desktop or dual monitors.

In reality, there should be support to release and capture the mouse to support windowed mode operation.

Hit a button to release the mouse, adjust the window or any other window without actually minimizing, then activate game window, hit the key again to recapture the mouse.

That's ideal.

@agmk

Could you let me know how to work this into my client? would that go into a config file for me to exec? And then what do you bind to a key? Do you "bind M ICOMMAND"?

Thanks for the great lead agmk, I think you've done exactly what I was looking for and wish was already just a part of the client.

reply to this message

#6: Re: ..

by eihrul on 11/21/2009 04:06, refers to #5

This issue was already resolved in the SVN version of Sauer.

reply to this message

#7: ..

by TomCat39 on 11/21/2009 04:57

Wicked, so the next official release will have full windowed mode support?! I'm really glad to hear it's forthcoming. :)

I still would like to integrate the script mentioned for the time being. Never know how long it will be before another official release.

reply to this message

#8: Re: ..

by eihrul on 11/21/2009 05:45, refers to #7

Depends on what you mean by full windowed mode support. In my case, I just mean that Sauer will properly release the input grab when input focus switches to another app on Windows.

reply to this message

#9: ..

by TomCat39 on 11/21/2009 09:05

Ahhh, I was hoping for a method to toggle input/mouse grab when one is running in windowed mode.

But if it's fully automatic when the focus is changed to a different window, then a toggle key really isn't needed.

I still think the way of old Windows XP where alt-tab minimized. While in Windows 7, in windowed mode it merely lets you switch the focus....

Glad to here this annoyance has been addressed.

On a side topic, is there a reason the old weapon binds only toggle 2 weapons on Windows 7 from the latest official release?

The binds show a 3 weapon setup per key yet even when the bind is used in the console, it only utilizes 2 of the 3 weapons.

The other thing I'm struggling with is I can not find the active config file in windows 7. It's not storing it in the \Program Files\Sauerbraten\ folder like it always did on Windows XP.

Me hates learning new OS's behavior sometimes.

reply to this message

#10: Re: ..

by agmk on 11/26/2009 23:25, refers to #9

@tomcat
The ICOMMAND(...) would have to go somewhere in the source and you'd have to recombile. I added it to main.cpp.

It sounds like the svn version would also fix the issue. But either way, you're going to have to compile.

Its also possible to break the mouse out from windowed sauer just by alt-tabbing to something behind sauer (like the cmd window that opens sauer). However, once your mouse breaks out, you can't let it back in or you're trapped again, and if you try to grab the sauer window to move it, it tends to 'drop' very fast and end up off-screen.

reply to this message

   Board Index   


Unvalidated accounts can only reply to the 'Permanent Threads' section!


content by Aardappel & eihrul © 2001-2024
website by SleepwalkR © 2001-2024
53869130 visitors requested 71644324 pages
page created in 0.014 seconds using 10 queries
hosted by Boost Digital