Author Topic: Alt Tab dosent work in fullscreen.  (Read 260 times)

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3560
    • View Profile
    • Space Fractal
Alt Tab dosent work in fullscreen.
« on: 2018-Dec-23 »
as topic said, Alt Tab dosent work in fullscreen, and even jobcenter can been shown at all! This bug needs to been fixed before the steam release really. Im not sure what it happens, since im even used AUTOPAUSE True, that also dosent work correctly on Windows.

Etc there also no way to set a borderless windowered mode at all, which could have fix it.
Greedy Mouse - Karma Miwa - Spot Race - CatchOut - Android Extras - is on a vacation trip, home before end of few days in jan.

Offline Qedo

  • Mr. Polyvector
  • ***
  • Posts: 152
  • UNUS SED LEO
    • View Profile
Re: Alt Tab dosent work in fullscreen.
« Reply #1 on: 2018-Dec-24 »
while waiting debug try this workaround.

Code: GLBasic [Select]
f_fullscreen=TRUE
Nf_fullscreen=TRUE
CGLB_ON_RESUME=GETTIMERALL()

REPEAT
        IF Nf_fullscreen<>f_fullscreen
                f_fullscreen=Nf_fullscreen
                SETSCREEN 640, 480, f_fullscreen
                CGLB_ON_RESUME=GETTIMERALL()
        ENDIF
.......



........
UNTIL FALSE

SUB GLB_ON_PAUSE:
IF Nf_fullscreen=f_fullscreen
                CGLB_ON_RESUME=GETTIMERALL()-CGLB_ON_RESUME
                IF CGLB_ON_RESUME>1000
                        Nf_fullscreen=NOT Nf_fullscreen
                ENDIF
ENDIF
        CGLB_ON_RESUME=GETTIMERALL()

ENDSUB
SUB GLB_ON_RESUME:
IF Nf_fullscreen=f_fullscreen
                CGLB_ON_RESUME=GETTIMERALL()-CGLB_ON_RESUME
                IF CGLB_ON_RESUME>1000
                        Nf_fullscreen=NOT Nf_fullscreen
                ENDIF
ENDIF
CGLB_ON_RESUME=GETTIMERALL()
ENDSUB
 
« Last Edit: 2018-Dec-25 by spacefractal »

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3560
    • View Profile
    • Space Fractal
Re: Alt Tab dosent work in fullscreen.
« Reply #2 on: 2018-Dec-25 »
the only issue is SUB GLB_ON_PAUSE and SUB GLB_ON_RESUME seens not been called on Windows 10, even with AUTOPAUSE True. Otherwise im would have done something extractly like this workaround by switch between fullscreen and windowred mode. Me and Gernot should look why its dont call them as its should. This was a hell to support this on iOS as well Android correctly.
« Last Edit: 2018-Dec-25 by spacefractal »
Greedy Mouse - Karma Miwa - Spot Race - CatchOut - Android Extras - is on a vacation trip, home before end of few days in jan.

Offline Qedo

  • Mr. Polyvector
  • ***
  • Posts: 152
  • UNUS SED LEO
    • View Profile
Re: Alt Tab dosent work in fullscreen.
« Reply #3 on: 2018-Dec-25 »
tried on win10 and it seems to work

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3560
    • View Profile
    • Space Fractal
Re: Alt Tab dosent work in fullscreen.
« Reply #4 on: 2018-Dec-25 »
not here or at my friend. When im alt-tab from a full window, the windows is still stays in fullscreen and got inactivated. A friend of my did even forced to restart windows, because ctrl,alt,delete diddent work. Howover im do have implemented that workaround its send to windowered mode on Tab, Ctrl+ALT and Alt-Enter in that game.

GLB_ON_PAUSE and GLB_ON_RESUME is newer called on a alt/tab here. but if they did, then this workaround would have works fine.

Property a GLB_WIN32_MSG subrutine can been checked the windows is activated or not. This sub does calls its seen.
« Last Edit: 2018-Dec-25 by spacefractal »
Greedy Mouse - Karma Miwa - Spot Race - CatchOut - Android Extras - is on a vacation trip, home before end of few days in jan.

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3560
    • View Profile
    • Space Fractal
Re: Alt Tab dosent work in fullscreen.
« Reply #5 on: 2018-Dec-25 »
This is actuelly not a bug, but its is the code: its dosent work in the debugger mode.
Greedy Mouse - Karma Miwa - Spot Race - CatchOut - Android Extras - is on a vacation trip, home before end of few days in jan.

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3560
    • View Profile
    • Space Fractal
Re: Alt Tab dosent work in fullscreen.
« Reply #6 on: 2018-Dec-25 »
but its still dosent works as intendend. Im get a black screen when doing workaround like this and resume dosent works when you just reactivate the window, but require to been minimized and maximized again. So its still quite fuzzy here.
Greedy Mouse - Karma Miwa - Spot Race - CatchOut - Android Extras - is on a vacation trip, home before end of few days in jan.

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3560
    • View Profile
    • Space Fractal
Re: Alt Tab dosent work in fullscreen.
« Reply #7 on: 2018-Dec-25 »
To get that workaround to work, you do a little more work to do:

in the glb_pc.cpp in the function LRESULT CALLBACK __WndProc and in the WM_ACTIVATE case:
Code: GLBasic [Select]
                case WM_ACTIVATE:
                {                                      
                        switch(wParam & 0xffff)
                        {
                                case WA_ACTIVE: case WA_CLICKACTIVE:
                                        if(!__DG_DEBUG)
                                        {
                                                glb_do_pause(false);
                                                if(!__g_paused && __g_allowPause)
                                                        ::SetWindowText(__hWnd, __g_Caption().c_str());
                                        }
                                        else
                                        {       CALLBYNAME(DGStr("GLB_ON_RESUME"));

                                        }
                                        break;
                                case WA_INACTIVE:
                                        if(!__DG_DEBUG)
                                        {
                                                glb_do_pause(true);
                                                if(__g_paused && __g_allowPause)
                                                        ::SetWindowText(__hWnd, (__g_Caption() + CGStr(" <pause>")).c_str());
                                        }
                                        else
                                        {       CALLBYNAME(DGStr("GLB_ON_PAUSE"));
                                        }
                                        break;
                        }
                }
                return 0L;
 

Now the above issue workaround can been done and works, even with AUTOPAUSE FALSE as well. Those subs is required to been called when the windows is in fullscreen, or the user cant switch betweens apps.
Greedy Mouse - Karma Miwa - Spot Race - CatchOut - Android Extras - is on a vacation trip, home before end of few days in jan.

Offline Qedo

  • Mr. Polyvector
  • ***
  • Posts: 152
  • UNUS SED LEO
    • View Profile
Re: Alt Tab dosent work in fullscreen.
« Reply #8 on: 2018-Dec-25 »
Great !!!