Closed Bug 1306332 Opened 4 years ago Closed 4 years ago

Setting Max Window Size Hints disables maximize button in VcXsrv

Categories

(Core :: Widget: Gtk, defect)

49 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla52
Tracking Status
firefox52 --- fixed

People

(Reporter: doncuppjr, Unassigned)

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36

Steps to reproduce:

Connect to a remote Xserver on Windows(VcXsrv).


Actual results:

The window maximize button is disabled.


Expected results:

The maximize button should allow the window to grow to the maximum size of the screen.
Working with mstange, a patch was created to resolve this issue, but it is unknown if the patch creates other issues.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Donald, I've made a few changes to the patch. Can you test this version and check whether it still fixes your problem?
Markus, This patch does what I need it to do in it's new form. Tested:Works
Comment on attachment 8796259 [details]
Bug 1306332 - Don't set a maximum size on the native window if SetSizeConstraints is called with magical "unconstrained" values.

https://reviewboard.mozilla.org/r/82164/#review81164

Looks good, thanks!

::: widget/gtk/nsWindow.cpp:1049
(Diff revision 1)
> +          hints |= GDK_HINT_MIN_SIZE;
> +        }
> +        if (aConstraints.mMaxSize != LayoutDeviceIntSize(NS_MAXSIZE, NS_MAXSIZE)) {
> +          hints |= GDK_HINT_MAX_SIZE;

This file uses 4 space indents, so please follow that.

::: widget/gtk/nsWindow.cpp:1051
(Diff revision 1)
>  
> -        uint32_t hints = GDK_HINT_MIN_SIZE | GDK_HINT_MAX_SIZE;
> +        uint32_t hints = 0;
> +        if (aConstraints.mMinSize != LayoutDeviceIntSize(0, 0)) {
> +          hints |= GDK_HINT_MIN_SIZE;
> +        }
> +        if (aConstraints.mMaxSize != LayoutDeviceIntSize(NS_MAXSIZE, NS_MAXSIZE)) {

Please wrap to stay with 80 columns.
Attachment #8796259 - Flags: review?(karlt) → review+
Pushed by mstange@themasta.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/0b941c91a86a
Don't set a maximum size on the native window if SetSizeConstraints is called with magical "unconstrained" values. r=karlt
https://hg.mozilla.org/mozilla-central/rev/0b941c91a86a
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
You need to log in before you can comment on or make changes to this bug.