Fix blur/contrast for X11 window if Xwayland is not scaled.
X property from X11 window contains X native coordinates. Need to apply transform to use them in the effects like blur/contrast. BUG:461021
This commit is contained in:
parent
b0d04895cc
commit
fda53d8253
2 changed files with 4 additions and 2 deletions
|
@ -10,6 +10,7 @@
|
|||
#include "contrastshader.h"
|
||||
// KConfigSkeleton
|
||||
|
||||
#include "utils/xcbutils.h"
|
||||
#include "wayland/contrast_interface.h"
|
||||
#include "wayland/display.h"
|
||||
#include "wayland/surface_interface.h"
|
||||
|
@ -113,7 +114,7 @@ void ContrastEffect::updateContrastRegion(EffectWindow *w)
|
|||
int y = cardinals[i++];
|
||||
int w = cardinals[i++];
|
||||
int h = cardinals[i++];
|
||||
region += QRect(x, y, w, h);
|
||||
region += Xcb::fromXNative(QRect(x, y, w, h)).toRect();
|
||||
}
|
||||
|
||||
for (unsigned int j = 0; j < 16; ++j) {
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
// KConfigSkeleton
|
||||
#include "blurconfig.h"
|
||||
|
||||
#include "utils/xcbutils.h"
|
||||
#include "wayland/blur_interface.h"
|
||||
#include "wayland/display.h"
|
||||
#include "wayland/surface_interface.h"
|
||||
|
@ -294,7 +295,7 @@ void BlurEffect::updateBlurRegion(EffectWindow *w)
|
|||
int y = cardinals[i++];
|
||||
int w = cardinals[i++];
|
||||
int h = cardinals[i++];
|
||||
region += QRect(x, y, w, h);
|
||||
region += Xcb::fromXNative(QRect(x, y, w, h)).toRect();
|
||||
}
|
||||
}
|
||||
valid = !value.isNull();
|
||||
|
|
Loading…
Reference in a new issue