Comments (5)
I had this exact issue except for the top bar.
Basically when the window is maximized, it doesn't leave any gap for the taskbar side.
Here's how I fixed it (should've opened a new PR for that) 81b972a
(#374)
If you got time, maybe open a PR and try to experiment with the bottom border.
Don't do that, see below
from window_manager.
The sample code from Microsoft at https://learn.microsoft.com/en-us/windows/apps/develop/title-bar#full-customization-example also exhibits this problem: microsoft/microsoft-ui-xaml#8431.
The workaround mentioned in that bug is using https://learn.microsoft.com/en-us/windows/win32/api/shobjidl_core/nf-shobjidl_core-itaskbarlist2-markfullscreenwindow#remarks:
Since Windows 7, call
SetProp(hwnd, L”NonRudeHWND”, reinterpret_cast<HANDLE>(TRUE))
before showing a window to indicate to the Shell that the window should not be treated as full-screen. This ensures the taskbar does not adjust itself to be below the window in z-order.
from window_manager.
Adding a call of SetProp with NonRudeHWND in windows/window_manager.cpp fixes the taskbar visibility:
diff --git a/windows/window_manager.cpp b/windows/window_manager.cpp
index 3484176..5bd0e28 100644
--- a/windows/window_manager.cpp
+++ b/windows/window_manager.cpp
@@ -256,6 +256,7 @@ bool WindowManager::IsFocused() {
void WindowManager::Show() {
HWND hWnd = GetMainWindow();
+ SetProp(hWnd, L"NonRudeHWND", reinterpret_cast<HANDLE>(TRUE));
DWORD gwlStyle = GetWindowLong(hWnd, GWL_STYLE);
gwlStyle = gwlStyle | WS_VISIBLE;
if ((gwlStyle & WS_VISIBLE) == 0) {
However, since this is the first time I see the codebase, I am not sure where this call should actually live.
from window_manager.
@roman-yepishev If this is only called once ever, you can put that here
window_manager/windows/window_manager.cpp
Lines 208 to 211 in ef786b1
window_manager/windows/window_manager.cpp
Lines 572 to 617 in ef786b1
from window_manager.
A crude version of how this may work is roman-yepishev@3385880, however it changes the behavior dramatically (hides the window before switching to/from full-screen), which is likely not expected by the clients. Additionally the example app had issues redrawing with this enabled so this does not look like a good solution.
from window_manager.
Related Issues (20)
- [Windows] Restoring window from minimized state triggers onWindowBlur instead of onWindowFocus.
- [macOS]启动App时无法聚焦 HOT 1
- [Windows] No implementation found for method setMovable on channel window_manager
- setTitleBarStyle while retaining the frame HOT 2
- Titlebar hidden but with buttons HOT 1
- Not working properly HOT 1
- How to modify the distance between the close, maximum, and minimum buttons HOT 1
- `setPosition` seems not to take consider into the scale factor HOT 2
- Can not run in profile or release mode under flutter 3.19+
- 1 pixel gap to taskbar when maximize on frameless window
- Click the dock icon to restore after closing the window HOT 1
- [Windows] Calling destroy() method is crashing the app and app is not responding anymore.
- Exception has occurred HOT 2
- [Feature-Request] Work together with "desktop_multi_window".(希望多窗口应用也能使用window_manager)
- [Linux] setFullScreen not working in some cases
- [Windows] Use frameless window to implement fullscreen
- 初始的时候最大化窗口,再setFullScreen(false)的时候,窗口异常
- The `fullScreen` is not functioning properly. HOT 3
- Can I listen to the current window being blocked
- The example crashes on linux with flutter 3.22 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from window_manager.