https://bugs.documentfoundation.org/show_bug.cgi?id=141381

--- Comment #8 from [email protected] ---
Created attachment 205757
  --> https://bugs.documentfoundation.org/attachment.cgi?id=205757&action=edit
Screenshot of patched csv-import dialogue

Proof of Concept & Question regarding scope

I investigated the Windows VCL backend (vcl/win/window/salframe.cxx). The issue
is caused by an explicit check in SalFrame::UpdateStyle that suppresses the
WS_MAXIMIZEBOX style for child windows (!hWndParent), even if they are flagged
as SIZEABLE.

Observation regarding Window Managers:
I noted that on permissive Window Managers (like KWin on Linux), these dialogs
already have a maximize button. This proves that LibreOffice Core logically
supports maximizing these dialogs, and that the restriction was artificially
enforced by the Windows VCL backend.

My Test:
As a proof of concept, I removed this Windows-specific restriction locally.
Result: The maximize button now appears on Windows. The dialog remains
correctly modal, but the UI is now consistent with the SIZEABLE flag.

Code Change for the attached screenshot:

```
diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx
index 603c57048544..a551e4b09926 100644
--- a/vcl/win/window/salframe.cxx
+++ b/vcl/win/window/salframe.cxx
@@ -372,9 +372,7 @@ SalFrame* ImplSalCreateFrame( WinSalInstance* pInst,
             if ( nSalFrameStyle & SalFrameStyleFlags::SIZEABLE )
             {
                 pFrame->mbSizeBorder = true;
-                nSysStyle |= WS_THICKFRAME;
-                if ( !hWndParent )
-                    nSysStyle |= WS_MAXIMIZEBOX;
+                nSysStyle |= (WS_THICKFRAME | WS_MAXIMIZEBOX);
             }
             else
                 pFrame->mbFixBorder = true;
```
My Question:
This change enables the maximize button for all resizable dialogs on Windows
(aligning with behavior on KWin/X11).
Is this generally acceptable, or should I implement a stricter check (e.g.
relying on an explicit .ui property) to avoid affecting dialogs that are
implicitly resizable but shouldn't be maximized?

I'd appreciate some guidance on how to proceed with this.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to