Skip to content

Commit

Permalink
Merge branch 'master' into tiles
Browse files Browse the repository at this point in the history
  • Loading branch information
matinlotfali authored Dec 12, 2023
2 parents 4b0a817 + 64c2c3d commit 2b2ac62
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 12 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/arch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ name: ArchLinux

on:
push:
branches: [ master, latest-shapecorners-code, kwin_5.23, kwin_5.24, kwin_5.25 ]
branches: [ master ]
paths-ignore: [ '**.md', '**.png' ]
pull_request:
branches: [ master ]
paths-ignore: [ '**.md', '**.png' ]
schedule:
- cron: "0 0 * * *"

Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/debian12.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ name: Debian 12

on:
push:
branches: [ master, latest-shapecorners-code, kwin_5.23, kwin_5.24, kwin_5.25 ]
branches: [ master ]
paths-ignore: [ '**.md', '**.png' ]
pull_request:
branches: [ master ]
paths-ignore: [ '**.md', '**.png' ]
schedule:
- cron: "0 0 * * *"

Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/glslangValidator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ name: GLSL Validator

on:
push:
branches: [ master, latest-shapecorners-code, kwin_5.23 ]
branches: [ master ]
paths: [ '**.frag' ]
pull_request:
branches: [ master ]
paths: [ '**.frag' ]

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/kubuntu2204-backports.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ name: Kubuntu 22.04 Backports

on:
push:
branches: [ master, latest-shapecorners-code, kwin_5.24 ]
branches: [ master ]
paths-ignore: [ '**.md', '**.png' ]
pull_request:
branches: [ master ]
paths-ignore: [ '**.md', '**.png' ]
schedule:
- cron: "0 0 * * *"

Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/neon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ name: KDE Neon (Stable)

on:
push:
branches: [ master, latest-shapecorners-code, kwin_5.23, kwin_5.24, kwin_5.25 ]
branches: [ master ]
paths-ignore: [ '**.md', '**.png' ]
pull_request:
branches: [ master ]
paths-ignore: [ '**.md', '**.png' ]
schedule:
- cron: "0 0 * * *"

Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ You need to install development packages for your distribution first:
```
xbps-install git cmake make qt5-tools-devel extra-cmake-modules qt5-x11extras-devel gettext-devel kwin-devel
```
- **NixOS** - by [Pavel Zolotarevskiy](https://github.com/flexagoon)
```
nix-env -iA nixos.kde-rounded-corners
```


Then get the source code and compile:
```
git clone https://github.com/matinlotfali/KDE-Rounded-Corners
Expand Down
2 changes: 0 additions & 2 deletions src/ShapeCornersShader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ ShapeCornersShader::ShapeCornersShader():
// qDebug() << frag;
if (m_shader->isValid())
{
m_shader_windowHasDecoration = m_shader->uniformLocation("windowHasDecoration");
m_shader_disableRoundedTile = m_shader->uniformLocation("disableRoundedTile");
m_shader_windowSize = m_shader->uniformLocation("windowSize");
m_shader_windowExpandedSize = m_shader->uniformLocation("windowExpandedSize");
Expand Down Expand Up @@ -66,7 +65,6 @@ ShapeCornersShader::Bind(KWin::EffectWindow *w, bool isTiled) const {
m_shader->setUniform(m_shader_windowSize, QVector2D(w->frameGeometry().width(), w->frameGeometry().height()));
m_shader->setUniform(m_shader_windowExpandedSize, QVector2D(w->expandedGeometry().width(), w->expandedGeometry().height()));
m_shader->setUniform(m_shader_windowTopLeft, xy);
m_shader->setUniform(m_shader_windowHasDecoration, w->hasDecoration());
m_shader->setUniform(m_shader_disableRoundedTile, isTiled && ShapeCornersConfig::disableRoundTile());
m_shader->setUniform(m_shader_front, 0);
if (ShapeCornersEffect::isWindowActive(w)) {
Expand Down
1 change: 0 additions & 1 deletion src/ShapeCornersShader.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ class ShapeCornersShader {
int m_shader_windowSize = 0;
int m_shader_windowExpandedSize = 0;
int m_shader_windowTopLeft = 0;
int m_shader_windowHasDecoration = 0;
int m_shader_disableRoundedTile = 0;
int m_shader_shadowColor = 0;
int m_shader_shadowSize = 0;
Expand Down
3 changes: 1 addition & 2 deletions src/shaders_110/shapecorners.frag
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

uniform sampler2D front;
uniform float radius;
uniform bool windowHasDecoration;
uniform bool disableRoundedTile;
uniform vec2 windowSize;
uniform vec2 windowExpandedSize;
Expand All @@ -16,7 +15,7 @@ uniform float saturation;

varying vec2 texcoord0;

bool isDrawingShadows() { return windowHasDecoration && shadowColor.a > 0.0; }
bool isDrawingShadows() { return windowSize != windowExpandedSize && shadowColor.a > 0.0; }
bool isDrawingOutline() { return outlineColor.a > 0.0 && outlineThickness > 0.0; }

vec4 shadowCorner(float distance_from_center) {
Expand Down
3 changes: 1 addition & 2 deletions src/shaders_140/shapecorners.frag
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

uniform sampler2D front;
uniform float radius;
uniform bool windowHasDecoration;
uniform bool disableRoundedTile;
uniform vec2 windowSize;
uniform vec2 windowExpandedSize;
Expand All @@ -17,7 +16,7 @@ uniform float saturation;
in vec2 texcoord0;
out vec4 fragColor;

bool isDrawingShadows() { return windowHasDecoration && shadowColor.a > 0.0; }
bool isDrawingShadows() { return windowSize != windowExpandedSize && shadowColor.a > 0.0; }
bool isDrawingOutline() { return outlineColor.a > 0.0 && outlineThickness > 0.0; }

vec4 shadowCorner(float distance_from_center) {
Expand Down

0 comments on commit 2b2ac62

Please sign in to comment.