Initial window position without content fix for #279 #281

Closed
wants to merge 1 commit into from

2 participants

@DavidKarlas
Mono Project member

If window has Content everything is same except "} else if (locationSet && !shown)" where !shown is removed because it didn't make sense because it was always true but actually false(see code at start of method)

Atm InitialLocationManualWithoutContentAndSize is failing for WPF because there is some bug in WPFBackend.Move method compering to WPFBackend.Bounds(called when Size is set)
I think it's somehow connected to Xwt.WPFBackend.WpfWindow.initialX not being set by Move method.

All 3 methods are failing for GTK because known bug of 8px offset.

@sevoku
Mono Project member

Has it been solved by #393?

@DavidKarlas
Mono Project member

Looks like it fixed but https://github.com/mono/xwt/blob/master/Xwt/Xwt/Window.cs#L251 is still wrong(shown = true is called few lines above).

@sevoku
Mono Project member

True, but not really a bug (shown is always true there)(?)
Have you tried your unit tests against the current master? Maybe they could be merged.

@DavidKarlas
Mono Project member

This 3 tests...

  • Wpf: Works OK
  • Gtk:
    • Windows: Unit tests are not running(BadImageFormat...)(Changing stuff to x86 didn't help)
    • Mac: Works OK
    • Linux: Works OK
  • MonoMac: ToDesktopRect changes Y from 230 to 548(because I have MacBook with 900 pixel hight)
@sevoku
Mono Project member

Ok, thanks! Could you create PRs (and split the commit) for the #L251 fix and maybe the unit tests? This one can be closed then.

Does the Mac ToDesktopRect need a fix (I have no Mac, testing my stuff in a VM)?

Looks like the GtkTestRunner needs a separate project configuration for windows.

@DavidKarlas
Mono Project member

About ToDesktopRect... Not sure what is reason for that inverse calculating of Y...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment