Skip to content
Snippets Groups Projects
  • Andreas Traczyk's avatar
    35482fa9
    misc: implement frameless window · 35482fa9
    Andreas Traczyk authored
    Several major changes to the layout have been made.
    - The chat search bar is moved into the message search layout.
    - The Searchbar component is stripped of unused features.
    - Some remaining logic that was used to switch main loader components is removed.
    - ViewCoordinator.getView gets a "force create" parameter and we no longer preload low-cost views.
    
    NOTE: the option to use a frameless window is available within general settings
    
    Gitlab: #1524 (Frameless Window)
    Change-Id: Iec6bdf162cb0335d3ae3d9bd09dd9783991a4a57
    35482fa9
    History
    misc: implement frameless window
    Andreas Traczyk authored
    Several major changes to the layout have been made.
    - The chat search bar is moved into the message search layout.
    - The Searchbar component is stripped of unused features.
    - Some remaining logic that was used to switch main loader components is removed.
    - ViewCoordinator.getView gets a "force create" parameter and we no longer preload low-cost views.
    
    NOTE: the option to use a frameless window is available within general settings
    
    Gitlab: #1524 (Frameless Window)
    Change-Id: Iec6bdf162cb0335d3ae3d9bd09dd9783991a4a57
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
0002-workaround-right-margin.patch 1.18 KiB
From ca2be6466c150d1b82a646d97b27df35b45d90f1 Mon Sep 17 00:00:00 2001
From: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
Date: Tue, 9 Jan 2024 15:25:19 -0500
Subject: [PATCH] workaround right margin

---
 src/core/contexts/win32windowcontext.cpp | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/src/core/contexts/win32windowcontext.cpp b/src/core/contexts/win32windowcontext.cpp
index 3f6623e..9ee7752 100644
--- a/src/core/contexts/win32windowcontext.cpp
+++ b/src/core/contexts/win32windowcontext.cpp
@@ -402,6 +402,17 @@ namespace QWK {
                     return true;
                 }
             }
+
+#if !QWINDOWKIT_CONFIG(ENABLE_WINDOWS_SYSTEM_BORDERS)
+            if (msg->message == WM_MOVE || msg->message == WM_SIZE ||
+                (msg->message == WM_IME_SETCONTEXT && (GetForegroundWindow() == msg->hwnd))) {
+                static const auto flags = SWP_FRAMECHANGED | SWP_NOMOVE |
+                                          SWP_NOSIZE | SWP_NOZORDER |
+                                          SWP_NOOWNERZORDER;
+                SetWindowPos(msg->hwnd, NULL, 0, 0, 0, 0, flags);
+            }
+#endif
+
             return false;
         }

--
2.7.4