Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
plasma-phone-components
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
10
Issues
10
List
Boards
Labels
Milestones
Merge Requests
4
Merge Requests
4
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
KDE
plasma-phone-components
Commits
724389fa
Commit
724389fa
authored
Jun 19, 2015
by
Vishesh Handa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove the compositor
Made obsolete by kwin
parent
25ae67d7
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
2 additions
and
843 deletions
+2
-843
CMakeLists.txt
CMakeLists.txt
+0
-7
compositor/ClientWindowWrapper.qml
compositor/ClientWindowWrapper.qml
+0
-75
compositor/Compositor.qml
compositor/Compositor.qml
+0
-378
compositor/ShellWindowWrapper.qml
compositor/ShellWindowWrapper.qml
+0
-24
compositor/WindowManagement.js
compositor/WindowManagement.js
+0
-280
compositor/WindowWrapper.qml
compositor/WindowWrapper.qml
+0
-54
compositor/klogo.png
compositor/klogo.png
+0
-0
services/CMakeLists.txt
services/CMakeLists.txt
+0
-1
services/plasma-phone-compositor.service.cmake
services/plasma-phone-compositor.service.cmake
+0
-22
services/plasma-phone-ui.service.cmake
services/plasma-phone-ui.service.cmake
+2
-2
No files found.
CMakeLists.txt
View file @
724389fa
...
@@ -41,13 +41,6 @@ plasma_install_package(look-and-feel org.kde.plasma.phone look-and-feel)
...
@@ -41,13 +41,6 @@ plasma_install_package(look-and-feel org.kde.plasma.phone look-and-feel)
plasma_install_package
(
shell org.kde.plasma.phone shells
)
plasma_install_package
(
shell org.kde.plasma.phone shells
)
install
(
DIRECTORY wallpaper/ DESTINATION
"
${
WALLPAPER_INSTALL_DIR
}
/org.kde.plasma.phone.lockers"
)
install
(
DIRECTORY wallpaper/ DESTINATION
"
${
WALLPAPER_INSTALL_DIR
}
/org.kde.plasma.phone.lockers"
)
install
(
DIRECTORY compositor/
DESTINATION
${
DATA_INSTALL_DIR
}
/greenisland/org.kde.plasma.phone.compositor
PATTERN .svn EXCLUDE
PATTERN CMakeLists.txt EXCLUDE
PATTERN Messages.sh EXCLUDE
PATTERN dummydata EXCLUDE
)
kpackage_install_package
(
phonebook org.kde.phone.phonebook genericqml
)
kpackage_install_package
(
phonebook org.kde.phone.phonebook genericqml
)
install
(
FILES phonebook/metadata.desktop DESTINATION
${
XDG_APPS_INSTALL_DIR
}
RENAME org.kde.phone.phonebook.desktop
)
install
(
FILES phonebook/metadata.desktop DESTINATION
${
XDG_APPS_INSTALL_DIR
}
RENAME org.kde.phone.phonebook.desktop
)
...
...
compositor/ClientWindowWrapper.qml
deleted
100644 → 0
View file @
25ae67d7
/*
* Copyright 2014 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
* published by the Free Software Foundation; either version 2, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details
*
* You should have received a copy of the GNU Library General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import
QtQuick
2.0
import
org
.
kde
.
plasma
.
core
2.0
as
PlasmaCore
WindowWrapper
{
id
:
window
objectName
:
"
clientWindow
"
onXChanged
:
{
if
(
compositorRoot
.
currentWindow
==
window
)
{
compositorRoot
.
layers
.
windows
.
contentX
=
x
;
}
}
Behavior
on
y
{
enabled
:
!
mouse
.
active
SequentialAnimation
{
NumberAnimation
{
easing.type
:
"
InOutQuad
"
duration
:
units
.
longDuration
}
ScriptAction
{
script
:
{
if
(
window
.
opacity
<
0.3
)
{
window
.
close
();
}
}
}
}
}
opacity
:
1
-
(
Math
.
abs
(
y
)
/
height
)
MouseArea
{
id
:
mouse
z
:
99
anchors.fill
:
parent
enabled
:
compositorRoot
.
layers
.
windows
.
switchMode
property
bool
active
onPressed
:
{
active
=
true
;
}
onClicked
:
{
compositorRoot
.
currentWindow
=
window
;
window
.
child
.
takeFocus
();
}
onReleased
:
{
active
=
false
;
if
(
window
.
opacity
<
0.3
)
{
window
.
y
=
(
window
.
y
>
0
?
+
1
:
-
1
)
*
window
.
height
;
}
else
{
window
.
y
=
0
;
}
}
drag
{
axis
:
Drag
.
YAxis
target
:
window
}
}
}
compositor/Compositor.qml
deleted
100644 → 0
View file @
25ae67d7
This diff is collapsed.
Click to expand it.
compositor/ShellWindowWrapper.qml
deleted
100644 → 0
View file @
25ae67d7
/*
* Copyright 2014 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
* published by the Free Software Foundation; either version 2, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details
*
* You should have received a copy of the GNU Library General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import
QtQuick
2.0
WindowWrapper
{
objectName
:
"
shellWindow
"
}
compositor/WindowManagement.js
deleted
100644 → 0
View file @
25ae67d7
/*
* Copyright 2014 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
* published by the Free Software Foundation; either version 2, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details
*
* You should have received a copy of the GNU Library General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
/*
* Main procedures
*/
function
surfaceMapped
(
surface
)
{
// Determine if it's a shell window
var
firstView
=
compositor
.
firstViewOf
(
surface
);
var
isShellWindow
=
(
typeof
(
firstView
.
role
)
!=
"
undefined
"
)
||
(
surface
.
className
==
"
plasmashell.desktop
"
);
// Print some information
if
(
surface
.
className
==
"
maliit-server.desktop
"
)
{
console
.
debug
(
"
Keyboard surface
"
,
surface
,
"
mapped
"
);
console
.
debug
(
"
\t
appId:
"
,
surface
.
className
);
console
.
debug
(
"
\t
title:
"
,
surface
.
title
);
console
.
debug
(
"
\t
size:
"
,
surface
.
size
.
width
+
"
x
"
+
surface
.
size
.
height
);
}
else
if
(
isShellWindow
)
{
console
.
debug
(
"
Shell surface
"
,
surface
,
"
mapped
"
);
console
.
debug
(
"
\t
role:
"
,
firstView
.
role
);
console
.
debug
(
"
\t
size:
"
,
surface
.
size
.
width
+
"
x
"
+
surface
.
size
.
height
);
}
else
{
console
.
debug
(
"
Application surface
"
,
surface
,
"
mapped
"
);
console
.
debug
(
"
\t
appId:
"
,
surface
.
className
);
console
.
debug
(
"
\t
title:
"
,
surface
.
title
);
console
.
debug
(
"
\t
size:
"
,
surface
.
size
.
width
+
"
x
"
+
surface
.
size
.
height
);
}
if
(
surface
.
className
==
"
maliit-server.desktop
"
)
{
mapKeyboardSurface
(
surface
);
// Call a specialized method to deal with application or
// shell windows
}
else
if
(
isShellWindow
)
mapShellSurface
(
surface
,
firstView
);
else
mapApplicationSurface
(
surface
);
}
function
surfaceUnmapped
(
surface
)
{
// Determine if it's a shell window
var
firstView
=
compositor
.
firstViewOf
(
surface
);
var
isShellWindow
=
(
typeof
(
firstView
.
role
)
!=
"
undefined
"
)
||
(
surface
.
className
==
"
plasmashell.desktop
"
);
// Print some information
if
(
typeof
(
firstView
.
role
)
==
"
undefined
"
)
{
console
.
debug
(
"
Shell surface
"
,
surface
,
"
unmapped
"
);
console
.
debug
(
"
\t
role:
"
,
firstView
.
role
);
console
.
debug
(
"
\t
size:
"
,
surface
.
size
.
width
+
"
x
"
+
surface
.
size
.
height
);
}
else
{
console
.
debug
(
"
Application surface
"
,
surface
,
"
unmapped
"
);
console
.
debug
(
"
\t
appId:
"
,
surface
.
className
);
console
.
debug
(
"
\t
title:
"
,
surface
.
title
);
}
//Is it maliit?
if
(
surface
.
className
==
"
maliit-server.desktop
"
)
{
unmapKeyboardSurface
(
surface
);
// Call a specialized method to deal with application or
// shell windows
}
else
if
(
isShellWindow
)
unmapShellSurface
(
surface
);
else
unmapApplicationSurface
(
surface
);
}
function
surfaceDestroyed
(
surface
)
{
console
.
debug
(
"
Surface
"
,
surface
,
"
destroyed
"
);
// Remove surface from model
var
i
;
for
(
i
=
0
;
i
<
surfaceModel
.
count
;
i
++
)
{
var
entry
=
surfaceModel
.
get
(
i
);
if
(
entry
.
surface
===
surface
)
{
// Destroy window representation and
// remove the surface from the model
if
(
entry
.
window
.
chrome
)
entry
.
window
.
chrome
.
destroy
();
entry
.
window
.
destroy
();
surfaceModel
.
remove
(
i
,
1
);
break
;
}
}
}
/*
* Map surfaces
*/
function
mapApplicationSurface
(
surface
)
{
// Just exit if we already created a window representation
var
i
;
for
(
i
=
0
;
i
<
surfaceModel
.
count
;
i
++
)
{
var
entry
=
surfaceModel
.
get
(
i
);
if
(
entry
.
surface
===
surface
)
{
// Ask the client to resize
surface
.
requestSize
(
window
.
parent
.
width
,
window
.
parent
.
height
);
return
;
}
}
// Create surface item
var
component
=
Qt
.
createComponent
(
"
ClientWindowWrapper.qml
"
);
if
(
component
.
status
!==
Component
.
Ready
)
{
console
.
error
(
component
.
errorString
());
return
;
}
// Request a view for this output although with phones will
// likely have just one output
var
child
=
compositor
.
viewForOutput
(
surface
,
_greenisland_output
);
child
.
resizeSurfaceToItem
=
true
;
child
.
width
=
compositorRoot
.
layers
.
windows
.
width
;
child
.
height
=
compositorRoot
.
layers
.
windows
.
height
;
// Create and setup window container
var
window
=
component
.
createObject
(
compositorRoot
.
layers
.
windows
,
{
"
child
"
:
child
});
compositorRoot
.
layers
.
windows
.
addWindow
(
window
);
window
.
child
.
parent
=
window
;
window
.
child
.
touchEventsEnabled
=
true
;
window
.
width
=
surface
.
size
.
width
;
window
.
height
=
surface
.
size
.
height
;
// Switch to the applications layer and take focus
compositorRoot
.
state
=
"
application
"
;
compositorRoot
.
currentWindow
=
window
;
window
.
child
.
takeFocus
();
// Run map animation
if
(
typeof
(
window
.
runMapAnimation
)
!=
"
undefined
"
)
window
.
runMapAnimation
();
// Add surface to the model
surfaceModel
.
append
({
"
surface
"
:
surface
,
"
window
"
:
window
});
}
function
mapShellSurface
(
surface
,
child
)
{
// Shell surfaces have only one view which is passed to us
// as an argument, check whether it's a view for this output
// or not
if
(
child
.
output
!==
_greenisland_output
)
return
;
// Just set z-index and exit if we already created a
// window representation
var
i
;
for
(
i
=
0
;
i
<
surfaceModel
.
count
;
i
++
)
{
var
entry
=
surfaceModel
.
get
(
i
);
if
(
entry
.
surface
===
surface
)
{
// Switch to layer and take focus
if
(
surface
.
className
==
"
plasmashell.desktop
"
)
{
compositorRoot
.
showPanel
=
true
;
}
else
{
compositorRoot
.
state
=
"
homeScreen
"
;
}
entry
.
window
.
child
.
takeFocus
();
return
;
}
}
// Create surface item
var
component
=
Qt
.
createComponent
(
"
ShellWindowWrapper.qml
"
);
if
(
component
.
status
!==
Component
.
Ready
)
{
console
.
error
(
component
.
errorString
());
return
;
}
// Create and setup window container
// XXX: We only support desktop roles for now
var
window
=
component
.
createObject
(
compositorRoot
,
{
"
child
"
:
child
});
window
.
parent
=
(
surface
.
className
==
"
plasmashell.desktop
"
)
?
compositorRoot
.
layers
.
panel
:
compositorRoot
.
layers
.
desktop
;
window
.
child
.
parent
=
window
;
window
.
child
.
touchEventsEnabled
=
true
;
window
.
x
=
window
.
y
=
0
;
window
.
width
=
surface
.
size
.
width
;
window
.
height
=
surface
.
size
.
height
;
// Switch to the desktop layer and take focus
compositorRoot
.
showSplash
=
false
;
if
(
surface
.
className
==
"
plasmashell.desktop
"
)
{
compositorRoot
.
showPanel
=
true
;
}
else
{
compositorRoot
.
state
=
"
homeScreen
"
;
compositorRoot
.
shellWindow
=
window
;
}
window
.
child
.
takeFocus
();
// Add surface to the model
surfaceModel
.
append
({
"
surface
"
:
surface
,
"
window
"
:
window
});
}
function
mapKeyboardSurface
(
surface
)
{
// Just exit if we already created a window representation
var
i
;
for
(
i
=
0
;
i
<
surfaceModel
.
count
;
i
++
)
{
var
entry
=
surfaceModel
.
get
(
i
);
if
(
entry
.
surface
===
surface
)
{
compositorRoot
.
showKeyboard
=
true
;
return
;
}
}
// Create surface item
var
component
=
Qt
.
createComponent
(
"
ShellWindowWrapper.qml
"
);
if
(
component
.
status
!==
Component
.
Ready
)
{
console
.
error
(
component
.
errorString
());
return
;
}
// Request a view for this output although with phones will
// likely have just one output
var
child
=
compositor
.
viewForOutput
(
surface
,
_greenisland_output
);
// Create and setup window container
var
window
=
component
.
createObject
(
compositorRoot
.
layers
.
keyboard
,
{
"
child
"
:
child
});
window
.
parent
=
compositorRoot
.
layers
.
keyboard
;
window
.
child
.
parent
=
window
;
window
.
child
.
touchEventsEnabled
=
true
;
window
.
width
=
surface
.
size
.
width
;
window
.
height
=
surface
.
size
.
height
;
window
.
y
=
compositorRoot
.
layers
.
keyboard
.
height
-
window
.
height
;
// Add surface to the model
surfaceModel
.
append
({
"
surface
"
:
surface
,
"
window
"
:
window
});
compositorRoot
.
showKeyboard
=
true
;
}
/*
* Unmap surfaces
*/
function
unmapApplicationSurface
(
surface
)
{
// Reactivate home layer as soon as an application window is unmapped
compositorRoot
.
state
=
"
homeScreen
"
;
compositorRoot
.
currentWindow
=
null
;
}
function
unmapShellSurface
(
surface
)
{
// Hide panel layer if this is the sliding panel
if
(
surface
.
className
==
"
plasmashell.desktop
"
)
{
compositorRoot
.
showPanel
=
false
;
}
}
function
unmapKeyboardSurface
(
surface
)
{
if
(
compositorRoot
.
currentWindow
)
{
compositorRoot
.
currentWindow
.
child
.
height
=
compositorRoot
.
layers
.
windows
.
height
;
}
compositorRoot
.
showKeyboard
=
false
;
}
compositor/WindowWrapper.qml
deleted
100644 → 0
View file @
25ae67d7
/*
* Copyright 2014 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
* published by the Free Software Foundation; either version 2, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details
*
* You should have received a copy of the GNU Library General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import
QtQuick
2.0
import
QtCompositor
1.0
import
GreenIsland
1.0
Item
{
property
var
child
property
var
role
:
child
.
surface
.
windowProperties
.
role
id
:
window
onVisibleChanged
:
{
if
(
child
)
child
.
surface
.
clientRenderingEnabled
=
visible
;
}
SurfaceRenderer
{
anchors.fill
:
parent
source
:
child
}
Connections
{
target
:
child
.
surface
onSizeChanged
:
{
window
.
width
=
child
.
surface
.
size
.
width
;
window
.
height
=
child
.
surface
.
size
.
height
;
}
}
function
close
()
{
if
(
!
child
||
!
child
.
surface
)
return
;
child
.
surface
.
client
.
close
();
window
.
destroy
();
}
}
compositor/klogo.png
deleted
100644 → 0
View file @
25ae67d7
22.8 KB
services/CMakeLists.txt
View file @
724389fa
...
@@ -14,6 +14,5 @@ plasma_phone_install_service(kded5)
...
@@ -14,6 +14,5 @@ plasma_phone_install_service(kded5)
plasma_phone_install_service
(
kdeinit5
)
plasma_phone_install_service
(
kdeinit5
)
plasma_phone_install_service
(
kglobalaccel5
)
plasma_phone_install_service
(
kglobalaccel5
)
plasma_phone_install_service
(
kuiserver5
)
plasma_phone_install_service
(
kuiserver5
)
plasma_phone_install_service
(
plasma-phone-compositor
)
plasma_phone_install_service
(
plasma-phone-ui
)
plasma_phone_install_service
(
plasma-phone-ui
)
plasma_phone_install_service
(
plasma-phone
)
plasma_phone_install_service
(
plasma-phone
)
services/plasma-phone-compositor.service.cmake
deleted
100644 → 0
View file @
25ae67d7
#
# Copyright (C) 2014 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
#
# Starts Green Island with the phone compositor plugin.
#
[Unit]
Description=Green Island
Requires=dbus.socket pre-user-session.target
After=pre-user-session.target
Conflicts=maui-bootsplash.service
[Service]
Type=notify
Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=%t/dbus/user_bus_socket
EnvironmentFile=-/var/lib/environment/compositor/*.conf
EnvironmentFile=-/var/lib/environment/greenisland/*.conf
ExecStart=@CMAKE_INSTALL_FULL_BINDIR@/greenisland $LIPSTICK_OPTIONS -p org.kde.plasma.compositor.phone
Restart=on-failure
[Install]
WantedBy=user-session.target
services/plasma-phone-ui.service.cmake
View file @
724389fa
...
@@ -6,8 +6,8 @@
...
@@ -6,8 +6,8 @@
[Unit]
[Unit]
Description=Plasma Phone UI
Description=Plasma Phone UI
Requires=dbus.socket
plasma-phone-compositor.service
Requires=dbus.socket
After=
plasma-phone-compositor.service
After=
[Service]
[Service]
Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=%t/dbus/user_bus_socket
Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=%t/dbus/user_bus_socket
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment