|
|
@ -98,14 +98,23 @@ namespace Avalonia.X11 |
|
|
valueMask |= SetWindowValuemask.ColorMap; |
|
|
valueMask |= SetWindowValuemask.ColorMap; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
_handle = XCreateWindow(_x11.Display, _x11.RootWindow, 10, 10, 300, 200, 0, |
|
|
int defaultWidth = 300, defaultHeight = 200; |
|
|
|
|
|
|
|
|
|
|
|
if (!_popup) |
|
|
|
|
|
{ |
|
|
|
|
|
// Emulate Window 7+'s default window size behavior.
|
|
|
|
|
|
defaultWidth = (int)(MaxClientSize.Width * 0.75d); |
|
|
|
|
|
defaultHeight = (int)(MaxClientSize.Height * 0.7d); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
_handle = XCreateWindow(_x11.Display, _x11.RootWindow, 10, 10, defaultWidth, defaultHeight, 0, |
|
|
depth, |
|
|
depth, |
|
|
(int)CreateWindowArgs.InputOutput, |
|
|
(int)CreateWindowArgs.InputOutput, |
|
|
visual, |
|
|
visual, |
|
|
new UIntPtr((uint)valueMask), ref attr); |
|
|
new UIntPtr((uint)valueMask), ref attr); |
|
|
|
|
|
|
|
|
if (_useRenderWindow) |
|
|
if (_useRenderWindow) |
|
|
_renderHandle = XCreateWindow(_x11.Display, _handle, 0, 0, 300, 200, 0, depth, |
|
|
_renderHandle = XCreateWindow(_x11.Display, _handle, 0, 0, defaultWidth, defaultHeight, 0, depth, |
|
|
(int)CreateWindowArgs.InputOutput, |
|
|
(int)CreateWindowArgs.InputOutput, |
|
|
visual, |
|
|
visual, |
|
|
new UIntPtr((uint)(SetWindowValuemask.BorderPixel | SetWindowValuemask.BitGravity | |
|
|
new UIntPtr((uint)(SetWindowValuemask.BorderPixel | SetWindowValuemask.BitGravity | |
|
|
|