pull/3/head 0.1
revenmartin 4 years ago
parent d4f30145ed
commit 9d550310e8

@ -7,8 +7,8 @@
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
sodipodi:docname="minimize.svg"
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)"
sodipodi:docname="minimize_normal.svg"
inkscape:version="1.0.2 (e86c870879, 2021-01-15)"
id="svg8"
version="1.1"
viewBox="0 0 7.9374997 7.9375002"
@ -20,9 +20,9 @@
inkscape:document-rotation="0"
inkscape:pagecheckerboard="false"
inkscape:window-maximized="1"
inkscape:window-y="0"
inkscape:window-y="42"
inkscape:window-x="0"
inkscape:window-height="1304"
inkscape:window-height="1233"
inkscape:window-width="2160"
units="px"
showgrid="false"
@ -70,9 +70,9 @@
id="4-7" />
<polygon
fill="#CACBCE"
points="25,20 25,19 24.529,19 15.471,19 15,19 15,20 15.471,20 24.529,20 "
points="15,19 15,20 15.471,20 24.529,20 25,20 25,19 24.529,19 15.471,19 "
id="polygon2"
transform="matrix(0.36896569,0,0,0.26458333,-3.4105638,287.87186)"
style="fill:#CACBCE;fill-opacity:1" />
transform="matrix(0.36896569,0,0,0.33072917,-3.4105638,286.58201)"
style="fill:#cacbce;fill-opacity:1" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

@ -8,8 +8,8 @@
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
sodipodi:docname="maximize.svg"
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)"
sodipodi:docname="maximize_normal.svg"
inkscape:version="1.0.2 (e86c870879, 2021-01-15)"
id="svg8"
version="1.1"
viewBox="0 0 7.9374997 7.9375002"
@ -30,9 +30,9 @@
inkscape:document-rotation="0"
inkscape:pagecheckerboard="false"
inkscape:window-maximized="1"
inkscape:window-y="0"
inkscape:window-y="42"
inkscape:window-x="0"
inkscape:window-height="1304"
inkscape:window-height="1226"
inkscape:window-width="2160"
units="px"
showgrid="false"
@ -87,7 +87,7 @@
y="294.87387"
ry="4.4795979e-06" />
<rect
style="opacity:0.9;fill:none;stroke:#383838;stroke-width:0.26458333;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
style="opacity:1;fill:none;stroke:#383838;stroke-width:0.26458333;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect837"
width="3.2839999"
height="2.6270001"

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

@ -7,8 +7,8 @@
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
sodipodi:docname="minimize.svg"
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)"
sodipodi:docname="minimize_normal.svg"
inkscape:version="1.0.2 (e86c870879, 2021-01-15)"
id="svg8"
version="1.1"
viewBox="0 0 7.9374997 7.9375002"
@ -20,9 +20,9 @@
inkscape:document-rotation="0"
inkscape:pagecheckerboard="false"
inkscape:window-maximized="1"
inkscape:window-y="0"
inkscape:window-y="42"
inkscape:window-x="0"
inkscape:window-height="1304"
inkscape:window-height="1233"
inkscape:window-width="2160"
units="px"
showgrid="false"
@ -70,9 +70,9 @@
id="4-7" />
<polygon
fill="#303030"
points="25,20 25,19 24.529,19 15.471,19 15,19 15,20 15.471,20 24.529,20 "
points="15,20 15.471,20 24.529,20 25,20 25,19 24.529,19 15.471,19 15,19 "
id="polygon2"
transform="matrix(0.36896569,0,0,0.26458333,-3.4105638,287.87186)"
style="fill:#383838;fill-opacity:1" />
transform="matrix(0.36896569,0,0,0.33072917,-3.4105638,286.58201)"
style="opacity:1;fill:#383838;fill-opacity:1" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

@ -1,33 +1,7 @@
function rectContains(rect1, rect2) {
rect1.right = rect1.x + rect1.width - 1;
rect1.bottom = rect1.y + rect1.height - 1;
rect2.right = rect2.x + rect2.width - 1;
rect2.bottom = rect2.y + rect2.height - 1;
if (rect1.x != rect2.x)
return false;
if (rect1.y != rect2.y)
return false;
if (rect1.right != rect2.right)
return false;
if (rect1.bottom != rect2.bottom)
return false;
return true;
}
function forceFullScreen(client) {
var newGeometry = client.geometry;
var screen = client.screen;
var screenGeometry = workspace.clientArea(KWin.ScreenArea, screen, 0);
if (!rectContains(screenGeometry, newGeometry)) {
newGeometry.x = screenGeometry.x;
newGeometry.y = screenGeometry.y;
newGeometry.width = screenGeometry.width;
newGeometry.height = screenGeometry.height;
client.geometry = newGeometry;
}
client.geometry = screenGeometry;
}
function setupConnection(client) {
@ -45,6 +19,6 @@ function setupConnection(client) {
workspace.clientAdded.connect(setupConnection);
// connect all existing clients
var clients = workspace.clientList();
for (var i=0; i<clients.length; i++) {
for (var i = 0; i < clients.length; i++) {
setupConnection(clients[i]);
}
Loading…
Cancel
Save