Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Full Screen mode support #11

Open
yiky84119 opened this issue Dec 22, 2020 · 7 comments
Open

Full Screen mode support #11

yiky84119 opened this issue Dec 22, 2020 · 7 comments
Labels
work in progress This is currently being implemented

Comments

@yiky84119
Copy link

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

@mjafartp
Copy link

mjafartp commented Jan 6, 2021

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

@geocine
Copy link

geocine commented Mar 11, 2021

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

@Carl-CWX
Copy link

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

@shreks7
Copy link

shreks7 commented Aug 14, 2021

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.

@bitsdojo
Copy link
Owner

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

Yes.

@bitsdojo bitsdojo added the work in progress This is currently being implemented label Aug 17, 2021
@tomassasovsky
Copy link

how's this going?

@Vivaldo-Roque
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
work in progress This is currently being implemented
Projects
None yet
Development

No branches or pull requests

8 participants