Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
kwin-tiling
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Christian Bay
kwin-tiling
Commits
88e54293
Commit
88e54293
authored
11 years ago
by
Fabian Homborg
Browse files
Options
Downloads
Patches
Plain Diff
Kill forcedFloating with fire.
This is completely unnecessary.
parent
c8295301
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
contents/code/tile.js
+1
-68
1 addition, 68 deletions
contents/code/tile.js
contents/code/tiling.js
+8
-13
8 additions, 13 deletions
contents/code/tiling.js
contents/code/tilingmanager.js
+1
-2
1 addition, 2 deletions
contents/code/tilingmanager.js
with
10 additions
and
83 deletions
contents/code/tile.js
+
1
−
68
View file @
88e54293
...
@@ -55,12 +55,6 @@ function Tile(firstClient, tileIndex) {
...
@@ -55,12 +55,6 @@ function Tile(firstClient, tileIndex) {
* of something different to a user move or resize action.
* of something different to a user move or resize action.
*/
*/
this
.
geometryChanged
=
new
Signal
();
this
.
geometryChanged
=
new
Signal
();
/**
* Signal which is triggered whenever the tile forced floating state
* changes. Two parameters are passed to the handlers, the old and the new
* forced floating state.
*/
this
.
forcedFloatingChanged
=
new
Signal
();
/**
/**
* Signal which is triggered whenever the tile is moved to a different
* Signal which is triggered whenever the tile is moved to a different
* screen. Two parameters are passed to the handlers, the old and the new
* screen. Two parameters are passed to the handlers, the old and the new
...
@@ -81,10 +75,6 @@ function Tile(firstClient, tileIndex) {
...
@@ -81,10 +75,6 @@ function Tile(firstClient, tileIndex) {
* Index of this tile in the TileList to which the tile belongs.
* Index of this tile in the TileList to which the tile belongs.
*/
*/
this
.
tileIndex
=
tileIndex
;
this
.
tileIndex
=
tileIndex
;
/**
* True if this tile has to be floating because of client properties.
*/
this
.
forcedFloating
=
this
.
_computeForcedFloating
();
/**
/**
* True if this tile is currently moved by the user.
* True if this tile is currently moved by the user.
*/
*/
...
@@ -170,39 +160,7 @@ Tile.prototype.syncCustomProperties = function() {
...
@@ -170,39 +160,7 @@ Tile.prototype.syncCustomProperties = function() {
this
.
clients
[
0
].
tiling_tileIndex
=
this
.
tileIndex
;
this
.
clients
[
0
].
tiling_tileIndex
=
this
.
tileIndex
;
this
.
clients
[
0
].
syncTabGroupFor
(
"
tiling_tileIndex
"
,
true
);
this
.
clients
[
0
].
syncTabGroupFor
(
"
tiling_tileIndex
"
,
true
);
this
.
clients
[
0
].
syncTabGroupFor
(
"
tiling_floating
"
,
true
);
this
.
clients
[
0
].
syncTabGroupFor
(
"
tiling_floating
"
,
true
);
};
this
.
clients
[
0
].
syncTabGroupFor
(
"
fullScreen
"
,
true
);
Tile
.
prototype
.
_computeForcedFloating
=
function
()
{
var
forcedFloating
=
false
;
this
.
clients
.
forEach
(
function
(
client
)
{
if
(
client
.
shade
||
client
.
minimized
||
client
.
keepAbove
||
client
.
fullScreen
||
!
client
.
resizeable
)
{
forcedFloating
=
true
;
}
});
return
forcedFloating
;
};
Tile
.
prototype
.
_recomputeForcedFloating
=
function
(
client
)
{
var
forcedFloating
=
false
;
if
(
client
.
shade
||
client
.
minimized
||
client
.
keepAbove
||
client
.
fullScreen
||
!
client
.
resizeable
)
{
forcedFloating
=
true
;
}
return
forcedFloating
;
}
Tile
.
prototype
.
_updateForcedFloating
=
function
()
{
var
forcedFloating
=
this
.
_computeForcedFloating
();
if
(
forcedFloating
==
this
.
forcedFloating
)
{
return
;
}
this
.
forcedFloating
=
forcedFloating
;
this
.
forcedFloatingChanged
.
emit
(
!
forcedFloating
,
forcedFloating
);
};
Tile
.
prototype
.
onClientShadeChanged
=
function
(
client
)
{
this
.
_recomputeForcedFloating
(
client
);
};
};
Tile
.
prototype
.
onClientGeometryChanged
=
function
(
client
)
{
Tile
.
prototype
.
onClientGeometryChanged
=
function
(
client
)
{
...
@@ -231,31 +189,6 @@ Tile.prototype.onClientGeometryChanged = function(client) {
...
@@ -231,31 +189,6 @@ Tile.prototype.onClientGeometryChanged = function(client) {
this
.
geometryChanged
.
emit
();
this
.
geometryChanged
.
emit
();
};
};
/*
Tile.prototype.onClientKeepAboveChanged = function(client) {
this._recomputeForcedFloating(client);
};
Tile.prototype.onClientKeepBelowChanged = function(client) {
// TODO: Only floating clients are not below all others
};
Tile.prototype.onClientFullScreenChanged = function(client) {
// Let fullscreen windows stay _above_ others
client.keepAbove = client.fullScreen;
client.keepBelow = !client.fullScreen;
this._recomputeForcedFloating(client);
};
*/
Tile
.
prototype
.
onClientMinimizedChanged
=
function
(
client
)
{
this
.
_recomputeForcedFloating
(
client
);
};
Tile
.
prototype
.
onClientMaximizedStateChanged
=
function
(
client
)
{
// TODO: Make tiles floating as soon as the user maximizes them
};
Tile
.
prototype
.
onClientDesktopChanged
=
function
(
client
)
{
Tile
.
prototype
.
onClientDesktopChanged
=
function
(
client
)
{
if
(
!
client
.
isCurrentTab
)
{
if
(
!
client
.
isCurrentTab
)
{
return
;
return
;
...
...
This diff is collapsed.
Click to expand it.
contents/code/tiling.js
+
8
−
13
View file @
88e54293
...
@@ -163,21 +163,16 @@ Tiling.prototype.getTiles = function() {
...
@@ -163,21 +163,16 @@ Tiling.prototype.getTiles = function() {
}
}
Tiling
.
prototype
.
getAdjacentTile
=
function
(
from
,
direction
,
directOnly
)
{
Tiling
.
prototype
.
getAdjacentTile
=
function
(
from
,
direction
,
directOnly
)
{
if
(
from
.
forcedFloating
)
{
var
index
=
this
.
tiles
.
indexOf
(
from
);
var
geometry
=
this
.
layout
.
tiles
[
index
];
var
nextIndex
=
geometry
.
neighbours
[
direction
];
if
(
!
geometry
.
hasDirectNeighbour
&&
!
directOnly
)
{
// This is not a direct neighbour (wrap-around situation), so cycle
// through the floating windows first
// TODO
// TODO
print
(
"
TODO: getAdjacentTile()
(floating tile)
"
);
print
(
"
TODO: getAdjacentTile()
: Not a direct neighbour!
"
);
}
else
{
}
else
{
var
index
=
this
.
tiles
.
indexOf
(
from
);
return
this
.
tiles
[
nextIndex
];
var
geometry
=
this
.
layout
.
tiles
[
index
];
var
nextIndex
=
geometry
.
neighbours
[
direction
];
if
(
!
geometry
.
hasDirectNeighbour
&&
!
directOnly
)
{
// This is not a direct neighbour (wrap-around situation), so cycle
// through the floating windows first
// TODO
print
(
"
TODO: getAdjacentTile(): Not a direct neighbour!
"
);
}
else
{
return
this
.
tiles
[
nextIndex
];
}
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
contents/code/tilingmanager.js
+
1
−
2
View file @
88e54293
...
@@ -491,8 +491,7 @@ TilingManager.prototype._moveTile = function(direction) {
...
@@ -491,8 +491,7 @@ TilingManager.prototype._moveTile = function(direction) {
return
;
return
;
}
}
var
activeTile
=
this
.
tiles
.
getTile
(
client
);
var
activeTile
=
this
.
tiles
.
getTile
(
client
);
if
(
activeTile
==
null
if
(
activeTile
==
null
)
{
||
activeTile
.
forcedFloating
)
{
print
(
"
Tile is floating
"
);
print
(
"
Tile is floating
"
);
return
;
return
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment