bitsdojo_window icon indicating copy to clipboard operation
bitsdojo_window copied to clipboard

Full Screen mode support

Open yiky84119 opened this issue 4 years ago • 7 comments

hello, when i set screen size to 1920*1080 (full screen), task bar still at the bottom of the window,can you support full screen mode ? 2

yiky84119 avatar Dec 22 '20 04:12 yiky84119

Please add full screen support

without bitsdojo full screen can do with following code

edit ./windows/runner/main.cpp

window.SetQuitOnClose(true);

//Insert Code Here

run_loop.Run();

Code to insert :

HWND hwnd = window.GetHandle();

auto windowHDC = GetDC(hwnd);
int fullscreenWidth  = GetDeviceCaps(windowHDC, DESKTOPHORZRES);
int fullscreenHeight = GetDeviceCaps(windowHDC, DESKTOPVERTRES);
int colourBits       = GetDeviceCaps(windowHDC, BITSPIXEL);
int refreshRate      = GetDeviceCaps(windowHDC, VREFRESH);

DEVMODE fullscreenSettings;
bool isChangeSuccessful;

EnumDisplaySettings(NULL, 0, &fullscreenSettings);
fullscreenSettings.dmPelsWidth        = fullscreenWidth;
fullscreenSettings.dmPelsHeight       = fullscreenHeight;
fullscreenSettings.dmBitsPerPel       = colourBits;
fullscreenSettings.dmDisplayFrequency = refreshRate;
fullscreenSettings.dmFields           = DM_PELSWIDTH |
                                      DM_PELSHEIGHT |
                                      DM_BITSPERPEL |
                                      DM_DISPLAYFREQUENCY;

SetWindowLongPtr(hwnd, GWL_EXSTYLE, WS_EX_APPWINDOW | WS_EX_TOPMOST);
SetWindowLongPtr(hwnd, GWL_STYLE, WS_POPUP | WS_VISIBLE);
SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, fullscreenWidth, fullscreenHeight, SWP_SHOWWINDOW);
isChangeSuccessful = ChangeDisplaySettings(&fullscreenSettings, CDS_FULLSCREEN) == DISP_CHANGE_SUCCESSFUL;
ShowWindow(hwnd, SW_MAXIMIZE);

implement full screen option also with this plugin

mjafartp avatar Jan 06 '21 08:01 mjafartp

@mjafartp will you be able to create PR for this, integrate it on the plugin

geocine avatar Mar 11 '21 16:03 geocine

Are full screen options going to be added to the plugin?

Carl-P4 avatar Apr 26 '21 23:04 Carl-P4

Please add full screen support

without bitsdojo full screen can do with following code

edit ./windows/runner/main.cpp

window.SetQuitOnClose(true);

//Insert Code Here

run_loop.Run();

Code to insert :

HWND hwnd = window.GetHandle();

auto windowHDC = GetDC(hwnd);
int fullscreenWidth  = GetDeviceCaps(windowHDC, DESKTOPHORZRES);
int fullscreenHeight = GetDeviceCaps(windowHDC, DESKTOPVERTRES);
int colourBits       = GetDeviceCaps(windowHDC, BITSPIXEL);
int refreshRate      = GetDeviceCaps(windowHDC, VREFRESH);

DEVMODE fullscreenSettings;
bool isChangeSuccessful;

EnumDisplaySettings(NULL, 0, &fullscreenSettings);
fullscreenSettings.dmPelsWidth        = fullscreenWidth;
fullscreenSettings.dmPelsHeight       = fullscreenHeight;
fullscreenSettings.dmBitsPerPel       = colourBits;
fullscreenSettings.dmDisplayFrequency = refreshRate;
fullscreenSettings.dmFields           = DM_PELSWIDTH |
                                      DM_PELSHEIGHT |
                                      DM_BITSPERPEL |
                                      DM_DISPLAYFREQUENCY;

SetWindowLongPtr(hwnd, GWL_EXSTYLE, WS_EX_APPWINDOW | WS_EX_TOPMOST);
SetWindowLongPtr(hwnd, GWL_STYLE, WS_POPUP | WS_VISIBLE);
SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, fullscreenWidth, fullscreenHeight, SWP_SHOWWINDOW);
isChangeSuccessful = ChangeDisplaySettings(&fullscreenSettings, CDS_FULLSCREEN) == DISP_CHANGE_SUCCESSFUL;
ShowWindow(hwnd, SW_MAXIMIZE);

implement full screen option also with this plugin

FYI, The flutter emulator freezes using this code.

shreks7 avatar Aug 14 '21 18:08 shreks7

Are full screen options going to be added to the plugin?

Yes.

bitsdojo avatar Aug 17 '21 09:08 bitsdojo

how's this going?

tomassasovsky avatar Nov 20 '21 13:11 tomassasovsky

I used this plugin called "window_manager" to get into full screen mode.

Vivaldo-Roque avatar Feb 05 '22 10:02 Vivaldo-Roque