Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into window-rules
Browse files Browse the repository at this point in the history
  • Loading branch information
taj-ny committed Nov 24, 2024
2 parents 9b1ca22 + 669ba87 commit 81e7f2d
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/arch-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
paths-ignore: [ "**.md" ]
pull_request:
branches: [ main ]
paths: [ "**/arch-linux.yml" ]
paths-ignore: [ "**.md" ]
schedule:
- cron: "0 0 * * *"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fedora-40.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
paths-ignore: [ "**.md" ]
pull_request:
branches: [ main ]
paths: [ "**/fedora-40.yml" ]
paths-ignore: [ "**.md" ]
schedule:
- cron: "0 0 * * *"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nixos-plasma-6-0-5.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
paths-ignore: [ "**.md" ]
pull_request:
branches: [ main ]
paths: [ "**/nixos-plasma-6-0-5.yml" ]
paths-ignore: [ "**.md" ]
schedule:
- cron: "0 0 * * *"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nixos-plasma-6-1-5.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
paths-ignore: [ "**.md" ]
pull_request:
branches: [ main ]
paths: [ "**/nixos-plasma-6-1-5.yml" ]
paths-ignore: [ "**.md" ]
schedule:
- cron: "0 0 * * *"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nixos-unstable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
paths-ignore: [ "**.md" ]
pull_request:
branches: [ main ]
paths: [ "**/nixos-unstable.yml" ]
paths-ignore: [ "**.md" ]
schedule:
- cron: "0 0 * * *"

Expand Down
9 changes: 5 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,11 @@ find_package(KWin REQUIRED COMPONENTS
kwineffects
)

if(${KWin_VERSION} VERSION_LESS_EQUAL 6.0.5)
add_compile_definitions(KWIN_6_0)
elseif(${KWin_VERSION} VERSION_LESS_EQUAL 6.1.5)
add_compile_definitions(KWIN_6_1)
if(${KWin_VERSION} VERSION_GREATER_EQUAL 6.0.90)
add_compile_definitions(KWIN_6_1_OR_GREATER)
endif()
if(${KWin_VERSION} VERSION_GREATER_EQUAL 6.1.90)
add_compile_definitions(KWIN_6_2_OR_GREATER)
endif()

find_package(KDecoration2 REQUIRED)
Expand Down
14 changes: 7 additions & 7 deletions src/blur.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -335,10 +335,10 @@ bool BlurEffect::enabledByDefault()

bool BlurEffect::supported()
{
#ifdef KWIN_6_0
return effects->isOpenGLCompositing() && GLFramebuffer::supported() && GLFramebuffer::blitSupported();
#else
#ifdef KWIN_6_1_OR_GREATER
return effects->openglContext() && (effects->openglContext()->supportsBlits() || effects->waylandDisplay());
#else
return effects->isOpenGLCompositing() && GLFramebuffer::supported() && GLFramebuffer::blitSupported();
#endif
}

Expand Down Expand Up @@ -879,10 +879,10 @@ GLTexture *BlurEffect::wallpaper(EffectWindow *desktop, const qreal &scale, cons
const RenderViewport renderViewport(desktop->frameGeometry(), scale, renderTarget);
WindowPaintData data;

#ifdef KWIN_6_0
#ifndef KWIN_6_1_OR_GREATER
QMatrix4x4 projectionMatrix;
projectionMatrix.ortho(geometry);
data.setProjectionMatrix(projectionMatrix);
projectionMatrix.ortho(geometry);
data.setProjectionMatrix(projectionMatrix);
#endif

GLFramebuffer::pushFramebuffer(desktopFramebuffer.get());
Expand Down Expand Up @@ -928,7 +928,7 @@ GLTexture *BlurEffect::createStaticBlurTextureWayland(const Output *output, cons
auto *shader = ShaderManager::instance()->pushShader(ShaderTrait::MapTexture | ShaderTrait::TransformColorspace);
shader->setColorspaceUniforms(
ColorDescription::sRGB, renderTarget.colorDescription()
#if !(defined(KWIN_6_1) || defined(KWIN_6_0))
#ifdef KWIN_6_2_OR_GREATER
, RenderingIntent::RelativeColorimetricWithBPC
#endif
);
Expand Down

0 comments on commit 81e7f2d

Please sign in to comment.