mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2025-01-26 03:36:32 +11:00
X11: Fix flickering when resizing with transparency enabled (#546)
* X11: Fix flickering when resizing with transparency enabled * X11: Fix with_override_redirect
This commit is contained in:
parent
bf413ecb83
commit
19dd961752
2 changed files with 4 additions and 9 deletions
|
@ -3,8 +3,10 @@
|
||||||
- On X11, the `Moved` event is no longer sent when the window is resized without changing position.
|
- On X11, the `Moved` event is no longer sent when the window is resized without changing position.
|
||||||
- `MouseCursor` and `CursorState` now implement `Default`.
|
- `MouseCursor` and `CursorState` now implement `Default`.
|
||||||
- `WindowBuilder::with_resizable` implemented for Windows.
|
- `WindowBuilder::with_resizable` implemented for Windows.
|
||||||
- On X11, if width or height is reported as 0, the DPI is now 1.0 instead of +inf.
|
- On X11, if the monitor's width or height in millimeters is reported as 0, the DPI is now 1.0 instead of +inf.
|
||||||
- On X11, the environment variable `WINIT_HIDPI_FACTOR` has been added for overriding DPI factor.
|
- On X11, the environment variable `WINIT_HIDPI_FACTOR` has been added for overriding DPI factor.
|
||||||
|
- On X11, enabling transparency no longer causes the window contents to flicker when resizing.
|
||||||
|
- On X11, `with_override_redirect` now actually enables override redirect.
|
||||||
|
|
||||||
# Version 0.15.0 (2018-05-22)
|
# Version 0.15.0 (2018-05-22)
|
||||||
|
|
||||||
|
|
|
@ -102,19 +102,12 @@ impl UnownedWindow {
|
||||||
| ffi::ButtonReleaseMask
|
| ffi::ButtonReleaseMask
|
||||||
| ffi::PointerMotionMask;
|
| ffi::PointerMotionMask;
|
||||||
swa.border_pixel = 0;
|
swa.border_pixel = 0;
|
||||||
if window_attrs.transparent {
|
swa.override_redirect = pl_attribs.override_redirect as c_int;
|
||||||
swa.background_pixel = 0;
|
|
||||||
}
|
|
||||||
swa.override_redirect = 0;
|
|
||||||
swa
|
swa
|
||||||
};
|
};
|
||||||
|
|
||||||
let mut window_attributes = ffi::CWBorderPixel | ffi::CWColormap | ffi::CWEventMask;
|
let mut window_attributes = ffi::CWBorderPixel | ffi::CWColormap | ffi::CWEventMask;
|
||||||
|
|
||||||
if window_attrs.transparent {
|
|
||||||
window_attributes |= ffi::CWBackPixel;
|
|
||||||
}
|
|
||||||
|
|
||||||
if pl_attribs.override_redirect {
|
if pl_attribs.override_redirect {
|
||||||
window_attributes |= ffi::CWOverrideRedirect;
|
window_attributes |= ffi::CWOverrideRedirect;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue