[meego-commits] 7808: Changes to devel:qt-mtf/meegotouch-compositor
Miroslav Safr
no_reply at build.meego.com
Fri Sep 24 13:52:59 UTC 2010
Hi,
I have made the following changes to meegotouch-compositor in project devel:qt-mtf. Please review and accept ASAP.
Thank You,
Miroslav Safr
[This message was auto-generated]
---
Request #7808:
submit: home:msafr/meegotouch-compositor(r5) -> devel:qt-mtf/meegotouch-compositor
Message:
* Fri Sep 24 2010 Miroslav Safr <mirsolav.safr at tieto.com> 0.5.7
- added patch Fixes-MB-2951-black-screen-on-netbook.patch which fixes black screen when apllication is launched (http://meego.gitorious.org/meegotouch/meegotouch-compositor/merge_requests/26)
State: new 2010-09-24T06:52:58 msafr
Comment: None
changes files:
--------------
--- meegotouch-compositor.changes
+++ meegotouch-compositor.changes
@@ -1,5 +1,2 @@
-* Mon Sep 20 2010 Miroslav Safr <miroslav.safr at tieto.com> - 0.7.1
-- Update to 0.7.1
-- Fix fail to boot system to home screen with black screen displaying
- (BMC#3309)
-- Use %qmake and %qmake_install macros
+* Fri Sep 24 2010 Miroslav Safr <mirsolav.safr at tieto.com> 0.5.7
+- added patch Fixes-MB-2951-black-screen-on-netbook.patch which fixes black screen when apllication is launched (http://meego.gitorious.org/meegotouch/meegotouch-compositor/merge_requests/26)
old:
----
meegotouch-compositor-0.7.1.tar.bz2
new:
----
Fixes-MB-2951-black-screen-on-netbook.patch
meegotouch-compositor-0.5.7.tar.bz2
spec files:
-----------
--- meegotouch-compositor.spec
+++ meegotouch-compositor.spec
@@ -7,7 +7,7 @@
Name: meegotouch-compositor
Summary: MeeGo UI Compositing Window Manager
-Version: 0.7.1
+Version: 0.5.7
Release: 1
Group: System/Desktop
License: LGPL v2.1
@@ -19,6 +19,7 @@
Patch1: fix_test_compile_issues.patch
Patch2: fix_build_on_ARM.patch
Patch3: initialize_EGL_library.patch
+Patch4: Fixes-MB-2951-black-screen-on-netbook.patch
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
BuildRequires: pkgconfig(QtDBus)
@@ -65,6 +66,8 @@
%patch2 -p1
# initialize_EGL_library.patch
%patch3 -p1
+# Fixes-MB-2951-black-screen-on-netbook.patch
+%patch4 -p1
# >> setup
# << setup
@@ -105,7 +108,7 @@
%{_bindir}/mcompositor
%{_bindir}/mdecorator
%{_libdir}/libdecorator.so.*
-%{_libdir}/libmcompositor.so.*
+#%{_libdir}/libmcompositor.so.*
%config /etc/xdg/autostart/mdecorator.desktop
# << files
@@ -114,7 +117,7 @@
%defattr(-,root,root,-)
# >> files devel
%{_libdir}/libdecorator.so
-%{_libdir}/libmcompositor.so
+#%{_libdir}/libmcompositor.so
%{_bindir}/windowctl
%{_bindir}/windowstack
%{_bindir}/focus-tracker
other changes:
--------------
++++++ Fixes-MB-2951-black-screen-on-netbook.patch (new)
--- Fixes-MB-2951-black-screen-on-netbook.patch
+++ Fixes-MB-2951-black-screen-on-netbook.patch
+From 72bb780641edfd82c08b318b196ee32642166c30 Mon Sep 17 00:00:00 2001
+From: Zhu, Yongsheng <yongsheng.zhu at intel.com>
+Date: Mon, 20 Sep 2010 10:38:55 +0800
+Subject: [PATCH 42/42] Fixes: MB#2951 - black screen on netbook
+
+black screen when running handset image on netbook which
+is using intel 945 system.
+The black screen occurs when composited overlay is shown:
+1) gtk and qt-bases apps
+2) vkb is shown
+3) app animation
+This is a workaround for the issue.
+---
+ src/mtexturepixmapitem_glx.cpp | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+diff --git a/src/mtexturepixmapitem_glx.cpp b/src/mtexturepixmapitem_glx.cpp
+index 34db153..e6f81f6 100644
+--- a/src/mtexturepixmapitem_glx.cpp
++++ b/src/mtexturepixmapitem_glx.cpp
+@@ -307,7 +307,8 @@ void MTexturePixmapItem::paint(QPainter *painter,
+ if (painter->paintEngine()->type() != QPaintEngine::OpenGL)
+ return;
+ #else
+- if (painter->paintEngine()->type() != QPaintEngine::OpenGL2) {
++ if (painter->paintEngine()->type() != QPaintEngine::OpenGL2 &&
++ painter->paintEngine()->type() != QPaintEngine::OpenGL) {
+ return;
+ }
+ #endif
+--
+1.7.0.4
+
++++++ initialize_EGL_library.patch
--- initialize_EGL_library.patch
+++ initialize_EGL_library.patch
@@ -9,8 +9,8 @@
1 files changed, 6 insertions(+), 2 deletions(-)
diff -Naur meegotouch-compositor-0.5.7/src/mtexturepixmapitem_egl.cpp meegotouch-compositor-0.5.7-new/src/mtexturepixmapitem_egl.cpp
---- meegotouch-compositor-0.7.0/src/mtexturepixmapitem_egl.cpp 2010-08-11 00:32:10.000000000 -0700
-+++ meegotouch-compositor-0.7.0-new/src/mtexturepixmapitem_egl.cpp 2010-09-02 09:04:47.026846640 -0700
+--- meegotouch-compositor-0.5.7/src/mtexturepixmapitem_egl.cpp 2010-08-11 00:32:10.000000000 -0700
++++ meegotouch-compositor-0.5.7-new/src/mtexturepixmapitem_egl.cpp 2010-09-02 09:04:47.026846640 -0700
@@ -85,8 +85,11 @@
public:
EglResourceManager()
++++++ meegotouch-compositor-0.7.1.tar.bz2 -> meegotouch-compositor-0.5.7.tar.bz2
--- .git
+++ .git
+(directory)
--- .git/HEAD
+++ .git/HEAD
+ref: refs/heads/master
--- .git/branches
+++ .git/branches
+(directory)
--- .git/config
+++ .git/config
+[core]
+ repositoryformatversion = 0
+ filemode = true
+ bare = false
+ logallrefupdates = true
+[remote "origin"]
+ fetch = +refs/heads/*:refs/remotes/origin/*
+ url = git at gitorious.org:meegotouch/meegotouch-compositor.git
+[branch "master"]
+ remote = origin
+ merge = refs/heads/master
--- .git/description
+++ .git/description
+Unnamed repository; edit this file 'description' to name the repository.
--- .git/hooks
+++ .git/hooks
+(directory)
--- .git/hooks/applypatch-msg.sample
+++ .git/hooks/applypatch-msg.sample
+#!/bin/sh
+#
+# An example hook script to check the commit log message taken by
+# applypatch from an e-mail message.
+#
+# The hook should exit with non-zero status after issuing an
+# appropriate message if it wants to stop the commit. The hook is
+# allowed to edit the commit message file.
+#
+# To enable this hook, rename this file to "applypatch-msg".
+
+. git-sh-setup
+test -x "$GIT_DIR/hooks/commit-msg" &&
+ exec "$GIT_DIR/hooks/commit-msg" ${1+"$@"}
+:
--- .git/hooks/commit-msg.sample
+++ .git/hooks/commit-msg.sample
+#!/bin/sh
+#
+# An example hook script to check the commit log message.
+# Called by git-commit with one argument, the name of the file
+# that has the commit message. The hook should exit with non-zero
+# status after issuing an appropriate message if it wants to stop the
+# commit. The hook is allowed to edit the commit message file.
+#
+# To enable this hook, rename this file to "commit-msg".
+
+# Uncomment the below to add a Signed-off-by line to the message.
+# Doing this in a hook is a bad idea in general, but the prepare-commit-msg
+# hook is more suited to it.
+#
+# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
+# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1"
+
+# This example catches duplicate Signed-off-by lines.
+
+test "" = "$(grep '^Signed-off-by: ' "$1" |
+ sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || {
+ echo >&2 Duplicate Signed-off-by lines.
+ exit 1
+}
--- .git/hooks/post-commit.sample
+++ .git/hooks/post-commit.sample
+#!/bin/sh
+#
+# An example hook script that is called after a successful
+# commit is made.
+#
+# To enable this hook, rename this file to "post-commit".
+
+: Nothing
--- .git/hooks/post-receive.sample
+++ .git/hooks/post-receive.sample
+#!/bin/sh
+#
+# An example hook script for the "post-receive" event.
+#
+# The "post-receive" script is run after receive-pack has accepted a pack
+# and the repository has been updated. It is passed arguments in through
+# stdin in the form
+# <oldrev> <newrev> <refname>
+# For example:
+# aa453216d1b3e49e7f6f98441fa56946ddcd6a20 68f7abf4e6f922807889f52bc043ecd31b79f814 refs/heads/master
+#
+# see contrib/hooks/ for a sample, or uncomment the next line and
+# rename the file to "post-receive".
+
+#. /usr/share/doc/git-core/contrib/hooks/post-receive-email
--- .git/hooks/post-update.sample
+++ .git/hooks/post-update.sample
+#!/bin/sh
+#
+# An example hook script to prepare a packed repository for use over
+# dumb transports.
+#
+# To enable this hook, rename this file to "post-update".
+
+exec git-update-server-info
--- .git/hooks/pre-applypatch.sample
+++ .git/hooks/pre-applypatch.sample
+#!/bin/sh
+#
+# An example hook script to verify what is about to be committed
+# by applypatch from an e-mail message.
+#
+# The hook should exit with non-zero status after issuing an
+# appropriate message if it wants to stop the commit.
+#
+# To enable this hook, rename this file to "pre-applypatch".
+
+. git-sh-setup
+test -x "$GIT_DIR/hooks/pre-commit" &&
+ exec "$GIT_DIR/hooks/pre-commit" ${1+"$@"}
+:
--- .git/hooks/pre-commit.sample
+++ .git/hooks/pre-commit.sample
+#!/bin/sh
+#
+# An example hook script to verify what is about to be committed.
+# Called by git-commit with no arguments. The hook should
+# exit with non-zero status after issuing an appropriate message if
+# it wants to stop the commit.
+#
+# To enable this hook, rename this file to "pre-commit".
+
+if git-rev-parse --verify HEAD >/dev/null 2>&1
+then
+ against=HEAD
+else
+ # Initial commit: diff against an empty tree object
+ against=4b825dc642cb6eb9a060e54bf8d69288fbee4904
+fi
+
+# If you want to allow non-ascii filenames set this variable to true.
+allownonascii=$(git config hooks.allownonascii)
+
+# Cross platform projects tend to avoid non-ascii filenames; prevent
+# them from being added to the repository. We exploit the fact that the
+# printable range starts at the space character and ends with tilde.
+if [ "$allownonascii" != "true" ] &&
+ # Note that the use of brackets around a tr range is ok here, (it's
+ # even required, for portability to Solaris 10's /usr/bin/tr), since
+ # the square bracket bytes happen to fall in the designated range.
+ test "$(git diff --cached --name-only --diff-filter=A -z $against |
+ LC_ALL=C tr -d '[ -~]\0')"
+then
+ echo "Error: Attempt to add a non-ascii file name."
+ echo
+ echo "This can cause problems if you want to work"
+ echo "with people on other platforms."
+ echo
+ echo "To be portable it is advisable to rename the file ..."
+ echo
+ echo "If you know what you are doing you can disable this"
+ echo "check using:"
+ echo
+ echo " git config hooks.allownonascii true"
+ echo
+ exit 1
+fi
+
+exec git diff-index --check --cached $against --
--- .git/hooks/pre-rebase.sample
+++ .git/hooks/pre-rebase.sample
+#!/bin/sh
+#
+# Copyright (c) 2006, 2008 Junio C Hamano
+#
+# The "pre-rebase" hook is run just before "git-rebase" starts doing
+# its job, and can prevent the command from running by exiting with
+# non-zero status.
+#
+# The hook is called with the following parameters:
+#
+# $1 -- the upstream the series was forked from.
+# $2 -- the branch being rebased (or empty when rebasing the current branch).
+#
+# This sample shows how to prevent topic branches that are already
+# merged to 'next' branch from getting rebased, because allowing it
+# would result in rebasing already published history.
+
+publish=next
+basebranch="$1"
+if test "$#" = 2
+then
+ topic="refs/heads/$2"
+else
+ topic=`git symbolic-ref HEAD` ||
+ exit 0 ;# we do not interrupt rebasing detached HEAD
+fi
+
+case "$topic" in
+refs/heads/??/*)
+ ;;
+*)
+ exit 0 ;# we do not interrupt others.
+ ;;
+esac
+
+# Now we are dealing with a topic branch being rebased
+# on top of master. Is it OK to rebase it?
+
+# Does the topic really exist?
+git show-ref -q "$topic" || {
+ echo >&2 "No such branch $topic"
+ exit 1
+}
+
+# Is topic fully merged to master?
+not_in_master=`git-rev-list --pretty=oneline ^master "$topic"`
+if test -z "$not_in_master"
+then
+ echo >&2 "$topic is fully merged to master; better remove it."
+ exit 1 ;# we could allow it, but there is no point.
+fi
+
+# Is topic ever merged to next? If so you should not be rebasing it.
+only_next_1=`git-rev-list ^master "^$topic" ${publish} | sort`
+only_next_2=`git-rev-list ^master ${publish} | sort`
+if test "$only_next_1" = "$only_next_2"
+then
+ not_in_topic=`git-rev-list "^$topic" master`
+ if test -z "$not_in_topic"
+ then
+ echo >&2 "$topic is already up-to-date with master"
+ exit 1 ;# we could allow it, but there is no point.
+ else
+ exit 0
+ fi
+else
+ not_in_next=`git-rev-list --pretty=oneline ^${publish} "$topic"`
+ perl -e '
+ my $topic = $ARGV[0];
+ my $msg = "* $topic has commits already merged to public branch:\n";
+ my (%not_in_next) = map {
+ /^([0-9a-f]+) /;
+ ($1 => 1);
+ } split(/\n/, $ARGV[1]);
+ for my $elem (map {
+ /^([0-9a-f]+) (.*)$/;
+ [$1 => $2];
+ } split(/\n/, $ARGV[2])) {
+ if (!exists $not_in_next{$elem->[0]}) {
+ if ($msg) {
+ print STDERR $msg;
+ undef $msg;
+ }
+ print STDERR " $elem->[1]\n";
+ }
+ }
+ ' "$topic" "$not_in_next" "$not_in_master"
+ exit 1
+fi
+
+exit 0
+
+################################################################
+
+This sample hook safeguards topic branches that have been
+published from being rewound.
+
+The workflow assumed here is:
+
+ * Once a topic branch forks from "master", "master" is never
+ merged into it again (either directly or indirectly).
+
+ * Once a topic branch is fully cooked and merged into "master",
+ it is deleted. If you need to build on top of it to correct
+ earlier mistakes, a new topic branch is created by forking at
+ the tip of the "master". This is not strictly necessary, but
+ it makes it easier to keep your history simple.
+
+ * Whenever you need to test or publish your changes to topic
+ branches, merge them into "next" branch.
+
+The script, being an example, hardcodes the publish branch name
+to be "next", but it is trivial to make it configurable via
+$GIT_DIR/config mechanism.
+
+With this workflow, you would want to know:
+
+(1) ... if a topic branch has ever been merged to "next". Young
+ topic branches can have stupid mistakes you would rather
+ clean up before publishing, and things that have not been
+ merged into other branches can be easily rebased without
+ affecting other people. But once it is published, you would
+ not want to rewind it.
+
+(2) ... if a topic branch has been fully merged to "master".
+ Then you can delete it. More importantly, you should not
+ build on top of it -- other people may already want to
+ change things related to the topic as patches against your
+ "master", so if you need further changes, it is better to
+ fork the topic (perhaps with the same name) afresh from the
+ tip of "master".
+
+Let's look at this example:
+
+ o---o---o---o---o---o---o---o---o---o "next"
+ / / / /
+ / a---a---b A / /
+ / / / /
+ / / c---c---c---c B /
+ / / / \ /
+ / / / b---b C \ /
+ / / / / \ /
+ ---o---o---o---o---o---o---o---o---o---o---o "master"
+
+
+A, B and C are topic branches.
+
+ * A has one fix since it was merged up to "next".
+
+ * B has finished. It has been fully merged up to "master" and "next",
+ and is ready to be deleted.
+
+ * C has not merged to "next" at all.
+
+We would want to allow C to be rebased, refuse A, and encourage
+B to be deleted.
+
+To compute (1):
+
+ git-rev-list ^master ^topic next
+ git-rev-list ^master next
+
+ if these match, topic has not merged in next at all.
+
+To compute (2):
+
+ git-rev-list master..topic
+
+ if this is empty, it is fully merged to "master".
--- .git/hooks/prepare-commit-msg.sample
+++ .git/hooks/prepare-commit-msg.sample
+#!/bin/sh
+#
+# An example hook script to prepare the commit log message.
+# Called by git-commit with the name of the file that has the
+# commit message, followed by the description of the commit
+# message's source. The hook's purpose is to edit the commit
+# message file. If the hook fails with a non-zero status,
+# the commit is aborted.
+#
+# To enable this hook, rename this file to "prepare-commit-msg".
+
+# This hook includes three examples. The first comments out the
+# "Conflicts:" part of a merge commit.
+#
+# The second includes the output of "git diff --name-status -r"
+# into the message, just before the "git status" output. It is
+# commented because it doesn't cope with --amend or with squashed
+# commits.
+#
+# The third example adds a Signed-off-by line to the message, that can
+# still be edited. This is rarely a good idea.
+
+case "$2,$3" in
+ merge,)
+ perl -i.bak -ne 's/^/# /, s/^# #/#/ if /^Conflicts/ .. /#/; print' "$1" ;;
+
+# ,|template,)
+# perl -i.bak -pe '
+# print "\n" . `git diff --cached --name-status -r`
+# if /^#/ && $first++ == 0' "$1" ;;
+
+ *) ;;
+esac
+
+# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
+# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1"
--- .git/hooks/update.sample
+++ .git/hooks/update.sample
+#!/bin/sh
+#
+# An example hook script to blocks unannotated tags from entering.
+# Called by git-receive-pack with arguments: refname sha1-old sha1-new
+#
+# To enable this hook, rename this file to "update".
+#
+# Config
+# ------
+# hooks.allowunannotated
+# This boolean sets whether unannotated tags will be allowed into the
+# repository. By default they won't be.
+# hooks.allowdeletetag
+# This boolean sets whether deleting tags will be allowed in the
+# repository. By default they won't be.
+# hooks.allowmodifytag
+# This boolean sets whether a tag may be modified after creation. By default
+# it won't be.
+# hooks.allowdeletebranch
+# This boolean sets whether deleting branches will be allowed in the
+# repository. By default they won't be.
+# hooks.denycreatebranch
+# This boolean sets whether remotely creating branches will be denied
+# in the repository. By default this is allowed.
+#
+
+# --- Command line
+refname="$1"
+oldrev="$2"
+newrev="$3"
+
+# --- Safety check
+if [ -z "$GIT_DIR" ]; then
+ echo "Don't run this script from the command line." >&2
+ echo " (if you want, you could supply GIT_DIR then run" >&2
+ echo " $0 <ref> <oldrev> <newrev>)" >&2
+ exit 1
+fi
+
+if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then
+ echo "Usage: $0 <ref> <oldrev> <newrev>" >&2
+ exit 1
+fi
+
+# --- Config
+allowunannotated=$(git config --bool hooks.allowunannotated)
+allowdeletebranch=$(git config --bool hooks.allowdeletebranch)
+denycreatebranch=$(git config --bool hooks.denycreatebranch)
+allowdeletetag=$(git config --bool hooks.allowdeletetag)
+allowmodifytag=$(git config --bool hooks.allowmodifytag)
+
+# check for no description
+projectdesc=$(sed -e '1q' "$GIT_DIR/description")
+case "$projectdesc" in
+"Unnamed repository"* | "")
+ echo "*** Project description file hasn't been set" >&2
+ exit 1
+ ;;
+esac
+
+# --- Check types
+# if $newrev is 0000...0000, it's a commit to delete a ref.
+zero="0000000000000000000000000000000000000000"
+if [ "$newrev" = "$zero" ]; then
+ newrev_type=delete
+else
+ newrev_type=$(git-cat-file -t $newrev)
+fi
+
+case "$refname","$newrev_type" in
+ refs/tags/*,commit)
+ # un-annotated tag
+ short_refname=${refname##refs/tags/}
+ if [ "$allowunannotated" != "true" ]; then
+ echo "*** The un-annotated tag, $short_refname, is not allowed in this repository" >&2
+ echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2
+ exit 1
+ fi
+ ;;
+ refs/tags/*,delete)
+ # delete tag
+ if [ "$allowdeletetag" != "true" ]; then
+ echo "*** Deleting a tag is not allowed in this repository" >&2
+ exit 1
+ fi
+ ;;
+ refs/tags/*,tag)
+ # annotated tag
+ if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1
+ then
+ echo "*** Tag '$refname' already exists." >&2
+ echo "*** Modifying a tag is not allowed in this repository." >&2
+ exit 1
+ fi
+ ;;
+ refs/heads/*,commit)
+ # branch
+ if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then
+ echo "*** Creating a branch is not allowed in this repository" >&2
+ exit 1
+ fi
+ ;;
+ refs/heads/*,delete)
+ # delete branch
+ if [ "$allowdeletebranch" != "true" ]; then
+ echo "*** Deleting a branch is not allowed in this repository" >&2
+ exit 1
+ fi
+ ;;
+ refs/remotes/*,commit)
+ # tracking branch
+ ;;
+ refs/remotes/*,delete)
+ # delete tracking branch
+ if [ "$allowdeletebranch" != "true" ]; then
+ echo "*** Deleting a tracking branch is not allowed in this repository" >&2
+ exit 1
+ fi
+ ;;
+ *)
+ # Anything else (is there anything else?)
+ echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2
+ exit 1
+ ;;
+esac
+
+# --- Finished
+exit 0
--- .git/info
+++ .git/info
+(directory)
--- .git/info/exclude
+++ .git/info/exclude
+# git-ls-files --others --exclude-from=.git/info/exclude
+# Lines that start with '#' are comments.
+# For a project mostly in C, the following would be a good set of
+# exclude patterns (uncomment them if you want to use them):
+# *.[oa]
+# *~
--- .git/logs
+++ .git/logs
+(directory)
--- .git/logs/HEAD
+++ .git/logs/HEAD
+0000000000000000000000000000000000000000 dddaefcc7ce675248dc9efa6a7ed940378a2b3d6 Miroslav Safr <miroslav.safr at tieto.com> 1281511930 +0300 clone: from git at gitorious.org:meegotouch/meegotouch-compositor.git
--- .git/logs/refs
+++ .git/logs/refs
+(directory)
--- .git/logs/refs/heads
+++ .git/logs/refs/heads
+(directory)
--- .git/logs/refs/heads/master
+++ .git/logs/refs/heads/master
+0000000000000000000000000000000000000000 dddaefcc7ce675248dc9efa6a7ed940378a2b3d6 Miroslav Safr <miroslav.safr at tieto.com> 1281511930 +0300 clone: from git at gitorious.org:meegotouch/meegotouch-compositor.git
--- .git/objects
+++ .git/objects
+(directory)
--- .git/objects/info
+++ .git/objects/info
+(directory)
--- .git/objects/pack
+++ .git/objects/pack
+(directory)
--- .git/packed-refs
+++ .git/packed-refs
+# pack-refs with: peeled
+ff59edb1ac3f71ad40858ceb8358c613a8be635b refs/tags/0.5.6-1
+a821801116d593a4d26d7975c0484430d5b9db54 refs/tags/0.5.5-1
+82bbc3fcb086af573133fd586386e40579c635bd refs/tags/0.5.4-1
+5055e17c3ab1d5db31ff9b31f974966e8aa5763b refs/tags/0.5.3-1
+a9b4d70fe35b79de08c33053cb77f5866bc9a697 refs/tags/0.5.2-1
+^0c672622dcbd266ddfbde539066190462f7cd4e5
+fcf50456b2cd4393e2fbcfed244574f6ecfd818b refs/tags/0.5.1-1
+6a48a397238e5a876d0d21516b6fd96e488b5053 refs/tags/0.5.0rc1
+d352d354e9d2a03212a06d3063bbd84273f5cfb0 refs/tags/0.5.0-1
+a355209ccf898b312cb8144e00385f9830dba4b0 refs/tags/0.4.9-1
+f374b5a447b9e8e105087ff2df93ff062a45a142 refs/tags/0.4.8-1
+af381a9aa0c006f7fc7dd8285a7c66f6f60abe76 refs/tags/0.4.7-2
+ebab152ae135d97a59bf39e770587defd3543c59 refs/tags/0.4.6rc2
+3bbabcf124c9d8b459ca3cb7ca4145536ee00b6f refs/tags/0.4.6rc1
+c25e85ff48783a7a6c88e268bd8d85207829e323 refs/tags/0.4.6-1
+a678fd43629913d0c560e8972416994d7eccdfde refs/tags/0.4.5-1
+efc9cf8109dadff7c33e34439675593c5633b70f refs/tags/0.4.4-1
+8c9889176e50c312c93f10b9973363462140f19d refs/tags/0.4.3-1
+c9f781e93a8a2aa0f1c7c83749901b39ccb1e53d refs/tags/0.4.2-1
+b6f79410aa6479073cc95d00bbd5767417d1d353 refs/tags/0.4.10rc2
+ccc240d5f2319bfac94bd0226865b3a0f341db3d refs/tags/0.4.10rc1
+499cfd5896e17f26eb6f5aa835dd8d10a433c622 refs/tags/0.4.10-4
+ea10f32a47bd09120c7793c7109a9a2457794029 refs/tags/0.4.10-3
+d45828000f3fcad9495f8de48dbacd128725e044 refs/tags/0.4.10-2
+cdd3d26e6ac987a47e80d04d3b80225746838a40 refs/tags/0.4.10-1
+90c59d05a7899d025a1034aa1dbc07c1a1e80183 refs/tags/0.4.1-2
+a403a71e1bcb6494962a9dd21cc652d315a3f9d9 refs/tags/0.4.1-1
+d431904e0c085c0372f8a9d141d11ba500ac3d35 refs/tags/0.4.0-1
+e50192f4ec19a836b35555d9ca4b3f568e6093f8 refs/tags/0.3.9-1
+77f0b3891e4f8c261472bc73d6b1e8c5bed355aa refs/tags/0.3.8-1
+f2eda9878b9b7b56eb3fe706efeb3e490989dc9c refs/tags/0.3.7-1
+543666894aaa754950cb8644c0802871116c4bb3 refs/tags/0.3.6rc2
+b36080c6ee501e49f620054a878042e2dfb91f60 refs/tags/0.3.6rc1
+98de0ceaed24896b9069b384c9f59dbf93fd3f71 refs/tags/0.3.6-1
+98013b6bb838017364369893061869dc289af8c5 refs/tags/0.3.5-1
+77c2bb2e45bf5959a8380eca0b6bf0967a397552 refs/tags/0.3.4rc1
+77c2bb2e45bf5959a8380eca0b6bf0967a397552 refs/tags/0.3.4rc
+b04fb347bddfe081267abcb1c0dfdf3796de78c9 refs/tags/0.3.3rc1
+c2a0774e52a3107bf7d1c0bf013d74aa6dd41adb refs/tags/0.3.10-2
+0f7845c6f23f0a47f23a3aafd8382b6a4025670e refs/tags/0.3.10-1
+dddaefcc7ce675248dc9efa6a7ed940378a2b3d6 refs/remotes/origin/master
--- .git/refs
+++ .git/refs
+(directory)
--- .git/refs/heads
+++ .git/refs/heads
+(directory)
--- .git/refs/heads/master
+++ .git/refs/heads/master
+dddaefcc7ce675248dc9efa6a7ed940378a2b3d6
--- .git/refs/remotes
+++ .git/refs/remotes
+(directory)
--- .git/refs/remotes/origin
+++ .git/refs/remotes/origin
+(directory)
--- .git/refs/remotes/origin/HEAD
+++ .git/refs/remotes/origin/HEAD
+ref: refs/remotes/origin/master
--- .git/refs/tags
+++ .git/refs/tags
+(directory)
--- debian/changelog
+++ debian/changelog
@@ -1,64 +1,6 @@
-mcompositor (0.7.1~1) unstable; urgency=low
+mcompositor (0.5.7~1) unstable; urgency=low
* New version [UNRELEASED]
- * Fixes: NB#188336 - setVideoGlobalAlpha does not work
-
- -- Abdiel Janulgue <abj at codefuassasin.research.nokia.com> Fri, 17 Sep 2010 12:37:43 +0300
-
-mcompositor (0.7.0-1) unstable; urgency=low
-
- * Fixes: NB#191286 - mcompositor is eating CPU from the background in basic panning use cases
- * Fixes: NB#189756 - COREWEB: /usr/bin/mcompositor 'MWindowPropertyCache::isDecorator MCompositeManagerPrivate::compareWindows MCompositeManagerPrivate::roughSort MCompositeManagerPrivate::bindWindow'
- * New: Modularized compositing framework with support for extensions and custom window effects using shaders
-
- -- Abdiel Janulgue <abj at codefuassasin.research.nokia.com> Wed, 15 Sep 2010 00:11:28 +0300
-
-mcompositor (0.6.1-1) unstable; urgency=low
-
- * Fixes: NB#180786 - QWidget::show() does not fire subsequent X11 window map requests
-
- -- Abdiel Janulgue <abj at codefuassasin.research.nokia.com> Tue, 14 Sep 2010 13:29:10 +0300
-
-mcompositor (0.6.0-1) unstable; urgency=low
-
- * Fixes: NB#186402 - The application is getting minimized on clicking close button
- * Improvements: beginAnimation() and endAnimation() API
-
- -- Abdiel Janulgue <abj at codefuassasin.research.nokia.com> Thu, 09 Sep 2010 23:42:14 +0300
-
-mcompositor (0.5.10-1) unstable; urgency=low
-
- * Fixes: NB#184226 - PIN code dialog uses initial_state==IconicState when it shows itself
-
- -- Abdiel Janulgue <abj at codefuassasin.research.nokia.com> Wed, 08 Sep 2010 17:06:40 +0300
-
-mcompositor (0.5.9-1) unstable; urgency=low
-
- * Fixes: NB#184773 - Application dialog gets stucked when left metakey + backspace buttons are pressed
- * Fixes: NB#181749 - Window animations feel 'cheap' compared to Fremantle
- * Fixes: NB#183538 - Blue screen displays for ~2 secs while booting the device
- * Fixes: NB#180628 - visibility notification coming late
- * Fixes: NB#186827 - mcompositor causes device freezing
- * Fixes: NB#186832 - MCompositor crashes at app termination
-
- -- Abdiel Janulgue <abj at codefuassasin.research.nokia.com> Wed, 18 Aug 2010 19:43:31 +0300
-
-mcompositor (0.5.8-1) unstable; urgency=low
-
- * Fixes: NB#185979 - Managing separate child window causing mcompositor to crash
-
- -- Abdiel Janulgue <abj at codefuassasin.research.nokia.com> Tue, 17 Aug 2010 14:31:42 +0300
-
-mcompositor (0.5.7-1) unstable; urgency=low
-
- * Fixes: NB#181749 - Window animations feel 'cheap' compared to Fremantle
- * Fixes: NB#184017 - Window minimizes or closes on press
- * Fixes: NB#184549 - Device lock can be bypassed by pressing Fn+Backspace
- * Fixes: NB#184522 - Compositor is packaged with debug symbols
- * Fixes: NB#171592 - setGlobalAlpha does not work
- * Fixes: NB#184071 - enter/exitDisplayEvent() calls are wrong for system dialogs
- * Improvements: Avoid XGetWindowAttributes call in MDecoratorFrame by using the cache
- * Imrpovements: MapRequesterPrivate class for syncrhonized mapping in selective compositing
-- Abdiel Janulgue <abj at codefuassasin.research.nokia.com> Tue, 10 Aug 2010 21:26:27 +0300
--- debian/control
+++ debian/control
@@ -21,7 +21,7 @@
Package: mcompositor-functional-tests
Architecture: any
-Depends: libmeegotouchcore0, ci-testing, meego-env-dimming, meego-env-behave, python, contextkit-utils, ${shlibs:Depends}
+Depends: libmeegotouchcore0, ci-testing, meego-env-dimming, meego-env-behave, python, ${shlibs:Depends}
XB-Maemo-CI-Packages: mcompositor
XB-Maemo-CI-Stage: fast
Description: mcompositor functional testcases
--- debian/mcompositor.install
+++ debian/mcompositor.install
@@ -1,4 +1,3 @@
usr/bin/mcompositor
usr/bin/mdecorator
usr/lib/libdecorator.so*
-usr/lib/libmcompositor.so*
--- debian/mcompositor.links
+++ debian/mcompositor.links
+usr/bin/mcompositor usr/bin/duicompositor
+usr/bin/mdecorator usr/bin/duidecorator
--- debian/rules
+++ debian/rules
@@ -115,7 +115,7 @@
# dh_installinfo
# dh_installman
dh_link
- dh_strip --dbg-package=mcompositor-dbg
+ dh_strip --dbg-package=mcompositor
dh_compress
dh_fixperms
# dh_perl
--- decorators/libdecorator/mrmiclient.cpp
+++ decorators/libdecorator/mrmiclient.cpp
@@ -22,9 +22,8 @@
#include <QByteArray>
MRmiClientPrivate:: MRmiClientPrivate(const QString& key)
- : q_ptr(0)
+ : q_ptr(0), _key(key)
{
- _key = "/tmp/" + key;
}
MRmiClientPrivate::~MRmiClientPrivate()
--- decorators/libdecorator/mrmiserver.cpp
+++ decorators/libdecorator/mrmiserver.cpp
@@ -32,9 +32,8 @@
}
MRmiServerPrivate::MRmiServerPrivate(const QString& key)
- : q_ptr(0), _obj(0)
+ : q_ptr(0), _key(key), _obj(0)
{
- _key = "/tmp/" + key;
}
MRmiServerPrivate::~MRmiServerPrivate()
@@ -73,12 +72,11 @@
q->connect(&_serv, SIGNAL(newConnection()), q, SLOT(_q_incoming()));
- if (QFile::exists(key()))
- QFile::remove(key());
+ if (QFile::exists("/tmp/" + key()))
+ QFile::remove("/tmp/" + key());
if (!_serv.listen(key()))
- qDebug() << "MRmiServerPrivateSocket" << "can't listen to local socket"
- << key();
+ qDebug() << "MRmiServerPrivateSocket" << "system error, can't listen to local socket";
}
void MRmiServerPrivateSocket::_q_incoming()
--- mcompositor
+++ mcompositor
-(directory)
--- mcompositor.pro
+++ mcompositor.pro
@@ -3,7 +3,6 @@
SUBDIRS = \
decorators \
src \
- mcompositor\
tests \
src.depends=decorators
--- mcompositor/main.cpp
+++ mcompositor/main.cpp
-/***************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (directui at nokia.com)
-**
-** This file is part of mcompositor.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at directui at nokia.com.
-**
-** This library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation
-** and appearing in the file LICENSE.LGPL included in the packaging
-** of this file.
-**
-****************************************************************************/
-
-#include <QtGui>
-#include <QGLWidget>
-#include "mcompositescene.h"
-#include "mcompositemanager.h"
-
-int main(int argc, char *argv[])
-{
- // We don't need meego graphics system
- setenv("QT_GRAPHICSSYSTEM", "raster", 1);
-
- // Don't load any Qt plugins
- QCoreApplication::setLibraryPaths(QStringList());
- MCompositeManager app(argc, argv);
-
- QGraphicsScene *scene = app.scene();
- QGraphicsView view(scene);
-
- view.setProperty("NoMStyle", true);
- view.setUpdatesEnabled(false);
- view.setAutoFillBackground(false);
- view.setBackgroundBrush(Qt::NoBrush);
- view.setForegroundBrush(Qt::NoBrush);
- view.setFrameShadow(QFrame::Plain);
-
- view.setWindowFlags(Qt::X11BypassWindowManagerHint);
- view.setAttribute(Qt::WA_NoSystemBackground);
-#if QT_VERSION >= 0x040600
- view.move(-2, -2);
- view.setViewportUpdateMode(QGraphicsView::NoViewportUpdate);
- view.setOptimizationFlags(QGraphicsView::IndirectPainting);
-#endif
- app.setSurfaceWindow(view.winId());
-
- view.setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
- view.setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
- view.setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
- view.setMinimumSize(QApplication::desktop()->width() + 2,
- QApplication::desktop()->height() + 2);
- view.setMaximumSize(QApplication::desktop()->width() + 2,
- QApplication::desktop()->height() + 2);
-
- QGLFormat fmt;
- fmt.setSamples(0);
- fmt.setSampleBuffers(false);
-
- QGLWidget *w = new QGLWidget(fmt);
- w->setAttribute(Qt::WA_PaintOutsidePaintEvent);
- QPalette p = w->palette();
- p.setColor(QPalette::Background, QColor(Qt::black));
- w->setPalette(p);
- w->update();
-
- w->setAutoFillBackground(false);
- w->setMinimumSize(QApplication::desktop()->width(),
- QApplication::desktop()->height());
- w->setMaximumSize(QApplication::desktop()->width(),
- QApplication::desktop()->height());
- app.setGLWidget(w);
- view.setViewport(w);
- w->makeCurrent();
- view.show();
-
- app.prepareEvents();
- app.redirectWindows();
- app.loadPlugins();
-
- return app.exec();
-}
--- mcompositor/mcompositor.pro
+++ mcompositor/mcompositor.pro
-include(../meegotouch_config.pri)
-
-TEMPLATE = app
-TARGET =
-DEPENDPATH += .
-INCLUDEPATH += ../src
-
-LIBS += ../src/libmcompositor.so ../decorators/libdecorator/libdecorator.so
-
-target.path += $$M_INSTALL_BIN
-INSTALLS += target
-
-# Input
-SOURCES += main.cpp
-
-QT = gui opengl
--- meegotouch_config.pri
+++ meegotouch_config.pri
@@ -20,4 +20,4 @@
}
# Compositor components only
-VERSION = 0.7.1
\ No newline at end of file
+VERSION = 0.5.5
--- src/main.cpp
+++ src/main.cpp
+/***************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (directui at nokia.com)
+**
+** This file is part of mcompositor.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at directui at nokia.com.
+**
+** This library is free software; you can redistribute it and/or
+** modify it under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation
+** and appearing in the file LICENSE.LGPL included in the packaging
+** of this file.
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <QGLWidget>
+#include "mcompositescene.h"
+#include "mcompositemanager.h"
+
+int main(int argc, char *argv[])
+{
+ // We don't need meego graphics system
+ setenv("QT_GRAPHICSSYSTEM", "raster", 1);
+
+ // Don't load any Qt plugins
+ QCoreApplication::setLibraryPaths(QStringList());
+ MCompositeManager app(argc, argv);
+
+ QGraphicsScene *scene = app.scene();
+ QGraphicsView view(scene);
+
+ view.setProperty("NoMStyle", true);
+ view.setUpdatesEnabled(false);
+ view.setAutoFillBackground(false);
+ view.setBackgroundBrush(Qt::NoBrush);
+ view.setForegroundBrush(Qt::NoBrush);
+ view.setFrameShadow(QFrame::Plain);
+
+ view.setWindowFlags(Qt::X11BypassWindowManagerHint);
+ view.setAttribute(Qt::WA_NoSystemBackground);
+#if QT_VERSION >= 0x040600
+ view.move(-2, -2);
+ view.setViewportUpdateMode(QGraphicsView::NoViewportUpdate);
+ view.setOptimizationFlags(QGraphicsView::IndirectPainting);
+#endif
+ app.setSurfaceWindow(view.winId());
+
+ view.setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+ view.setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+ view.setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
+ view.setMinimumSize(QApplication::desktop()->width() + 2,
+ QApplication::desktop()->height() + 2);
+ view.setMaximumSize(QApplication::desktop()->width() + 2,
+ QApplication::desktop()->height() + 2);
+
+ QGLFormat fmt;
+ fmt.setSamples(0);
+ fmt.setSampleBuffers(false);
+
+ QGLWidget *w = new QGLWidget(fmt);
+ w->setAttribute(Qt::WA_PaintOutsidePaintEvent);
+ QPalette p = w->palette();
+ p.setColor(QPalette::Background, QColor(Qt::black));
+ w->setPalette(p);
+ w->update();
+
+ w->setAutoFillBackground(false);
+ w->setMinimumSize(QApplication::desktop()->width(),
+ QApplication::desktop()->height());
+ w->setMaximumSize(QApplication::desktop()->width(),
+ QApplication::desktop()->height());
+ app.setGLWidget(w);
+ view.setViewport(w);
+ w->makeCurrent();
+ view.show();
+
+ app.prepareEvents();
+ app.redirectWindows();
+
+ return app.exec();
+}
--- src/mcompatoms_p.h
+++ src/mcompatoms_p.h
@@ -93,7 +93,6 @@
_MEEGOTOUCH_VIDEO_ALPHA,
_MEEGO_STACKING_LAYER,
_MEEGOTOUCH_DECORATOR_BUTTONS,
- _MEEGOTOUCH_CURRENT_APP_WINDOW,
#ifdef WINDOW_DEBUG
_M_WM_INFO,
--- src/mcompmgrextensionfactory.h
+++ src/mcompmgrextensionfactory.h
-/***************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (directui at nokia.com)
-**
-** This file is part of mcompositor.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at directui at nokia.com.
-**
-** This library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation
-** and appearing in the file LICENSE.LGPL included in the packaging
-** of this file.
-**
-****************************************************************************/
-
-#ifndef MCOMPMGREXTENSIONFACTORY_H
-#define MCOMPMGREXTENSIONFACTORY_H
-
-#include <QtPlugin>
-
-class MCompmgrExtensionFactory
-{
- public:
- virtual ~MCompmgrExtensionFactory() {}
-
- virtual MCompositeManagerExtension* create() = 0;
- virtual QString extensionName() = 0;
-};
-
-Q_DECLARE_INTERFACE(MCompmgrExtensionFactory,
- "com.nokia.mCompositor.MCompmgrExtensionFactory/1.0");
-
-#endif //MCOMPMGREXTENSIONFACTORY_H
--- src/mcompositemanager.cpp
+++ src/mcompositemanager.cpp
@@ -25,14 +25,11 @@
#include "msimplewindowframe.h"
#include "mdecoratorframe.h"
#include "mdevicestate.h"
-#include "mcompositemanagerextension.h"
-#include "mcompmgrextensionfactory.h"
#include <mrmiserver.h>
#include <QX11Info>
#include <QByteArray>
#include <QVector>
-#include <QtPlugin>
#include <X11/Xutil.h>
#include <X11/extensions/Xcomposite.h>
@@ -76,7 +73,7 @@
MCompAtoms *MCompAtoms::d = 0;
static bool hasDock = false;
static QRect availScreenRect = QRect();
-static KeyCode switcher_key = 0;
+static KeyCode key = 0;
// temporary launch indicator. will get replaced later
static QGraphicsTextItem *launchIndicator = 0;
@@ -147,7 +144,6 @@
"_MEEGOTOUCH_VIDEO_ALPHA",
"_MEEGO_STACKING_LAYER",
"_MEEGOTOUCH_DECORATOR_BUTTONS",
- "_MEEGOTOUCH_CURRENT_APP_WINDOW",
#ifdef WINDOW_DEBUG
// custom properties for CITA
@@ -160,7 +156,7 @@
#endif
};
- Q_ASSERT((sizeof(atom_names) / sizeof(atom_names[0])) == ATOMS_TOTAL);
+ Q_ASSERT(sizeof(atom_names) == ATOMS_TOTAL);
dpy = QX11Info::display();
@@ -237,10 +233,9 @@
int result = XGetWindowProperty(QX11Info::display(), w, array_atom, 0, 0,
False, XA_ATOM, &actual, &format,
&n, &left, &data);
- if (data && result == Success && actual == XA_ATOM && format == 32) {
+ if (result == Success && actual == XA_ATOM && format == 32) {
ret.resize(left / 4);
- XFree((void *) data);
- data = 0;
+ if (data) XFree((void *) data);
if (XGetWindowProperty(QX11Info::display(), w, array_atom, 0,
ret.size(), False, XA_ATOM, &actual, &format,
@@ -336,49 +331,6 @@
return 0;
}
-class MapRequesterPrivate: public QObject
-{
- Q_OBJECT
-public:
- static MapRequesterPrivate* instance(QObject* parent = 0)
- {
- if (!d)
- d = new MapRequesterPrivate(parent);
- return d;
- }
-
- void requestMap(Window window)
- {
- if (!((MCompositeManager *) qApp)->isCompositing()
- // if something is already queueing, add to the queue, otherwise
- // the mapping order goes wrong
- || !map_requests.isEmpty())
- map_requests.push_back(window);
- else
- XMapWindow(QX11Info::display(), window);
- }
-
-public slots:
- void grantMapRequests()
- {
- while (!map_requests.isEmpty()) {
- // first come first served
- Window w = map_requests.takeFirst();
- XMapWindow(QX11Info::display(), w);
- }
- }
-
-private:
- QList<Window> map_requests;
- explicit MapRequesterPrivate(QObject* parent = 0)
- :QObject(parent)
- {}
-
- static MapRequesterPrivate *d;
-};
-
-MapRequesterPrivate* MapRequesterPrivate::d = 0;
-
static Window transient_for(Window window)
{
Window transient_for = 0;
@@ -563,9 +515,9 @@
static void set_alpha_onplane(int plane, int value)
{
if (value == 255)
- toggle_global_alpha_blend(0, 0);
+ toggle_global_alpha_blend(0, plane);
else if (value < 255)
- toggle_global_alpha_blend(1, 0);
+ toggle_global_alpha_blend(1, plane);
set_global_alpha(plane, value);
}
@@ -580,6 +532,33 @@
return False;
}
+static void grab_pointer_keyboard(Window window)
+{
+ Display* dpy = QX11Info::display();
+ static bool ignored_mod = false;
+ if (!key)
+ key = XKeysymToKeycode(dpy, XStringToKeysym("BackSpace"));
+
+ XGrabButton(dpy, AnyButton, AnyModifier, window, True,
+ ButtonPressMask | ButtonReleaseMask | ButtonMotionMask,
+ GrabModeSync, GrabModeSync, None, None);
+ XGrabKey(dpy, key, Mod5Mask, window, True,
+ GrabModeSync, GrabModeSync);
+
+ if (!ignored_mod) {
+ XkbDescPtr xkb_t;
+
+ if ((xkb_t = XkbAllocKeyboard()) == NULL)
+ return;
+
+ if (XkbGetControls(dpy, XkbAllControlsMask, xkb_t) == Success)
+ XkbSetIgnoreLockMods(dpy, xkb_t->device_spec, Mod5Mask, Mod5Mask,
+ 0, 0);
+ XkbFreeControls(xkb_t, 0, True);
+ ignored_mod = true;
+ }
+}
+
static void kill_window(Window window)
{
int pid = MCompAtoms::instance()->getPid(window);
@@ -620,7 +599,6 @@
MCompositeManagerPrivate::MCompositeManagerPrivate(QObject *p)
: QObject(p),
prev_focus(0),
- buttoned_win(0),
glwidget(0),
compositing(true),
stacking_timeout_check_visibility(false)
@@ -638,9 +616,6 @@
this, SLOT(callOngoing(bool)));
stacking_timer.setSingleShot(true);
connect(&stacking_timer, SIGNAL(timeout()), this, SLOT(stackingTimeout()));
- connect(this, SIGNAL(compositingEnabled()), MapRequesterPrivate::instance(this),
- SLOT(grantMapRequests()));
-
}
MCompositeManagerPrivate::~MCompositeManagerPrivate()
@@ -676,31 +651,6 @@
emit inputEnabled();
}
-static void setup_key_grabs()
-{
- Display* dpy = QX11Info::display();
- static bool ignored_mod = false;
- if (!switcher_key) {
- switcher_key = XKeysymToKeycode(dpy, XStringToKeysym("BackSpace"));
- XGrabKey(dpy, switcher_key, Mod5Mask,
- RootWindow(QX11Info::display(), 0), True,
- GrabModeSync, GrabModeSync);
- }
-
- if (!ignored_mod) {
- XkbDescPtr xkb_t;
-
- if ((xkb_t = XkbAllocKeyboard()) == NULL)
- return;
-
- if (XkbGetControls(dpy, XkbAllControlsMask, xkb_t) == Success)
- XkbSetIgnoreLockMods(dpy, xkb_t->device_spec, Mod5Mask, Mod5Mask,
- 0, 0);
- XkbFreeControls(xkb_t, 0, True);
- ignored_mod = true;
- }
-}
-
void MCompositeManagerPrivate::prepare()
{
MDecoratorFrame::instance();
@@ -721,7 +671,7 @@
XInternAtom(QX11Info::display(), "UTF8_STRING", 0), 8,
PropModeReplace, (unsigned char *) wm_name.toUtf8().data(),
wm_name.size());
- setup_key_grabs();
+
Xutf8SetWMProperties(QX11Info::display(), w, "MCompositor",
"MCompositor", NULL, 0, NULL, NULL,
@@ -737,52 +687,12 @@
enableInput();
XDamageQueryExtension(QX11Info::display(), &damage_event, &damage_error);
-
- // create InputOnly windows for close and Home button handling
- close_button_win = XCreateWindow(QX11Info::display(),
- RootWindow(QX11Info::display(), 0),
- -1, -1, 1, 1, 0, CopyFromParent,
- InputOnly, CopyFromParent, 0, 0);
- XSelectInput(QX11Info::display(), close_button_win,
- ButtonReleaseMask | ButtonPressMask);
- XMapWindow(QX11Info::display(), close_button_win);
- home_button_win = XCreateWindow(QX11Info::display(),
- RootWindow(QX11Info::display(), 0),
- -1, -1, 1, 1, 0, CopyFromParent,
- InputOnly, CopyFromParent, 0, 0);
- XSelectInput(QX11Info::display(), home_button_win,
- ButtonReleaseMask | ButtonPressMask);
- XMapWindow(QX11Info::display(), home_button_win);
-}
-
-void MCompositeManagerPrivate::loadPlugins()
-{
- // hard-coded for now. move this to plugindir later
-#define PDIR "/usr/lib/mcompositor"
- QDir pluginsDir = QDir(PDIR);
-
- foreach (QString fileName, pluginsDir.entryList(QDir::Files)) {
- QPluginLoader loader(pluginsDir.absoluteFilePath(fileName));
- QObject *plugin = loader.instance();
- if (plugin) {
- MCompmgrExtensionFactory* p = qobject_cast<MCompmgrExtensionFactory *>(plugin);
- if (p)
- p->create();
- } else {
- QString msg;
- QDebug dbg(&msg);
- dbg << "didnt load" << loader.fileName() << loader.errorString();
- ((MCompositeManager*)qApp)->debug(msg);
- }
- }
}
bool MCompositeManagerPrivate::needDecoration(Window window,
MWindowPropertyCache *pc)
{
bool fs;
- if (pc && pc->isInputOnly())
- return false;
if (!pc)
fs = atom->hasState(window, ATOM(_NET_WM_STATE_FULLSCREEN));
else
@@ -807,7 +717,7 @@
else if (!pc) {
XWindowAttributes a;
if (!XGetWindowAttributes(QX11Info::display(), window, &a)
- || a.override_redirect || a.c_class == InputOnly)
+ || a.override_redirect)
return false;
}
MCompAtoms::Type t;
@@ -854,12 +764,11 @@
configure_reqs.remove(e->window);
}
- bool delete_pc_later = false;
MCompositeWindow *item = COMPOSITE_WINDOW(e->window);
if (item) {
item->deleteLater();
- removeWindow(item->window());
- delete_pc_later = true; // PC deleted with the MCompositeWindow
+ if (!removeWindow(e->window))
+ qWarning("destroyEvent(): Error removing window");
} else {
// We got a destroy event from a framed window (or a window that was
// never mapped)
@@ -869,9 +778,7 @@
delete fd.frame;
}
}
-
- if (!delete_pc_later && prop_caches.contains(e->window)
- && (!item || !item->isClosing())) {
+ if (prop_caches.contains(e->window)) {
delete prop_caches.value(e->window);
prop_caches.remove(e->window);
}
@@ -892,14 +799,6 @@
enableCompositing(false);
}
}
-#ifdef GLES2_VERSION
- // global alpha events here. TODO: property cache class could handle this
- // but it is straightforward to manipulate it from here
- if (pc && e->atom == ATOM(_MEEGOTOUCH_GLOBAL_ALPHA))
- set_alpha_onplane(0, pc->globalAlpha());
- if (pc && e->atom == ATOM(_MEEGOTOUCH_VIDEO_ALPHA))
- set_alpha_onplane(2, pc->videoGlobalAlpha());
-#endif
}
Window MCompositeManagerPrivate::getLastVisibleParent(MWindowPropertyCache *pc)
@@ -954,7 +853,7 @@
MWindowPropertyCache *pc;
if (cw && cw->isMapped() && (pc = cw->propertyCache()) &&
!pc->isOverrideRedirect() &&
- (cw->needDecoration() || cw->status() == MCompositeWindow::Hung
+ (cw->needDecoration() || cw->status() == MCompositeWindow::HUNG
|| (FULLSCREEN_WINDOW(cw) &&
pc->windowTypeAtom() != ATOM(_KDE_NET_WM_WINDOW_TYPE_OVERRIDE)
&& pc->windowTypeAtom() != ATOM(_NET_WM_WINDOW_TYPE_MENU)
@@ -968,18 +867,13 @@
// stacking order sensitive logic
bool MCompositeManagerPrivate::possiblyUnredirectTopmostWindow()
{
- static const QRegion fs_r(0, 0,
- ScreenOfDisplay(QX11Info::display(),
- DefaultScreen(QX11Info::display()))->width,
- ScreenOfDisplay(QX11Info::display(),
- DefaultScreen(QX11Info::display()))->height);
bool ret = false;
Window top = 0;
int win_i = -1;
MCompositeWindow *cw = 0;
for (int i = stacking_list.size() - 1; i >= 0; --i) {
Window w = stacking_list.at(i);
- if (!(cw = COMPOSITE_WINDOW(w)) || cw->propertyCache()->isInputOnly())
+ if (!(cw = COMPOSITE_WINDOW(w)))
continue;
if (w == stack[DESKTOP_LAYER]) {
top = w;
@@ -988,23 +882,28 @@
}
if (cw->isMapped() && (cw->propertyCache()->hasAlpha()
|| cw->needDecoration()
- || cw->propertyCache()->isDecorator()
- // FIXME: implement direct rendering for shaped windows
- || !fs_r.subtracted(cw->propertyCache()->shapeRegion()).isEmpty()))
+ || cw->propertyCache()->isDecorator()))
// this window prevents direct rendering
return false;
- // it is a fullscreen, non-transparent window of any type
- if (cw->isMapped()) {
+ if (cw->isMapped() && cw->isAppWindow(true)) {
top = w;
win_i = i;
break;
}
}
-
- // compositing is always assumed when a window gets mapped because of our
- // MapRequester class
-
- if (top && cw && !MCompositeWindow::hasTransitioningWindow()) {
+ // check if we have a window that is about to map, because that should
+ // affect the decision
+ bool being_mapped = false;
+ for (QHash<Window, MWindowPropertyCache*>::iterator it = prop_caches.begin();
+ it != prop_caches.end(); ++it) {
+ MWindowPropertyCache *pc = it.value();
+ if (pc->beingMapped()) {
+ being_mapped = true;
+ break;
+ }
+ }
+ if (!being_mapped && top && cw &&
+ !MCompositeWindow::hasTransitioningWindow()) {
// unredirect the chosen window and any docks and OR windows above it
// TODO: what else should be unredirected?
if (!((MTexturePixmapItem *)cw)->isDirectRendered()) {
@@ -1048,8 +947,6 @@
wpc = prop_caches.value(e->window);
wpc->setBeingMapped(false);
wpc->setIsMapped(false);
- if (!wpc->isInputOnly())
- XRemoveFromSaveSet(QX11Info::display(), e->window);
}
// do not keep unmapped windows in windows_as_mapped list
@@ -1064,10 +961,7 @@
if (item) {
item->stopPing();
item->setIsMapped(false);
- if (e->send_event == True)
- setWindowState(e->window, WithdrawnState);
- else
- setWindowState(e->window, IconicState);
+ setWindowState(e->window, IconicState);
if (item->isVisible() && !item->isClosing())
item->setVisible(false);
if (!item->isClosing())
@@ -1084,7 +978,7 @@
positionWindow(MDecoratorFrame::instance()->winId(),
STACK_BOTTOM);
} else {
- if (cw->status() == MCompositeWindow::Hung) {
+ if (cw->status() == MCompositeWindow::HUNG) {
MDecoratorFrame::instance()->setManagedWindow(cw, true);
MDecoratorFrame::instance()->setOnlyStatusbar(false);
} else if (FULLSCREEN_WINDOW(cw) && device_state->ongoingCall()) {
@@ -1106,6 +1000,7 @@
XReparentWindow(QX11Info::display(), e->window,
RootWindow(QX11Info::display(), 0), 0, 0);
setWindowState(e->window, IconicState);
+ XRemoveFromSaveSet(QX11Info::display(), e->window);
framed_windows.remove(e->window);
XUngrabServer(QX11Info::display());
delete fd.frame;
@@ -1123,18 +1018,17 @@
MCompositeWindow *c_newtop = MCompositeWindow::compositeWindow(newtop);
if(c_newtop) {
set_alpha_onplane(0, c_newtop->propertyCache()->globalAlpha());
- set_alpha_onplane(2, c_newtop->propertyCache()->videoGlobalAlpha());
+ set_alpha_onplane(1, c_newtop->propertyCache()->videoGlobalAlpha());
} else {
set_alpha_onplane(0, 255);
- set_alpha_onplane(2, 255);
+ set_alpha_onplane(1, 255);
}
#endif
}
void MCompositeManagerPrivate::configureEvent(XConfigureEvent *e)
{
- if (e->window == xoverlay || e->window == localwin
- || e->window == close_button_win || e->window == home_button_win)
+ if (e->window == xoverlay || e->window == localwin)
return;
MCompositeWindow *item = COMPOSITE_WINDOW(e->window);
@@ -1147,10 +1041,8 @@
item->propertyCache()->setRealGeometry(r);
check_visibility = true;
}
- if (item->propertyCache()->windowState() != IconicState) {
- item->setPos(e->x, e->y);
- item->resize(e->width, e->height);
- }
+ item->setPos(e->x, e->y);
+ item->resize(e->width, e->height);
if (e->override_redirect == True) {
if (check_visibility)
dirtyStacking(true);
@@ -1163,7 +1055,7 @@
MDecoratorFrame::instance()->decoratorItem() &&
MDecoratorFrame::instance()->managedWindow() == e->window) {
if (FULLSCREEN_WINDOW(item) &&
- item->status() != MCompositeWindow::Hung) {
+ item->status() != MCompositeWindow::HUNG) {
// ongoing call case
MDecoratorFrame::instance()->setManagedWindow(item, true);
MDecoratorFrame::instance()->setOnlyStatusbar(true);
@@ -1176,13 +1068,12 @@
item->update();
dirtyStacking(check_visibility);
check_visibility = false;
- } else
- dirtyStacking(check_visibility);
+ }
} else {
// FIXME: seems that this branch is never executed?
if (e->window == MDecoratorFrame::instance()->managedWindow())
MDecoratorFrame::instance()->lower();
- // item->setIconified(true);
+ item->setIconified(true);
// ensure ZValue is set only after the animation is done
item->requestZValue(0);
@@ -1313,8 +1204,7 @@
XConfigureWindow(QX11Info::display(), e->window, value_mask, &wc);
}
// store configure request for handling it at window mapping time
- QList<XConfigureRequestEvent*> def;
- QList<XConfigureRequestEvent*> l = configure_reqs.value(e->window, def);
+ QList<XConfigureRequestEvent*> l = configure_reqs.value(e->window);
XConfigureRequestEvent *e_copy =
(XConfigureRequestEvent*)malloc(sizeof(*e));
memcpy(e_copy, e, sizeof(*e));
@@ -1356,8 +1246,6 @@
// we know the parent due to SubstructureRedirectMask on root window
pc->setParentWindow(RootWindow(dpy, 0));
}
- if(!pc->isInputOnly())
- XAddToSaveSet(QX11Info::display(), e->window);
MCompAtoms::Type wtype = pc->windowType();
QRect a = pc->realGeometry();
@@ -1391,7 +1279,7 @@
MDecoratorFrame::instance()->setManagedWindow(0);
MCompositeWindow *cw;
if ((cw = getHighestDecorated())) {
- if (cw->status() == MCompositeWindow::Hung) {
+ if (cw->status() == MCompositeWindow::HUNG) {
MDecoratorFrame::instance()->setManagedWindow(cw, true);
} else if (FULLSCREEN_WINDOW(cw) && device_state->ongoingCall()) {
MDecoratorFrame::instance()->setManagedWindow(cw, true);
@@ -1414,9 +1302,11 @@
pc->setBeingMapped(true);
if (needDecoration(e->window, pc)) {
+ XAddToSaveSet(QX11Info::display(), e->window);
+
if (MDecoratorFrame::instance()->decoratorItem()) {
enableCompositing();
- MapRequesterPrivate::instance()->requestMap(e->window);
+ XMapWindow(QX11Info::display(), e->window);
// initially visualize decorator item so selective compositing
// checks won't disable compositing
MDecoratorFrame::instance()->decoratorItem()->setVisible(true);
@@ -1461,8 +1351,8 @@
XReparentWindow(QX11Info::display(), e->window,
frame->windowArea(), 0, 0);
- setWindowState(e->window, NormalState);
- MapRequesterPrivate::instance()->requestMap(e->window);
+ setWindowState(e->window, NormalState);
+ XMapWindow(QX11Info::display(), e->window);
frame->show();
XSync(QX11Info::display(), False);
@@ -1473,7 +1363,7 @@
setWindowState(e->window, IconicState);
else
setWindowState(e->window, NormalState);
- MapRequesterPrivate::instance()->requestMap(e->window);
+ XMapWindow(QX11Info::display(), e->window);
}
}
@@ -1616,64 +1506,14 @@
}
}
-// TODO: make this know when the property changed, to avoid X calls
-void MCompositeManagerPrivate::setupButtonWindows(MCompositeWindow *topmost)
-{
- bool home_set = false, close_set = false;
- if (topmost) {
- XWindowChanges wc = {0, 0, 0, 0, 0, topmost->window(), Above};
- int mask = CWX | CWY | CWWidth | CWHeight | CWSibling | CWStackMode;
- const QRect &h = topmost->propertyCache()->homeButtonGeometry();
- if (h.width() > 1 && h.height() > 1) {
- wc.x = h.x(); wc.y = h.y();
- wc.width = h.width(); wc.height = h.height();
- XConfigureWindow(QX11Info::display(), home_button_win, mask, &wc);
- home_button_geom = h;
- home_set = true;
- }
- const QRect &c = topmost->propertyCache()->closeButtonGeometry();
- if (c.width() > 1 && c.height() > 1) {
- wc.x = c.x(); wc.y = c.y();
- wc.width = c.width(); wc.height = c.height();
- XConfigureWindow(QX11Info::display(), close_button_win, mask, &wc);
- close_button_geom = c;
- close_set = true;
- }
- }
- if ((home_set || close_set) && topmost) {
- buttoned_win = topmost->window();
- if (!home_set)
- XLowerWindow(QX11Info::display(), home_button_win);
- if (!close_set)
- XLowerWindow(QX11Info::display(), close_button_win);
- } else if (buttoned_win) {
- buttoned_win = 0;
- XLowerWindow(QX11Info::display(), close_button_win);
- XLowerWindow(QX11Info::display(), home_button_win);
- }
-}
-
-void MCompositeManagerPrivate::setCurrentApp(Window w)
-{
- static Window prev = (Window)-1;
- if (prev == w)
- return;
- XChangeProperty(QX11Info::display(), RootWindow(QX11Info::display(), 0),
- ATOM(_MEEGOTOUCH_CURRENT_APP_WINDOW),
- XA_WINDOW, 32, PropModeReplace, (unsigned char *)&w, 1);
- current_app = w;
- emit currentAppChanged(current_app);
- prev = w;
-}
-
#define RAISE_MATCHING(X) { \
first_moved = 0; \
for (int i = 0; i < last_i;) { \
Window w = stacking_list.at(i); \
if (w == first_moved) break; \
MCompositeWindow *cw = COMPOSITE_WINDOW(w); \
- if (cw && cw->isMapped() && (X)) { \
- stacking_list.move(i, last_i); \
+ if (cw && (X)) { \
+ safe_move(stacking_list, i, last_i); \
raise_transients(stacking_list, w, last_i); \
if (!first_moved) first_moved = w; \
} else ++i; \
@@ -1693,8 +1533,7 @@
}
stacking_timer.stop();
}
- Window active_app = 0, duihome = stack[DESKTOP_LAYER], first_moved,
- set_as_current_app = 0;
+ Window active_app = 0, duihome = stack[DESKTOP_LAYER], first_moved;
int last_i = stacking_list.size() - 1;
bool desktop_up = false, fs_app = false;
int app_i = -1;
@@ -1702,13 +1541,10 @@
MCompositeWindow *aw = 0;
active_app = getTopmostApp(&app_i);
- if (!active_app || app_i < 0) {
+ if (!active_app || app_i < 0)
desktop_up = true;
- if (duihome)
- set_as_current_app = duihome;
- } else {
+ else {
aw = COMPOSITE_WINDOW(active_app);
- set_as_current_app = active_app;
if (aw) {
// getTopmostApp() can return a transient now
Window parent = getLastVisibleParent(aw->propertyCache());
@@ -1755,7 +1591,7 @@
== ATOM(_NET_WM_WINDOW_TYPE_DOCK))
else if (active_app && aw && deco->decoratorItem() &&
deco->managedWindow() == active_app &&
- (fs_app || aw->status() == MCompositeWindow::Hung)) {
+ (fs_app || aw->status() == MCompositeWindow::HUNG)) {
// no dock => decorator starts from (0,0)
XMoveWindow(QX11Info::display(), deco->decoratorItem()->window(), 0, 0);
}
@@ -1816,7 +1652,7 @@
if (highest_d && highest_d == topmost && deco->decoratorItem()
&& deco->managedWindow() == highest_d->window()
&& (!FULLSCREEN_WINDOW(highest_d)
- || highest_d->status() == MCompositeWindow::Hung
+ || highest_d->status() == MCompositeWindow::HUNG
|| device_state->ongoingCall())) {
Window deco_w = deco->decoratorItem()->window();
int deco_i = stacking_list.indexOf(deco_w);
@@ -1842,35 +1678,35 @@
for (int i = 0; i <= last_i; ++i) {
MCompositeWindow *witem = COMPOSITE_WINDOW(stacking_list.at(i));
if (witem && witem->isMapped() &&
- !witem->isNewlyMapped() && !witem->isClosing())
+ !witem->propertyCache()->isOverrideRedirect()
+ && !witem->isNewlyMapped())
only_mapped.append(stacking_list.at(i));
}
static QList<Window> prev_only_mapped;
-
- // fix Z-values always to make sure we do it after an animation
- for (int i = 0; i <= last_i; ++i) {
- MCompositeWindow *witem = COMPOSITE_WINDOW(stacking_list.at(i));
- if (witem && witem->hasTransitioningWindow())
- // don't change Z values until animation is over
- break;
- if (witem)
- witem->requestZValue(i);
- }
bool order_changed = prev_only_mapped != only_mapped;
if (order_changed) {
+ /* fix Z-values */
+ for (int i = 0; i <= last_i; ++i) {
+ MCompositeWindow *witem = COMPOSITE_WINDOW(stacking_list.at(i));
+ if (witem && witem->hasTransitioningWindow())
+ // don't change Z values until animation is over
+ break;
+ if (witem)
+ witem->requestZValue(i);
+ }
+
QList<Window> reverse;
for (int i = last_i; i >= 0; --i)
reverse.append(stacking_list.at(i));
XRestackWindows(QX11Info::display(), reverse.toVector().data(),
reverse.size());
- // decorator and OR windows are not included to the property
+ // decorator is not included to the property
QList<Window> no_decors = only_mapped;
for (int i = 0; i <= last_i; ++i) {
MCompositeWindow *witem = COMPOSITE_WINDOW(stacking_list.at(i));
if (witem && witem->isMapped() &&
- (witem->propertyCache()->isOverrideRedirect()
- || witem->propertyCache()->isDecorator()))
+ witem->propertyCache()->isDecorator())
no_decors.removeOne(stacking_list.at(i));
}
XChangeProperty(QX11Info::display(),
@@ -1885,8 +1721,6 @@
if (!device_state->displayOff())
pingTopmost();
}
- // possibly set up InputOnly windows for close and home buttons
- setupButtonWindows(topmost);
if (order_changed || force_visibility_check) {
static int xres = ScreenOfDisplay(QX11Info::display(),
DefaultScreen(QX11Info::display()))->width;
@@ -1901,7 +1735,7 @@
break;
}
MCompositeWindow *cw = COMPOSITE_WINDOW(w);
- MWindowPropertyCache *pc = 0;
+ MWindowPropertyCache *pc;
if (cw && cw->isMapped())
pc = cw->propertyCache();
if (cw && cw->isMapped() && !pc->hasAlpha() &&
@@ -1944,14 +1778,13 @@
setWindowState(cw->window(), NormalState);
}
}
- setCurrentApp(set_as_current_app);
}
void MCompositeManagerPrivate::stackingTimeout()
{
checkStacking(stacking_timeout_check_visibility);
stacking_timeout_check_visibility = false;
- if (!device_state->displayOff() && !possiblyUnredirectTopmostWindow())
+ if (!device_state->displayOff() && !possiblyUnredirectTopmostWindow())
enableCompositing(true);
}
@@ -1964,8 +1797,7 @@
enableRedirection();
return;
}
- if (win == localwin || win == localwin_parent || win == close_button_win
- || win == home_button_win)
+ if (win == localwin || win == localwin_parent)
return;
MWindowPropertyCache *wpc;
@@ -2023,7 +1855,7 @@
int g_alpha = wpc->globalAlpha();
int v_alpha = wpc->videoGlobalAlpha();
set_alpha_onplane(0, g_alpha);
- set_alpha_onplane(2, v_alpha);
+ set_alpha_onplane(1, v_alpha);
#endif
MWindowPropertyCache *pc = 0;
@@ -2035,13 +1867,12 @@
pc = item->propertyCache();
if (!pc) return;
}
- // Compositing is always assumed to be enabled at this point if a window
+ // Compositing is assumed to be enabled at this point if a window
// has alpha channels
if (!compositing && (pc && pc->hasAlpha())) {
qWarning("mapEvent(): compositing not enabled!");
- enableCompositing(true);
+ return;
}
-
if (item && pc) {
if (wtype == MCompAtoms::NORMAL)
pc->setWindowTypeAtom(ATOM(_NET_WM_WINDOW_TYPE_NORMAL));
@@ -2056,18 +1887,18 @@
setWindowDebugProperties(item->window());
} else
item->saveBackingStore(true);
+ item->setVisible(true);
// TODO: don't show the animation if the window is not stacked on top
const XWMHints &h = pc->getWMHints();
- if ((!(h.flags & StateHint) || h.initial_state != IconicState)
- && !pc->isInputOnly())
- item->showWindow();
- else {
- item->setVisible(true);
+ if (!(h.flags & StateHint) || h.initial_state != IconicState)
+ item->fadeIn();
+ else
item->setNewlyMapped(false);
- }
goto stack_and_return;
}
+ grab_pointer_keyboard(win);
+
// only composite top-level windows
if ((wpc->parentWindow() == RootWindow(QX11Info::display(), 0))
&& (e->event == QX11Info::appRootWindow())) {
@@ -2082,8 +1913,8 @@
#endif
const XWMHints &h = pc->getWMHints();
if ((!(h.flags & StateHint) || h.initial_state != IconicState)
- && !pc->isInputOnly() && item->isAppWindow())
- item->showWindow();
+ && item->isAppWindow())
+ item->fadeIn();
else {
item->setVisible(true);
item->setNewlyMapped(false);
@@ -2139,7 +1970,6 @@
{
MWindowPropertyCache *pc = cw->propertyCache();
if (pc->supportedProtocols().indexOf(ATOM(_NET_WM_PING)) != -1
- && pc->windowTypeAtom() != ATOM(_NET_WM_WINDOW_TYPE_NOTIFICATION)
&& pc->windowTypeAtom() != ATOM(_NET_WM_WINDOW_TYPE_DOCK)
&& pc->windowTypeAtom() != ATOM(_NET_WM_WINDOW_TYPE_MENU)
&& !pc->isDecorator() && !pc->isOverrideRedirect()
@@ -2170,15 +2000,8 @@
if (i && i->propertyCache()->windowState() == IconicState) {
i->setZValue(windows.size() + 1);
QRectF iconGeometry = i->propertyCache()->iconGeometry();
+ i->setPos(iconGeometry.topLeft());
i->restore(iconGeometry, needComp);
-#ifdef GLES2_VERSION
- int g_alpha = i->propertyCache()->globalAlpha();
- if (g_alpha < 255)
- set_alpha_onplane(0, g_alpha);
- int v_alpha = i->propertyCache()->videoGlobalAlpha();
- if (v_alpha < 255)
- set_alpha_onplane(2, v_alpha);
-#endif
}
if (fd.frame)
setWindowState(fd.frame->managedWindow(), NormalState);
@@ -2201,20 +2024,46 @@
} else
// use composition due to the transition effect
activateWindow(event->window, CurrentTime, false);
- } else if (i && event->message_type == ATOM(_NET_CLOSE_WINDOW)) {
-
- i->closeWindow();
- // update stacking list to remove window from switcher
- if (i->propertyCache()->windowState() != IconicState)
- checkStacking(false);
-
+ } else if (event->message_type == ATOM(_NET_CLOSE_WINDOW)) {
+ Window close_window = event->window;
+ if (i) {
+ i->setClosing(true);
+ i->fadeOut();
+ }
+ bool delete_sent = false;
+ if (i && (i->propertyCache()->supportedProtocols().indexOf(
+ ATOM(WM_DELETE_WINDOW)) != -1) && i->status() == MCompositeWindow::NORMAL) {
+ // send WM_DELETE_WINDOW message to the window that needs to close
+ XEvent ev;
+ memset(&ev, 0, sizeof(ev));
+
+ ev.xclient.type = ClientMessage;
+ ev.xclient.window = close_window;
+ ev.xclient.message_type = ATOM(WM_PROTOCOLS);
+ ev.xclient.format = 32;
+ ev.xclient.data.l[0] = ATOM(WM_DELETE_WINDOW);
+ ev.xclient.data.l[1] = CurrentTime;
+
+ XSendEvent(QX11Info::display(), close_window, False,
+ NoEventMask, &ev);
+ // FIXME: we should check if desktop is exposed or not
+ setExposeDesktop(true);
+ delete_sent = true;
+ }
+ if (i && (!delete_sent || i->status() == MCompositeWindow::HUNG)) {
+ kill_window(close_window);
+ MDecoratorFrame::instance()->lower();
+ removeWindow(close_window);
+ delete i; // it is already removed from hash tables
+ return;
+ }
} else if (event->message_type == ATOM(WM_PROTOCOLS)) {
if (event->data.l[0] == (long) ATOM(_NET_WM_PING)) {
MCompositeWindow *ping_source = COMPOSITE_WINDOW(event->data.l[2]);
if (ping_source) {
- bool was_hung = ping_source->status() == MCompositeWindow::Hung;
+ bool was_hung = ping_source->status() == MCompositeWindow::HUNG;
ping_source->receivedPing(event->data.l[1]);
- Q_ASSERT(ping_source->status() != MCompositeWindow::Hung);
+ Q_ASSERT(ping_source->status() != MCompositeWindow::HUNG);
Window managed = MDecoratorFrame::instance()->managedWindow();
if (was_hung && ping_source->window() == managed
&& !ping_source->needDecoration()) {
@@ -2252,7 +2101,7 @@
MCompositeWindow *i = COMPOSITE_WINDOW(event->window);
MCompositeWindow *d_item = COMPOSITE_WINDOW(stack[DESKTOP_LAYER]);
- if (d_item && i && i->status() != MCompositeWindow::Minimizing) {
+ if (d_item && i) {
d_item->setZValue(i->zValue() - 1);
Window lower, topmost = getTopmostApp();
@@ -2285,12 +2134,7 @@
if (w == stack[DESKTOP_LAYER])
break;
MCompositeWindow *cw = COMPOSITE_WINDOW(w);
- if (cw && cw->isMapped() && (cw->isAppWindow(true)
- // mark transient dialogs Iconic too, so that
- // restoreHandler() is called when they are maximised
- || (cw->propertyCache()->windowTypeAtom()
- == ATOM(_NET_WM_WINDOW_TYPE_DIALOG)
- && getLastVisibleParent(cw->propertyCache()))) &&
+ if (cw && cw->isMapped() && cw->isAppWindow(true) &&
// skip devicelock and screenlock windows
(cw->propertyCache()->meegoStackingLayer() > 2 ||
cw->propertyCache()->meegoStackingLayer() == 0))
@@ -2315,42 +2159,11 @@
rootMessageEvent(event);
}
-void MCompositeManagerPrivate::closeHandler(MCompositeWindow *window)
-{
- bool delete_sent = false;
- if ((window->propertyCache()->supportedProtocols().indexOf(
- ATOM(WM_DELETE_WINDOW)) != -1) && window->status() != MCompositeWindow::Hung) {
- // send WM_DELETE_WINDOW message to the window that needs to close
- XEvent ev;
- memset(&ev, 0, sizeof(ev));
-
- ev.xclient.type = ClientMessage;
- ev.xclient.window = window->window();
- ev.xclient.message_type = ATOM(WM_PROTOCOLS);
- ev.xclient.format = 32;
- ev.xclient.data.l[0] = ATOM(WM_DELETE_WINDOW);
- ev.xclient.data.l[1] = CurrentTime;
-
- XSendEvent(QX11Info::display(), window->window(), False,
- NoEventMask, &ev);
- // FIXME: we should check if desktop is exposed or not
- setExposeDesktop(true);
- delete_sent = true;
- }
-
- if ((!delete_sent || window->status() == MCompositeWindow::Hung)) {
- kill_window(window->window());
- MDecoratorFrame::instance()->lower();
- }
- /* DO NOT deleteLater() this window yet because
- a) it can remove a mapped window from stacking_list
- b) delete can be ignored (e.g. "Do you want to exit?" dialog)
- c) _NET_WM_PID could be wrong (i.e. the window does not go away)
- d) we get UnmapNotify/DestroyNotify anyway when it _really_ closes */
-}
+void MCompositeManagerPrivate::iconifyOnLower(MCompositeWindow *window)
+{
+ if (window->iconifyState() != MCompositeWindow::TransitionIconifyState)
+ return;
-void MCompositeManagerPrivate::lowerHandler(MCompositeWindow *window)
-{
// TODO: (work for more)
// Handle minimize request coming from a managed window itself,
// if there are any
@@ -2370,14 +2183,9 @@
positionWindow(stack[DESKTOP_LAYER], STACK_TOP);
dirtyStacking(false);
}
-#ifdef GLES2_VERSION
- // Reset the global alpha on minimize
- set_alpha_onplane(0, 255);
- set_alpha_onplane(2, 255);
-#endif
}
-void MCompositeManagerPrivate::restoreHandler(MCompositeWindow *window)
+void MCompositeManagerPrivate::raiseOnRestore(MCompositeWindow *window)
{
Window last = getLastVisibleParent(window->propertyCache());
MCompositeWindow *to_stack;
@@ -2386,14 +2194,9 @@
else
to_stack = window;
setWindowState(to_stack->window(), NormalState);
-
- // FIXME: call these for the whole transiency chain
- window->setNewlyMapped(false);
- if (to_stack != window)
- to_stack->setNewlyMapped(false);
- window->setUntransformed();
- if (window != to_stack)
- to_stack->setUntransformed();
+
+ if (window->isNewlyMapped())
+ window->setNewlyMapped(false);
positionWindow(to_stack->window(), STACK_TOP);
@@ -2457,16 +2260,16 @@
// move it to the correct position in the stack
positionWindow(to_stack->window(), STACK_TOP);
// possibly set decorator
- if (cw == getHighestDecorated() || cw->status() == MCompositeWindow::Hung) {
+ if (cw == getHighestDecorated() || cw->status() == MCompositeWindow::HUNG) {
if (FULLSCREEN_WINDOW(cw)) {
// fullscreen window has decorator above it during ongoing call
// and when it's jammed
MDecoratorFrame::instance()->setManagedWindow(cw, true);
- if (cw->status() == MCompositeWindow::Hung)
+ if (cw->status() == MCompositeWindow::HUNG)
MDecoratorFrame::instance()->setOnlyStatusbar(false);
else
MDecoratorFrame::instance()->setOnlyStatusbar(true);
- } else if (cw->status() == MCompositeWindow::Hung) {
+ } else if (cw->status() == MCompositeWindow::HUNG) {
MDecoratorFrame::instance()->setManagedWindow(cw, true);
MDecoratorFrame::instance()->setOnlyStatusbar(false);
} else {
@@ -2506,8 +2309,8 @@
enableCompositing(false);
/* start pinging again */
pingTopmost();
+ dirtyStacking(true); // VisibilityNotify generation
}
- dirtyStacking(true); // VisibilityNotify generation
}
void MCompositeManagerPrivate::callOngoing(bool ongoing_call)
@@ -2578,7 +2381,6 @@
bool MCompositeManagerPrivate::x11EventFilter(XEvent *event)
{
- // Core non-subclassable events
static const int damage_ev = damage_event + XDamageNotify;
static int shape_event_base = 0;
if (!shape_event_base) {
@@ -2602,11 +2404,8 @@
}
return true;
}
-
- if (processX11EventFilters(event))
- return true;
-
switch (event->type) {
+
case DestroyNotify:
destroyEvent(&event->xdestroywindow); break;
case PropertyNotify:
@@ -2624,7 +2423,7 @@
case ClientMessage:
clientMessageEvent(&event->xclient); break;
case ButtonRelease:
- case ButtonPress:
+ case ButtonPress:
buttonEvent(&event->xbutton);
// Qt needs to handle this event for the window frame buttons
return false;
@@ -2649,55 +2448,35 @@
return true;
}
-bool MCompositeManagerPrivate::processX11EventFilters(XEvent *event)
-{
- if (!m_extensions.contains(event->type))
- return false;
-
- QList<MCompositeManagerExtension*> evlist = m_extensions.values(event->type);
- bool processed = false;
- for (int i = 0; i < evlist.size(); ++i)
- processed = evlist[i]->x11Event(event);
-
- return processed;
-}
-
void MCompositeManagerPrivate::keyEvent(XKeyEvent* e)
{
- if (e->state & Mod5Mask && e->keycode == switcher_key)
+ if (e->state & Mod5Mask && e->keycode == key)
exposeSwitcher();
}
void MCompositeManagerPrivate::buttonEvent(XButtonEvent* e)
{
- if (e->type == ButtonRelease && e->window == home_button_win
- && e->x >= 0 && e->y >= 0 && e->x <= home_button_geom.width()
- && e->y <= home_button_geom.height())
- exposeSwitcher();
- else if (e->type == ButtonRelease && buttoned_win
- && e->window == close_button_win && e->x >= 0 && e->y >= 0
- && e->x <= close_button_geom.width()
- && e->y <= close_button_geom.height()) {
- XClientMessageEvent ev;
- memset(&ev, 0, sizeof(ev));
- ev.type = ClientMessage;
- ev.window = buttoned_win;
- ev.message_type = ATOM(WM_PROTOCOLS);
- ev.format = 32;
- ev.data.l[0] = ATOM(WM_DELETE_WINDOW);
- ev.data.l[1] = CurrentTime;
- XSendEvent(QX11Info::display(), buttoned_win, False, NoEventMask,
- (XEvent*)&ev);
- return;
- }
- if (buttoned_win) {
- XButtonEvent ev = *e;
- // synthetise the event to the application below
- ev.window = buttoned_win;
- XSendEvent(QX11Info::display(), buttoned_win, False,
- e->type == ButtonPress ? ButtonPressMask
- : ButtonReleaseMask, (XEvent*)&ev);
+ MCompositeWindow *cw = COMPOSITE_WINDOW(e->window);
+ if (cw) {
+ int ev_x = e->x;
+ int ev_y = e->y;
+ QRect h = cw->propertyCache()->homeButtonGeometry();
+ if (h.x() <= ev_x && h.y() <= ev_y && h.y() + h.height() >= ev_y
+ && h.x() + h.width() >= ev_x)
+ exposeSwitcher();
+ QRect c = cw->propertyCache()->closeButtonGeometry();
+ if (c.x() <= ev_x && c.y() <= ev_y && c.y() + c.height() >= ev_y
+ && c.x() + c.width() >= ev_x) {
+ XClientMessageEvent ev;
+ memset(&ev, 0, sizeof(ev));
+ ev.type = ClientMessage;
+ ev.window = cw->window();
+ ev.message_type = ATOM(_NET_CLOSE_WINDOW);
+ rootMessageEvent(&ev);
+ }
}
+ XAllowEvents(QX11Info::display(), ReplayPointer, e->time);
+ activateWindow(e->window, e->time);
}
QGraphicsScene *MCompositeManagerPrivate::scene()
@@ -2726,7 +2505,7 @@
xcb_get_window_attributes_reply_t *attr;
attr = xcb_get_window_attributes_reply(xcb_conn,
xcb_get_window_attributes(xcb_conn, kids[i]), 0);
- if (!attr || attr->_class == XCB_WINDOW_CLASS_INPUT_ONLY)
+ if (!attr)
continue;
xcb_get_geometry_reply_t *geom;
geom = xcb_get_geometry_reply(xcb_conn,
@@ -2757,6 +2536,9 @@
if (window) {
window->setNewlyMapped(false);
window->setVisible(true);
+ if (kids[i] == localwin || kids[i] == localwin_parent)
+ continue;
+ grab_pointer_keyboard(kids[i]);
}
}
}
@@ -2791,8 +2573,10 @@
bool MCompositeManagerPrivate::removeWindow(Window w)
{
- // Item is already removed from scene when it is deleted
-
+ // remove it from MCompositeScene or we may try to paint it and crash
+ MCompositeWindow *cw = COMPOSITE_WINDOW(w);
+ if (cw)
+ watch->removeItem(cw);
bool ret = true;
windows_as_mapped.removeAll(w);
if (windows.remove(w) == 0)
@@ -2818,11 +2602,6 @@
MCompositeWindow *cw_b = MCompositeWindow::compositeWindow(w_b);
MDecoratorFrame *deco = MDecoratorFrame::instance();
- if (!cw_a->propertyCache()) // a is already destroyed
- return true;
- if (!cw_b->propertyCache()) // b is already destroyed
- return false;
-
// a is unused decorator?
if (cw_a->propertyCache()->isDecorator() &&
(!deco->managedClient() ||
@@ -2896,7 +2675,8 @@
Display *display = QX11Info::display();
// no need for StructureNotifyMask because of root's SubstructureNotifyMask
- XSelectInput(display, window, PropertyChangeMask);
+ XSelectInput(display, window, PropertyChangeMask | ButtonPressMask |
+ KeyPressMask | KeyReleaseMask);
XShapeSelectInput(display, window, ShapeNotifyMask);
XCompositeRedirectWindow(display, window, CompositeRedirectManual);
@@ -3002,10 +2782,8 @@
connect(item, SIGNAL(itemIconified(MCompositeWindow *)), SLOT(exposeDesktop()));
connect(this, SIGNAL(compositingEnabled()), item, SLOT(startTransition()));
- connect(item, SIGNAL(itemRestored(MCompositeWindow *)), SLOT(restoreHandler(MCompositeWindow *)));
- connect(item, SIGNAL(itemIconified(MCompositeWindow *)), SLOT(lowerHandler(MCompositeWindow *)));
- connect(item, SIGNAL(windowClosed(MCompositeWindow *)), SLOT(closeHandler(MCompositeWindow *)));
-
+ connect(item, SIGNAL(itemRestored(MCompositeWindow *)), SLOT(raiseOnRestore(MCompositeWindow *)));
+ connect(item, SIGNAL(itemIconified(MCompositeWindow *)), SLOT(iconifyOnLower(MCompositeWindow *)));
// ping protocol
connect(item, SIGNAL(windowHung(MCompositeWindow *)),
@@ -3173,12 +2951,8 @@
for (QHash<Window, MCompositeWindow *>::iterator it = windows.begin();
it != windows.end(); ++it) {
MCompositeWindow *i = it.value();
- if (!i->isAppWindow(true) ||
+ if (!i->isAppWindow() ||
i->propertyCache()->windowState() == IconicState ||
- // skip devicelock and screenlock windows
- i->propertyCache()->meegoStackingLayer() == 1 ||
- i->propertyCache()->meegoStackingLayer() == 2 ||
-
i->propertyCache()->windowTypeAtom() == ATOM(_NET_WM_WINDOW_TYPE_DESKTOP))
continue;
@@ -3198,12 +2972,6 @@
}
}
-void MCompositeManagerPrivate::installX11EventFilter(long xevent,
- MCompositeManagerExtension* extension)
-{
- m_extensions.insert(xevent, extension);
-}
-
void MCompositeManagerPrivate::showLaunchIndicator(int timeout)
{
if (!launchIndicator) {
@@ -3258,11 +3026,6 @@
d->prepare();
}
-void MCompositeManager::loadPlugins()
-{
- d->loadPlugins();
-}
-
bool MCompositeManager::x11EventFilter(XEvent *event)
{
return d->x11EventFilter(event);
@@ -3283,9 +3046,9 @@
return d->isRedirected(w);
}
-void MCompositeManager::enableCompositing(bool forced)
+void MCompositeManager::enableCompositing()
{
- d->enableCompositing(forced);
+ d->enableCompositing();
}
void MCompositeManager::disableCompositing()
@@ -3307,26 +3070,3 @@
{
return d->compositing;
}
-
-void MCompositeManager::debug(const QString& d)
-{
- const char* msg = d.toAscii();
- _log("%s\n", msg);
-}
-
-bool MCompositeManager::displayOff()
-{
- return d->device_state->displayOff();
-}
-
-bool MCompositeManager::possiblyUnredirectTopmostWindow()
-{
- return d->possiblyUnredirectTopmostWindow();
-}
-
-void MCompositeManager::exposeSwitcher()
-{
- d->exposeSwitcher();
-}
-
-#include "mcompositemanager.moc"
--- src/mcompositemanager.h
+++ src/mcompositemanager.h
@@ -94,8 +94,6 @@
*/
void redirectWindows();
- void loadPlugins();
-
/*!
* Returns whether a Window is redirected or not
*
@@ -108,21 +106,9 @@
* or not
*/
bool isCompositing();
-
- /*!
- * Try to direct-render the topmost window
- */
- bool possiblyUnredirectTopmostWindow();
- /*!
- * Returns if the display is off
- */
- bool displayOff();
-
- void debug(const QString& d);
-
public slots:
- void enableCompositing(bool forced = false);
+ void enableCompositing();
void disableCompositing();
/*! Invoked remotely by MRmiClient to show a launch indicator
@@ -132,11 +118,6 @@
*/
void showLaunchIndicator(int timeout);
void hideLaunchIndicator();
-
- /*!
- * Invoke to show the desktop window, possibly with switcher contents
- */
- void exposeSwitcher();
signals:
void decoratorRectChanged(const QRect& rect);
@@ -146,8 +127,6 @@
friend class MCompositeWindow;
friend class MCompWindowAnimator;
- friend class MCompositeManagerExtension;
- friend class MTexturePixmapPrivate;
};
#endif
--- src/mcompositemanager_p.h
+++ src/mcompositemanager_p.h
@@ -39,7 +39,6 @@
class MCompositeWindow;
class MDeviceState;
class MWindowPropertyCache;
-class MCompositeManagerExtension;
enum {
INPUT_LAYER = 0,
@@ -75,7 +74,6 @@
QGraphicsScene *scene();
void prepare();
- void loadPlugins();
void activateWindow(Window w, Time timestamp,
bool disableCompositing = true);
void updateWinList();
@@ -95,7 +93,6 @@
void clientMessageEvent(XClientMessageEvent *);
void keyEvent(XKeyEvent*);
void buttonEvent(XButtonEvent*);
- void installX11EventFilter(long xevent, MCompositeManagerExtension* extension);
void redirectWindows();
void mapOverlayWindow();
@@ -109,27 +106,21 @@
Window getTopmostApp(int *index_in_stacking_list = 0,
Window ignore_window = 0);
Window getLastVisibleParent(MWindowPropertyCache *pc);
- void setupButtonWindows(MCompositeWindow *topmost);
bool possiblyUnredirectTopmostWindow();
bool isRedirected(Window window);
bool x11EventFilter(XEvent *event);
- bool processX11EventFilters(XEvent *event);
bool removeWindow(Window w);
bool needDecoration(Window w, MWindowPropertyCache *pc = 0);
MCompositeWindow *getHighestDecorated();
static bool compareWindows(Window w_a, Window w_b);
void roughSort();
- void setCurrentApp(Window w);
MCompositeScene *watch;
Window localwin, localwin_parent;
Window xoverlay;
Window prev_focus;
- Window close_button_win, home_button_win, buttoned_win;
- Window current_app;
- QRect home_button_geom, close_button_geom;
static Window stack[TOTAL_LAYERS];
@@ -149,7 +140,6 @@
QHash<Window, FrameData> framed_windows;
QHash<Window, QList<XConfigureRequestEvent*> > configure_reqs;
QHash<Window, MWindowPropertyCache*> prop_caches;
- QMultiHash<int, MCompositeManagerExtension* > m_extensions;
QRegion dock_region;
int damage_event;
@@ -170,7 +160,6 @@
signals:
void inputEnabled();
void compositingEnabled();
- void currentAppChanged(Window w);
public slots:
@@ -181,11 +170,8 @@
void disableCompositing(ForcingLevel forced = NO_FORCED);
void showLaunchIndicator(int timeout);
void hideLaunchIndicator();
-
- void lowerHandler(MCompositeWindow *window);
- void restoreHandler(MCompositeWindow *window);
- void closeHandler(MCompositeWindow *window);
-
+ void iconifyOnLower(MCompositeWindow *window);
+ void raiseOnRestore(MCompositeWindow *window);
void onDesktopActivated(MCompositeWindow*);
void exposeDesktop();
void enablePaintedCompositing();
--- src/mcompositemanagerextension.cpp
+++ src/mcompositemanagerextension.cpp
-/***************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (directui at nokia.com)
-**
-** This file is part of mcompositor.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at directui at nokia.com.
-**
-** This library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation
-** and appearing in the file LICENSE.LGPL included in the packaging
-** of this file.
-**
-****************************************************************************/
-
-#include "mcompositemanager.h"
-#include "mcompositewindow.h"
-#include "mcompositemanager_p.h"
-#include "mcompositemanagerextension.h"
-
-MCompositeManagerExtension::MCompositeManagerExtension(QObject *parent)
- :QObject(parent)
-{
- MCompositeManager *p = (MCompositeManager *) qApp;
- connect(p->d, SIGNAL(currentAppChanged(Window)), SLOT(q_currentAppChanged(Window)) );
-}
-
-MCompositeManagerExtension::~MCompositeManagerExtension()
-{
-}
-
-void MCompositeManagerExtension::q_currentAppChanged(Window window)
-{
- emit currentAppChanged(window);
-}
-
-void MCompositeManagerExtension::listenXEventType(long XEventType)
-{
- MCompositeManager *p = (MCompositeManager *) qApp;
- p->d->installX11EventFilter(XEventType, this);
-}
-
-Qt::HANDLE MCompositeManagerExtension::desktopWindow()
-{
- MCompositeManager *p = (MCompositeManager *) qApp;
- return p->d->stack[DESKTOP_LAYER];
-}
-
-Qt::HANDLE MCompositeManagerExtension::currentAppWindow()
-{
- MCompositeManager *p = (MCompositeManager *) qApp;
- return p->d->current_app;
-}
--- src/mcompositemanagerextension.h
+++ src/mcompositemanagerextension.h
-/***************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (directui at nokia.com)
-**
-** This file is part of mcompositor.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at directui at nokia.com.
-**
-** This library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation
-** and appearing in the file LICENSE.LGPL included in the packaging
-** of this file.
-**
-****************************************************************************/
-
-#ifndef MCOMPOSITEMANAGEREXTENSION_H
-#define MCOMPOSITEMANAGEREXTENSION_H
-
-#include <QObject>
-#include <X11/Xlib.h>
-
-class MCompositeManagerPrivate;
-class MCompositeWindow;
-
-class MCompositeManagerExtension: public QObject
-{
- Q_OBJECT
-
- public:
- MCompositeManagerExtension(QObject *parent = 0);
- ~MCompositeManagerExtension();
-
- void testFn();
-
- /*
- * Returns the desktop window
- */
- Qt::HANDLE desktopWindow();
-
- /*
- * Returns the current application window
- */
- Qt::HANDLE currentAppWindow();
-
- /*!
- * Informs the composite manager that this extension is subscribed
- * to an XEvent type and requests delivery of only the registered event to
- * prevent it from being spammed by unwanted events.
- * Note: Do not combine the types in the same way as the
- * event mask in XSelectInput. XEvent type is not a mask enum type and will
- * not work. Call this function once for each XEvent type you need to
- * register with.
- *
- * \param XEventType Specifies the XEvent type that this extension is
- * interested in listening
- */
- void listenXEventType(long XEventType);
-
- signals:
- void currentAppChanged(Qt::HANDLE window);
-
- protected:
- /*!
- * Special event handler to receive native X11 events passed in the event
- * parameter. Return true to stop the composite manager from handling
- * the event, otherwise return false to try forwarding the native event to
- * the composite manager.
- *
- * If there are other extensions that are subscribed to the same event and
- * this function returns true, the event will still be blocked from
- * propagating to the composite manager even if this function
- * returns false. Be careful when returning true when there are other
- * extensions around and only use as a last resort to reimplement core
- * functionality.
- */
- virtual bool x11Event ( XEvent * event ) = 0;
-
- private slots:
- void q_currentAppChanged(Window window);
-
- private:
- friend class MCompositeManagerPrivate;
-};
-
-#endif
--- src/mcompositescene.cpp
+++ src/mcompositescene.cpp
@@ -105,12 +105,8 @@
for (int i = numItems - 1; i >= 0; --i) {
MCompositeWindow *cw = (MCompositeWindow *) items[i];
- if (!cw->propertyCache()) // this window is dead
- continue;
-
if (cw->isDirectRendered() || !cw->isVisible()
- || !cw->propertyCache()->isMapped()
- || cw->propertyCache()->isInputOnly())
+ || !cw->propertyCache()->isMapped())
continue;
if (visible.isEmpty())
// nothing below is visible anymore
--- src/mcompositewindow.cpp
+++ src/mcompositewindow.cpp
@@ -22,7 +22,6 @@
#include "mcompositemanager.h"
#include "mcompositemanager_p.h"
#include "mtexturepixmapitem.h"
-#include "mdecoratorframe.h"
#include <QX11Info>
#include <QGraphicsScene>
@@ -47,12 +46,12 @@
iconified_final(false),
iconify_state(NoIconifyState),
destroyed(false),
- window_status(Normal),
+ process_status(NORMAL),
need_decor(false),
- window_obscured(-1),
+ window_obscured(true), // true to synthesize initial visibility event
+ is_closing(false),
is_transitioning(false),
pinging_enabled(false),
- dimmed_effect(false),
win_id(window)
{
thumb_mode = false;
@@ -70,8 +69,7 @@
is_valid = true;
anim = new MCompWindowAnimator(this);
connect(anim, SIGNAL(transitionDone()), SLOT(finalizeState()));
- connect(anim, SIGNAL(transitionStart()), SLOT(beginAnimation()));
- connect(mpc, SIGNAL(iconGeometryUpdated()), SLOT(updateIconGeometry()));
+ connect(anim, SIGNAL(transitionStart()), SLOT(windowTransitioning()));
setAcceptHoverEvents(true);
t_ping = new QTimer(this);
@@ -92,13 +90,8 @@
// We initially prevent item visibility from compositor itself
// or it's corresponding thumbnail rendered by the switcher
bool is_app = isAppWindow();
+ window_visible = !is_app;
newly_mapped = is_app;
- if (!pc->isInputOnly()) {
- // never paint InputOnly windows
- window_visible = !is_app;
- setVisible(window_visible); // newly_mapped used here
- }
- origPosition = QPointF(pc->realGeometry().x(), pc->realGeometry().y());
if (fadeRect.isEmpty()) {
QRectF d = QApplication::desktop()->availableGeometry();
@@ -110,21 +103,17 @@
MCompositeWindow::~MCompositeWindow()
{
- MCompositeManager *p = (MCompositeManager *) qApp;
- p->d->removeWindow(window());
-
if (t_ping) {
stopPing();
t_ping = 0;
}
- endAnimation();
-
+ if (is_transitioning) {
+ // we got destroyed during animation
+ --window_transitioning;
+ is_transitioning = false;
+ }
anim = 0;
-
- if (pc) {
- p->d->prop_caches.remove(window());
- pc->deleteLater();
- }
+ pc = 0;
}
void MCompositeWindow::setBlurred(bool b)
@@ -169,17 +158,9 @@
/* This is a delayed animation. Actual animation is triggered
* when startTransition() is called
*/
-void MCompositeWindow::iconify(const QRectF &icongeometry, bool defer)
+void MCompositeWindow::iconify(const QRectF &iconGeometry, bool defer)
{
- if (iconify_state == ManualIconifyState) {
- setIconified(true);
- return;
- }
-
- if (window_status != MCompositeWindow::Closing)
- window_status = MCompositeWindow::Minimizing;
-
- this->iconGeometry = icongeometry;
+ this->iconGeometry = iconGeometry;
if (!iconified)
origPosition = pos();
@@ -192,20 +173,10 @@
iconGeometry.topLeft());
iconified = true;
// do this to avoid stacking code disturbing Z values
- beginAnimation();
-}
-
-void MCompositeWindow::setUntransformed()
-{
- endAnimation();
-
- anim->stopAnimation(); // stop and restore the matrix
- newly_mapped = false;
- setVisible(true);
- setOpacity(1.0);
- setScale(1.0);
- setScaled(false);
- iconified = false;
+ if (!is_transitioning) {
+ ++window_transitioning;
+ is_transitioning = true;
+ }
}
void MCompositeWindow::setIconified(bool iconified)
@@ -223,18 +194,11 @@
return iconify_state;
}
-void MCompositeWindow::setIconifyState(MCompositeWindow::IconifyState state)
-{
- iconify_state = state;
-}
-
void MCompositeWindow::setWindowObscured(bool obscured, bool no_notify)
{
- MCompositeManager *p = (MCompositeManager *) qApp;
- short new_value = obscured ? 1 : 0;
- if ((new_value == window_obscured) || (!obscured && p->displayOff()))
+ if (obscured == window_obscured)
return;
- window_obscured = new_value;
+ window_obscured = obscured;
if (!no_notify) {
XVisibilityEvent c;
@@ -248,19 +212,8 @@
}
}
-/*
- * We ensure that ensure there are ALWAYS updated thumbnails in the
- * switcher by letting switcher know in advance of the presence of this window.
- * Delay the minimize animation until we receive an iconGeometry update from
- * the switcher
- */
void MCompositeWindow::startTransition()
{
- if (iconified) {
- if (iconGeometry.isNull())
- return;
- setWindowObscured(true);
- }
if (anim->pendingAnimation()) {
MCompositeWindow::setVisible(true);
anim->startAnimation();
@@ -268,33 +221,10 @@
}
}
-void MCompositeWindow::updateIconGeometry()
-{
- if (!pc)
- return;
-
- iconGeometry = pc->iconGeometry();
- if (iconGeometry.isNull())
- return;
-
- // trigger transition the second time around and update animation values
- if (iconified) {
- qreal sx = iconGeometry.width() / boundingRect().width();
- qreal sy = iconGeometry.height() / boundingRect().height();
- anim->translateScale(qreal(1.0), qreal(1.0), sx, sy,
- iconGeometry.topLeft());
- startTransition();
- }
-}
-
// TODO: have an option of disabling the animation
-void MCompositeWindow::restore(const QRectF &icongeometry, bool defer)
+void MCompositeWindow::restore(const QRectF &iconGeometry, bool defer)
{
- if (icongeometry.isEmpty())
- this->iconGeometry = fadeRect;
- else
- this->iconGeometry = icongeometry;
- setPos(iconGeometry.topLeft());
+ this->iconGeometry = iconGeometry;
// horizontal and vert. scaling factors
qreal sx = iconGeometry.width() / boundingRect().width();
qreal sy = iconGeometry.height() / boundingRect().height();
@@ -305,31 +235,35 @@
anim->translateScale(qreal(1.0), qreal(1.0), sx, sy, origPosition, true);
iconified = false;
// do this to avoid stacking code disturbing Z values
- beginAnimation();
+ if (!is_transitioning) {
+ ++window_transitioning;
+ is_transitioning = true;
+ }
}
-void MCompositeWindow::showWindow()
+void MCompositeWindow::fadeIn()
{
// defer putting this window in the _NET_CLIENT_LIST
// only after animation is done to prevent the switcher from rendering it
if (!isAppWindow())
return;
- findBehindWindow();
- beginAnimation();
- if (newly_mapped) {
- // NB#180628 - some stupid apps are listening for visibilitynotifies.
- // Well, all of the toolkit anyways
- setWindowObscured(false);
+ if (!is_transitioning) {
+ ++window_transitioning;
+ is_transitioning = true;
+ }
+ if (newly_mapped)
QTimer::singleShot(700, this, SLOT(q_fadeIn()));
- } else
+ else
q_fadeIn();
}
void MCompositeWindow::q_fadeIn()
{
- endAnimation();
-
+ if (is_transitioning) {
+ --window_transitioning;
+ is_transitioning = false;
+ }
newly_mapped = false;
setVisible(true);
setOpacity(0.0);
@@ -340,30 +274,21 @@
newly_mapped = true;
}
-void MCompositeWindow::closeWindow()
+void MCompositeWindow::fadeOut()
{
- if (!isAppWindow() || propertyCache()->windowState() == IconicState) {
+ if (!isAppWindow()) {
setVisible(false);
- emit windowClosed(this);
- return;
- }
- if (window_status == MCompositeWindow::Hung) {
- hide();
- emit windowClosed(this);
return;
}
- window_status = MCompositeWindow::Closing;
MCompositeManager *p = (MCompositeManager *) qApp;
bool defer = false;
- setVisible(true);
if (!p->isCompositing()) {
- p->d->enableCompositing(true);
+ p->enableCompositing();
defer = true;
}
updateWindowPixmap();
- origPosition = pos();
iconify(fadeRect, defer);
}
@@ -383,30 +308,26 @@
void MCompositeWindow::finalizeState()
{
- endAnimation();
-
- if (pc && pc->windowTypeAtom() == ATOM(_NET_WM_WINDOW_TYPE_DESKTOP))
+ if (is_transitioning) {
+ --window_transitioning;
+ is_transitioning = false;
+ }
+ if (pc->windowTypeAtom() == ATOM(_NET_WM_WINDOW_TYPE_DESKTOP))
emit desktopActivated(this);
// iconification status
if (iconified) {
- iconified = false;
iconified_final = true;
hide();
iconify_state = TransitionIconifyState;
emit itemIconified(this);
- if (isClosing()) {
- emit windowClosed(this);
- return;
- }
} else {
iconify_state = NoIconifyState;
iconified_final = false;
show();
QTimer::singleShot(200, this, SLOT(q_itemRestored()));
}
- window_status = Normal;
-
+
// item lifetime
if (destroyed)
deleteLater();
@@ -482,11 +403,9 @@
void MCompositeWindow::setVisible(bool visible)
{
- if ((pc && pc->isInputOnly())
- || (visible && newly_mapped && isAppWindow())
- || (!visible && is_transitioning))
+ if (visible && newly_mapped && isAppWindow())
return;
-
+
// Set the iconification status as well
iconified_final = !visible;
if (visible != window_visible)
@@ -496,10 +415,6 @@
QGraphicsItem::setVisible(visible);
MCompositeManager *p = (MCompositeManager *) qApp;
p->d->setWindowDebugProperties(window());
-
- QGraphicsScene* sc = scene();
- if (sc && !visible && sc->items().count() == 1)
- clearTexture();
}
void MCompositeWindow::startPing()
@@ -528,9 +443,7 @@
void MCompositeWindow::receivedPing(ulong serverTimeStamp)
{
received_ping_timestamp = serverTimeStamp;
-
- if (window_status != Minimizing && window_status != Closing)
- window_status = Normal;
+ process_status = NORMAL;
if (blurred())
setBlurred(false);
}
@@ -538,10 +451,9 @@
void MCompositeWindow::pingTimeout()
{
if (pinging_enabled && received_ping_timestamp < sent_ping_timestamp
- && window_status != Hung
- && window_status != Minimizing && window_status != Closing) {
+ && process_status != HUNG) {
setBlurred(true);
- window_status = Hung;
+ process_status = HUNG;
emit windowHung(this);
}
if (pinging_enabled)
@@ -568,9 +480,9 @@
XSendEvent(QX11Info::display(), w, False, NoEventMask, &ev);
}
-MCompositeWindow::WindowStatus MCompositeWindow::status() const
+MCompositeWindow::ProcessStatus MCompositeWindow::status() const
{
- return window_status;
+ return process_status;
}
bool MCompositeWindow::needDecoration() const
@@ -589,25 +501,14 @@
return p->d->windows.value(window, 0);
}
-void MCompositeWindow::beginAnimation()
+void MCompositeWindow::windowTransitioning()
{
- if (!isMapped())
- return;
-
if (!is_transitioning) {
- ++window_transitioning;
+ ++window_transitioning;
is_transitioning = true;
}
}
-void MCompositeWindow::endAnimation()
-{
- if (is_transitioning) {
- --window_transitioning;
- is_transitioning = false;
- }
-}
-
bool MCompositeWindow::hasTransitioningWindow()
{
return window_transitioning > 0;
@@ -625,34 +526,15 @@
{
MCompositeManager *p = (MCompositeManager *) qApp;
bool zvalChanged = (change == ItemZValueHasChanged);
- if (zvalChanged) {
- findBehindWindow();
+ if (zvalChanged)
p->d->setWindowDebugProperties(window());
- }
-
+
if (zvalChanged || change == ItemVisibleHasChanged || change == ItemParentHasChanged)
p->d->glwidget->update();
return QGraphicsItem::itemChange(change, value);
}
-void MCompositeWindow::findBehindWindow()
-{
- MCompositeManager *p = (MCompositeManager *) qApp;
- int behind_i = indexInStack() - 1;
- if (behind_i >= 0 && behind_i < p->d->stacking_list.size()) {
- MCompositeWindow* w = MCompositeWindow::compositeWindow(p->d->stacking_list.at(behind_i));
- if (w->propertyCache()->windowState() == NormalState
- && w->propertyCache()->isMapped()
- && !w->propertyCache()->isDecorator())
- behind_window = w;
- else if (w->propertyCache()->isDecorator() && MDecoratorFrame::instance()->managedClient())
- behind_window = MDecoratorFrame::instance()->managedClient();
- else
- behind_window = MCompositeWindow::compositeWindow(p->d->stack[DESKTOP_LAYER]);
- }
-}
-
void MCompositeWindow::update()
{
MCompositeManager *p = (MCompositeManager *) qApp;
@@ -671,7 +553,7 @@
if (!include_transients && p->d->getLastVisibleParent(pc))
return false;
- if (pc && !pc->isOverrideRedirect() &&
+ if (!pc->isOverrideRedirect() &&
(pc->windowTypeAtom() == ATOM(_NET_WM_WINDOW_TYPE_NORMAL) ||
pc->windowTypeAtom() == ATOM(_KDE_NET_WM_WINDOW_TYPE_OVERRIDE) ||
/* non-modal, non-transient dialogs behave like applications */
@@ -704,13 +586,3 @@
MCompositeManager *p = (MCompositeManager *) qApp;
return p->d->stacking_list.indexOf(window());
}
-
-void MCompositeWindow::setIsMapped(bool mapped)
-{
- if (pc) pc->setIsMapped(mapped);
-}
-
-bool MCompositeWindow::isMapped() const
-{
- return pc ? pc->isMapped() : false;
-}
--- src/mcompositewindow.h
+++ src/mcompositewindow.h
@@ -22,7 +22,6 @@
#include <QGraphicsItem>
#include <QtOpenGL>
-#include <QPointer>
#include <X11/Xutil.h>
#include "mcompatoms_p.h"
#include "mwindowpropertycache.h"
@@ -40,16 +39,13 @@
Q_OBJECT
#if QT_VERSION >= 0x040600
Q_INTERFACES(QGraphicsItem)
- Q_PROPERTY(QPointF pos READ pos WRITE setPos)
- Q_PROPERTY(qreal scale READ scale WRITE setScale)
#endif
+
public:
-
- enum WindowStatus {
- Normal = 0,
- Hung,
- Minimizing,
- Closing
+
+ enum ProcessStatus {
+ NORMAL = 0,
+ HUNG
};
enum IconifyState {
NoIconifyState = 0,
@@ -166,21 +162,10 @@
void setIconified(bool iconified);
/*!
- * Set scale, opacity etc. to normal values.
- */
- void setUntransformed();
-
- /*!
* Returns how this window was iconified.
*/
IconifyState iconifyState() const;
-
- /*!
- * Sets how this window was iconified.
- */
- void setIconifyState(IconifyState state);
-
/*!
* Returns true if this window needs a decoration
*/
@@ -191,8 +176,9 @@
*/
void setDecorated(bool decorated);
- void setIsMapped(bool mapped);
- bool isMapped() const;
+ void setIsMapped(bool mapped) { pc->setIsMapped(mapped); }
+ bool isMapped() const {
+ return pc->windowAttributes()->map_state == IsViewable; }
void setNewlyMapped(bool newlyMapped) { newly_mapped = newlyMapped; }
bool isNewlyMapped() const { return newly_mapped; }
@@ -208,7 +194,7 @@
* Overrides QGraphicsItem::update() so we have complete control of item
* updates.
*/
- static void update();
+ void update();
bool blurred();
@@ -218,9 +204,9 @@
bool wantsFocus();
/*!
- * Returns a WindowStatus enum of the current state of the window
+ * Returns if window is hung or not.
*/
- WindowStatus status() const;
+ ProcessStatus status() const;
// For _NET_WM_PING abstraction
void startPing();
@@ -279,7 +265,8 @@
*/
bool isAppWindow(bool include_transients = false);
- bool isClosing() const { return window_status == Closing; }
+ void setClosing(bool closing) { is_closing = closing; }
+ bool isClosing() const { return is_closing; }
MWindowPropertyCache *propertyCache() const { return pc; }
@@ -292,42 +279,16 @@
* Returns the index of this window in the stacking list
*/
int indexInStack() const;
-
- /*!
- * Returns whatever window is directly behind this window. 0 if there is none.
- */
- MCompositeWindow* behind() const { return behind_window; }
-
- /*! Disabled alpha-blending for a dim-effect instead */
- void setDimmedEffect(bool dimmed) { dimmed_effect = dimmed; }
-
- bool dimmedEffect() const { return dimmed_effect; }
-
+
public slots:
- void updateIconGeometry();
void startTransition();
void manipulationEnabled(bool isEnabled);
void setUnBlurred();
void setBlurred(bool);
-
- /* Operations with transition animations*/
- void closeWindow();
- void showWindow();
+ void fadeIn();
+ void fadeOut();
- /*!
- * This slot is called whenever a start of window animation occurs. This
- * is an atomic operation. Ensure that endTransition() is invoked when
- * the animation is finished.
- */
- void beginAnimation();
-
- /*!
- * This slot is called whenever the window has finished animating its
- * effects
- */
- void endAnimation();
-
private slots:
/*! Called internally to update how this item looks when the transitions
@@ -337,10 +298,11 @@
void pingTimeout();
void pingWindow();
+ void windowTransitioning();
void q_delayShow();
void q_itemRestored();
void q_fadeIn();
-
+
signals:
/*!
* Emitted if this window is hung
@@ -356,8 +318,6 @@
void itemIconified(MCompositeWindow *window);
/*! Emitted when desktop is raised */
void desktopActivated(MCompositeWindow *window);
- /*! Emitted when this window is closed */
- void windowClosed(MCompositeWindow *window);
protected:
@@ -368,10 +328,7 @@
virtual QPainterPath shape() const;
private:
- void findBehindWindow();
-
- QPointer<MWindowPropertyCache> pc;
- QPointer<MCompositeWindow> behind_window;
+ MWindowPropertyCache *pc;
bool thumb_mode;
MCompWindowAnimator *anim;
qreal scalefrom;
@@ -385,16 +342,15 @@
bool iconified_final;
IconifyState iconify_state;
bool destroyed;
- WindowStatus window_status;
+ ProcessStatus process_status;
bool need_decor;
bool window_visible;
- short window_obscured;
+ bool window_obscured;
bool is_valid;
bool newly_mapped;
bool is_closing;
bool is_transitioning;
bool pinging_enabled;
- bool dimmed_effect;
static int window_transitioning;
--- src/mcompositewindowshadereffect.cpp
+++ src/mcompositewindowshadereffect.cpp
-/***************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (directui at nokia.com)
-**
-** This file is part of mcompositor.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at directui at nokia.com.
-**
-** This library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation
-** and appearing in the file LICENSE.LGPL included in the packaging
-** of this file.
-**
-****************************************************************************/
-
-#include "mtexturepixmapitem.h"
-#include "mcompositewindowshadereffect.h"
-#include "mtexturepixmapitem_p.h"
-#include <QByteArray>
-
-static const char default_frag[] = "\
- lowp vec4 customShader(lowp sampler2D imageTexture, highp vec2 textureCoords) { \
- return texture2D(imageTexture, textureCoords); \
- }\n";
-
-MCompositeWindowShaderEffectPrivate::MCompositeWindowShaderEffectPrivate(MCompositeWindowShaderEffect* e)
- :effect(e),
- priv_render(0),
- active_fragment(0)
-{
-}
-
-void MCompositeWindowShaderEffectPrivate::drawTexture(MTexturePixmapPrivate* render, const QTransform &transform, const QRectF &drawRect, qreal opacity)
-{
- priv_render = render;
- effect->drawTexture(transform, drawRect, opacity);
-}
-
-MCompositeWindowShaderEffect::MCompositeWindowShaderEffect(QObject* parent)
- :QObject(parent),
- d(new MCompositeWindowShaderEffectPrivate(this))
-{
- // install default pixel shader
- QByteArray code = default_frag;
- d->active_fragment = installShaderFragment(code);
-}
-
-MCompositeWindowShaderEffect::~MCompositeWindowShaderEffect()
-{
-}
-
-/*#
- Sets the source code for a pixel shader fragment for
- this shader effect to \a code.
-
- The \a code must define a GLSL function with the signature
- \c{lowp vec4 customShader(lowp sampler2D imageTexture, highp vec2 textureCoords)}
- that returns the source pixel value to use in the paint engine's
- shader program. The following is the default pixel shader fragment,
- which draws a pixmap with no effect applied:
-
- \code
- lowp vec4 customShader(lowp sampler2D imageTexture, highp vec2 textureCoords) {
- return texture2D(imageTexture, textureCoords);
- }
- \endcode
-
- returns the id of the fragment shader
-
- \sa pixelShaderFragment(), setUniforms()
-*/
-GLuint MCompositeWindowShaderEffect::installShaderFragment(const QByteArray& code)
-{
- GLuint id = MTexturePixmapPrivate::installPixelShader(code);
- d->pixfrag_ids.push_back(id);
- return id;
-}
-
-const QVector<GLuint>& MCompositeWindowShaderEffect::fragmentIds() const
-{
- return d->pixfrag_ids;
-}
-
-void MCompositeWindowShaderEffect::setActiveShaderFragment(GLuint id)
-{
- d->active_fragment = id;
-}
-
-GLuint MCompositeWindowShaderEffect::activeShaderFragment() const
-{
- return d->active_fragment;
-}
-
-void MCompositeWindowShaderEffect::drawSource(const QTransform &transform,
- const QRectF &drawRect,
- qreal opacity)
-{
- if (d->priv_render)
- d->priv_render->q_drawTexture(transform, drawRect, opacity);
-}
-
-void MCompositeWindowShaderEffect::installEffect(MCompositeWindow* window)
-{
- // only happens with GL. sorry n800 guys :p
-#ifdef QT_OPENGL_LIB
- MTexturePixmapItem* item = (MTexturePixmapItem*) window;
- item->d->installEffect(this);
-#endif
-}
-
-bool MCompositeWindowShaderEffect::enabled() const
-{
- return d->enabled;
-}
-
-void MCompositeWindowShaderEffect::setEnabled(bool enabled)
-{
- d->enabled = enabled;
- emit enabledChanged(enabled);
-}
-
-/*!
- * set the uniform values on the current executed fragment shader
- */
-void MCompositeWindowShaderEffect::setUniforms(QGLShaderProgram* program)
-{
- Q_UNUSED(program);
-}
-
--- src/mcompositewindowshadereffect.h
+++ src/mcompositewindowshadereffect.h
-/***************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (directui at nokia.com)
-**
-** This file is part of mcompositor.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at directui at nokia.com.
-**
-** This library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation
-** and appearing in the file LICENSE.LGPL included in the packaging
-** of this file.
-**
-****************************************************************************/
-
-#ifndef MCOMPOSITEWINDOWSHADEREFFECT_H
-#define MCOMPOSITEWINDOWSHADEREFFECT_H
-
-#include <QObject>
-#include <QVector>
-#include <QGLShaderProgram>
-
-class QTransform;
-class QRectF;
-class MCompositeWindowShaderEffect;
-class MTexturePixmapPrivate;
-class MCompositeWindow;
-class MCompositeWindowShaderEffectPrivate;
-
-class MCompositeWindowShaderEffect: public QObject
-{
- Q_OBJECT
- public:
- MCompositeWindowShaderEffect(QObject* parent = 0);
- virtual ~MCompositeWindowShaderEffect();
-
- GLuint installShaderFragment(const QByteArray& code);
-
- void setActiveShaderFragment(GLuint id);
-
- GLuint activeShaderFragment() const;
-
- /*!
- * Install this effect on a composite window. Note that
- * we override QGraphicsItem::setGraphicsEffect() because
- * we have a completely different painting engine.
- * If a window has a previous effect, it will be overriden by the new one
- */
- void installEffect(MCompositeWindow* window);
-
- bool enabled() const;
-
- public slots:
-
- /*!
- * Enable this effect
- */
- void setEnabled(bool enabled);
-
- signals:
- void enabledChanged( bool enabled);
-
- protected:
- void drawSource(const QTransform &transform,
- const QRectF &drawRect, qreal opacity);
-
- virtual void drawTexture(const QTransform &transform,
- const QRectF &drawRect, qreal opacity) = 0;
- /*!
- * Set the uniform values on the currently active shader.
- * Default implementation does nothing. Reimplement this function to
- * set values if you specified a custom pixel shader in your effects.
- */
- virtual void setUniforms(QGLShaderProgram* );
-
- private:
- const QVector<GLuint>& fragmentIds() const;
-
- MCompositeWindowShaderEffectPrivate* d;
- friend class MTexturePixmapPrivate;
- friend class MCompositeWindowShaderEffectPrivate;
-};
-
-/*
- * Internal class. Do not use! Not part of public API
- */
-class MCompositeWindowShaderEffectPrivate
-{
- public:
- void drawTexture(MTexturePixmapPrivate* render,
- const QTransform &transform,
- const QRectF &drawRect, qreal opacity);
-
- private:
- explicit MCompositeWindowShaderEffectPrivate(MCompositeWindowShaderEffect*);
-
- MCompositeWindowShaderEffect* effect;
- MTexturePixmapPrivate* priv_render;
- // QMap<GLuint, QByteArray> pixelfragments;
- QVector<GLuint> pixfrag_ids;
- GLuint active_fragment;
-
- bool enabled;
-
- friend class MCompositeWindowShaderEffect;
-};
-#endif
--- src/mcompwindowanimator.cpp
+++ src/mcompwindowanimator.cpp
@@ -36,6 +36,7 @@
deferred_animation(false)
{
this->item = item;
+ timer.setCurveShape(QTimeLine::EaseInCurve);
timer.setFrameRange(0, 2000);
timer.setUpdateInterval(int(1000.0 / Fps));
@@ -45,7 +46,6 @@
//anim.setTimeLine(&timer);
connect(&timer, SIGNAL(valueChanged(qreal)), SLOT(advanceFrame(qreal)));
connect(&timer, SIGNAL(finished()), SIGNAL(transitionDone()));
- connect(&timer, SIGNAL(finished()), SLOT(resetState()));
}
// restore original global state w/ animation
@@ -73,9 +73,6 @@
// item transition
void MCompWindowAnimator::advanceFrame(qreal step)
{
-#define OPAQUE 1.0
-#define DIMMED 0.1
-
//item->setTransform(QTransform(anim.matrixAt(step)) );
item->setTransform(matrix);
@@ -83,31 +80,14 @@
anim.verticalScaleAt(step));
item->setPos(anim.posAt(step));
- qreal opac_norm = interpolate(step, OPAQUE, DIMMED);
- qreal opac_rev = interpolate(step, DIMMED, OPAQUE);
-
// TODO: move calculation to GPU to imrpove speed
- // TODO: Use QPropertyAnimation instead
- ((MCompositeWindow*)item)->setDimmedEffect(false);
- item->setOpacity(!reversed ? opac_norm : opac_rev);
- MCompositeWindow* behind = ((MCompositeWindow*)item)->behind();
- if (behind) {
- behind->setDimmedEffect(true);
- behind->setOpacity(!reversed ? opac_rev : opac_norm);
- }
-
+ item->setOpacity(!reversed ? interpolate(step, 1.0, 0.1) :
+ interpolate(step, 0.1, 1.0));
+
MCompositeManager *p = (MCompositeManager *) qApp;
p->d->glwidget->update();
}
-void MCompWindowAnimator::resetState()
-{
- MCompositeWindow* behind = ((MCompositeWindow*)item)->behind();
- if (behind) {
- behind->setOpacity(1.0);
- }
-}
-
// translate item + scale
void MCompWindowAnimator::translateScale(qreal fromSx, qreal fromSy,
qreal toSx, qreal toSy,
@@ -117,15 +97,11 @@
reversed = reverse;
if (!reverse) {
- timer.setCurveShape(QTimeLine::EaseInCurve);
-
anim.setScaleAt(0, fromSx, fromSy);
anim.setScaleAt(1.0, toSx, toSy);
anim.setPosAt(0, item->pos());
anim.setPosAt(1.0, newPos);
} else {
- timer.setCurveShape(QTimeLine::EaseOutCurve);
-
if (item->transform().m22() == 1.0 && item->transform().m11() == 1.0)
item->scale(toSx, toSy);
@@ -201,12 +177,6 @@
}
}
-void MCompWindowAnimator::stopAnimation()
-{
- timer.stop();
- item->setTransform(matrix);
-}
-
void MCompWindowAnimator::deferAnimation(bool defer)
{
deferred_animation = defer;
--- src/mcompwindowanimator.h
+++ src/mcompwindowanimator.h
@@ -73,7 +73,6 @@
bool isActive();
void startAnimation();
- void stopAnimation();
void deferAnimation(bool);
//! There is a pending animation to be executed soon
@@ -87,9 +86,6 @@
*/
void advanceFrame(qreal step);
-private slots:
- void resetState();
-
signals:
void transitionDone();
void transitionStart();
--- src/mdecoratorframe.cpp
+++ src/mdecoratorframe.cpp
@@ -173,13 +173,21 @@
void MDecoratorFrame::setDecoratorAvailableRect(const QRect& decorect)
{
- if (!client || no_resize || !decorator_item
- || !decorator_item->propertyCache())
+ if (!client || no_resize)
return;
Display* dpy = QX11Info::display();
- int actual_decor_ypos = decorator_item->propertyCache()->realGeometry().y();
+ // cache this. we need actual positon of decorator window
+ static int actual_decor_ypos = 0;
+ if (!actual_decor_ypos) {
+ XWindowAttributes a;
+ if (!XGetWindowAttributes(dpy, decorator_window, &a)) {
+ qWarning("%s: invalid window 0x%lx", __func__, decorator_window);
+ return;
+ }
+ actual_decor_ypos = a.y;
+ }
decorator_rect = decorect;
--- src/mtexturepixmapitem.h
+++ src/mtexturepixmapitem.h
@@ -108,7 +108,6 @@
MTexturePixmapPrivate *const d;
friend class MTexturePixmapPrivate;
friend class MCompositeManagerPrivate;
- friend class MCompositeWindowShaderEffect;
};
#endif // DUIGLXTEXTUREPIXMAPITEM_H
--- src/mtexturepixmapitem_egl.cpp
+++ src/mtexturepixmapitem_egl.cpp
@@ -126,7 +126,7 @@
qWarning("MTexturePixmapItem::%s(): Failed getting offscreen pixmap",
__func__);
return;
- } else if (!isValid() || propertyCache()->isInputOnly())
+ } else if (!isValid())
return;
if (!d->eglresource)
@@ -281,8 +281,7 @@
void MTexturePixmapItem::updateWindowPixmap(XRectangle *rects, int num)
{
- if (hasTransitioningWindow() || d->direct_fb_render || !windowVisible()
- || propertyCache()->isInputOnly())
+ if (hasTransitioningWindow() || d->direct_fb_render || !windowVisible())
return;
QRegion r;
@@ -330,10 +329,10 @@
if (!d->ctx)
d->ctx = const_cast<QGLContext *>(gl->context());
- if (propertyCache()->hasAlpha() || (opacity() < 1.0f && !dimmedEffect()) ) {
+ if (propertyCache()->hasAlpha() || opacity() < 1.0f) {
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- }
+ }
glBindTexture(GL_TEXTURE_2D, d->custom_tfp ? d->ctextureId : d->textureId);
const QRegion &shape = propertyCache()->shapeRegion();
@@ -406,7 +405,4 @@
glBindTexture(GL_TEXTURE_2D, d->custom_tfp ? d->ctextureId : d->textureId);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 0, 0, 0, GL_RGBA,
GL_UNSIGNED_BYTE, 0);
-
- glClearColor(0.0, 0.0, 0.0, 0.0);
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
}
--- src/mtexturepixmapitem_glx.cpp
+++ src/mtexturepixmapitem_glx.cpp
@@ -284,14 +284,10 @@
if (d->custom_tfp && d->windowp) {
QPixmap qp = QPixmap::fromX11Pixmap(d->windowp);
- QT_TRY {
- QImage img = d->glwidget->convertToGLFormat(qp.toImage());
- glBindTexture(GL_TEXTURE_2D, d->ctextureId);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, img.width(), img.height(), 0,
- GL_RGBA, GL_UNSIGNED_BYTE, img.bits());
- } QT_CATCH(std::bad_alloc e) {
- /* XGetImage() failed, the window has been unmapped. */;
- }
+ QImage img = d->glwidget->convertToGLFormat(qp.toImage());
+ glBindTexture(GL_TEXTURE_2D, d->ctextureId);
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, img.width(), img.height(), 0,
+ GL_RGBA, GL_UNSIGNED_BYTE, img.bits());
}
update();
}
@@ -307,8 +303,7 @@
if (painter->paintEngine()->type() != QPaintEngine::OpenGL)
return;
#else
- if (painter->paintEngine()->type() != QPaintEngine::OpenGL2 &&
- painter->paintEngine()->type() != QPaintEngine::OpenGL) {
+ if (painter->paintEngine()->type() != QPaintEngine::OpenGL2) {
return;
}
#endif
@@ -318,7 +313,7 @@
#endif
glEnable(GL_TEXTURE_2D);
- if (propertyCache()->hasAlpha() || (opacity() < 1.0f && !dimmedEffect()) ) {
+ if (propertyCache()->hasAlpha() || opacity() < 1.0f) {
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glColor4f(1.0, 1.0, 1.0, opacity());
@@ -395,7 +390,4 @@
glBindTexture(GL_TEXTURE_2D, d->custom_tfp ? d->ctextureId : d->textureId);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 0, 0, 0, GL_RGBA,
GL_UNSIGNED_BYTE, 0);
-
- glClearColor(0.0, 0.0, 0.0, 0.0);
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
}
--- src/mtexturepixmapitem_p.cpp
+++ src/mtexturepixmapitem_p.cpp
@@ -22,7 +22,6 @@
#endif
#include "mtexturepixmapitem.h"
#include "texturepixmapshaders.h"
-#include "mcompositewindowshadereffect.h"
#include <QX11Info>
#include <QRect>
@@ -59,10 +58,7 @@
{
public:
- /*
- * This is the default set of shaders.
- * Use MCompositeWindowShaderEffect class to add more shader effects
- */
+ /* add more values here as we add more effects */
enum ShaderType {
NormalShader = 0,
BlurShader,
@@ -71,10 +67,8 @@
MGLResourceManager(QGLWidget *glwidget)
: QObject(glwidget),
- glcontext(glwidget->context()),
- currentShader(0)
- {
- sharedVertexShader = new QGLShader(QGLShader::Vertex,
+ currentShader(0) {
+ QGLShader *sharedVertexShader = new QGLShader(QGLShader::Vertex,
glwidget->context(), this);
if (!sharedVertexShader->compileSourceCode(QLatin1String(TexpVertShaderSource)))
qWarning("vertex shader failed to compile");
@@ -138,8 +132,10 @@
}
}
- void updateVertices(const QTransform &t)
- {
+ void updateVertices(const QTransform &t, ShaderType type) {
+ if (shader[type] != currentShader)
+ currentShader = shader[type];
+
worldMatrix[0][0] = t.m11();
worldMatrix[0][1] = t.m12();
worldMatrix[0][3] = t.m13();
@@ -149,63 +145,12 @@
worldMatrix[3][0] = t.dx();
worldMatrix[3][1] = t.dy();
worldMatrix[3][3] = t.m33();
- }
-
- void updateVertices(const QTransform &t, ShaderType type)
- {
- if (shader[type] != currentShader)
- currentShader = shader[type];
-
- updateVertices(t);
- currentShader->bind();
- currentShader->setUniformValue("matWorld", worldMatrix);
- }
-
-
- void updateVertices(const QTransform &t, GLuint customShaderId)
- {
- if (!customShaderId)
- return;
- QGLShaderProgram* frag = customShaders.value(customShaderId,0);
- if (!frag)
- return;
- currentShader = frag;
- updateVertices(t);
currentShader->bind();
currentShader->setUniformValue("matWorld", worldMatrix);
}
- GLuint installPixelShader(const QByteArray& code)
- {
- QByteArray source = code;
- source.append(TexpCustomShaderSource);
- QGLShaderProgram *custom = new QGLShaderProgram(glcontext, this);
- custom->addShader(sharedVertexShader);
- if (!custom->addShaderFromSourceCode(QGLShader::Fragment,
- QLatin1String(source)))
- qWarning("custom fragment shader failed to compile");
-
- bindAttribLocation(custom, "inputVertex", D_VERTEX_COORDS);
- bindAttribLocation(custom, "textureCoord", D_TEXTURE_COORDS);
-
- if (custom->link()) {
- customShaders[custom->programId()] = custom;
- return custom->programId();
- }
-
- qWarning() << "failed installing custom fragment shader:"
- << custom->log();
- custom->deleteLater();
-
- return 0;
- }
-
private:
static QGLShaderProgram *shader[ShaderTotal];
- QHash<GLuint, QGLShaderProgram *> customShaders;
- QGLShader *sharedVertexShader;
- const QGLContext* glcontext;
-
GLfloat projMatrix[4][4];
GLfloat worldMatrix[4][4];
GLfloat vertCoords[8];
@@ -221,24 +166,12 @@
QGLShaderProgram *MGLResourceManager::shader[ShaderTotal];
#endif
-
void MTexturePixmapPrivate::drawTexture(const QTransform &transform, const QRectF &drawRect, qreal opacity)
{
- if (current_effect) {
- current_effect->d->drawTexture(this, transform, drawRect, opacity);
- } else
- q_drawTexture(transform, drawRect, opacity);
-}
-
-void MTexturePixmapPrivate::q_drawTexture(const QTransform &transform, const QRectF &drawRect, qreal opacity)
-{
// TODO only update if matrix is dirty
- if(current_effect)
- glresource->updateVertices(transform, current_effect->activeShaderFragment());
- else
- glresource->updateVertices(transform, item->blurred() ?
- MGLResourceManager::BlurShader :
- MGLResourceManager::NormalShader);
+ glresource->updateVertices(transform, item->blurred() ?
+ MGLResourceManager::BlurShader :
+ MGLResourceManager::NormalShader);
GLfloat vertexCoords[] = {
drawRect.left(), drawRect.top(),
drawRect.left(), drawRect.bottom(),
@@ -254,10 +187,7 @@
else
glVertexAttribPointer(D_TEXTURE_COORDS, 2, GL_FLOAT, GL_FALSE, 0,
glresource->texCoords);
-
- if (current_effect)
- current_effect->setUniforms(glresource->currentShader);
- else if (item->blurred())
+ if (item->blurred())
glresource->currentShader->setUniformValue("blurstep", (GLfloat) 0.5);
glresource->currentShader->setUniformValue("opacity", (GLfloat) opacity);
glresource->currentShader->setUniformValue("texture", 0);
@@ -270,42 +200,6 @@
glActiveTexture(GL_TEXTURE0);
}
-void MTexturePixmapPrivate::installEffect(MCompositeWindowShaderEffect* effect)
-{
- current_effect = effect;
- connect(effect, SIGNAL(enabledChanged(bool)), SLOT( activateEffect(bool)));
- connect(effect, SIGNAL(destroyed()), SLOT(removeEffect()));
-}
-
-void MTexturePixmapPrivate::removeEffect()
-{
- MCompositeWindowShaderEffect* e= (MCompositeWindowShaderEffect* ) sender();
-
- for (int i=0; i < e->fragmentIds().size(); ++i) {
- GLuint id = e->fragmentIds()[i];
- QGLShaderProgram* frag = glresource->customShaders.value(i,0);
- if (frag)
- delete frag;
- glresource->customShaders.remove(id);
- }
-}
-
-GLuint MTexturePixmapPrivate::installPixelShader(const QByteArray& code)
-{
- if (glresource)
- return glresource->installPixelShader(code);
-
- return 0;
-}
-
-void MTexturePixmapPrivate::activateEffect(bool enabled)
-{
- if (enabled)
- current_effect = (MCompositeWindowShaderEffect* ) sender();
- else
- current_effect = 0;
-}
-
void MTexturePixmapPrivate::init()
{
if (!item->is_valid)
@@ -354,15 +248,14 @@
damage_object = NULL;
}
- if (enabled && !damage_object && !item->propertyCache()->isInputOnly())
+ if (enabled && !damage_object)
damage_object = XDamageCreate(QX11Info::display(), window,
XDamageReportNonEmpty);
}
void MTexturePixmapPrivate::saveBackingStore(bool renew)
{
- if ((item->propertyCache()->is_valid && !item->propertyCache()->isMapped())
- || item->propertyCache()->isInputOnly())
+ if (item->propertyCache()->is_valid && !item->propertyCache()->isMapped())
return;
if (windowp)
--- src/mtexturepixmapitem_p.h
+++ src/mtexturepixmapitem_p.h
@@ -20,10 +20,8 @@
#ifndef DUITEXTUREPIXMAPITEM_P_H
#define DUITEXTUREPIXMAPITEM_P_H
-#include <QObject>
#include <QRect>
#include <QRegion>
-#include <QPointer>
#include <X11/extensions/Xdamage.h>
@@ -41,16 +39,13 @@
class QGraphicsItem;
class MTexturePixmapItem;
class QGLContext;
-class QTransform;
class MGLResourceManager;
-class MCompositeWindowShaderEffect;
/*! Internal private implementation of MTexturePixmapItem
Warning! Interface here may change at any time!
*/
-class MTexturePixmapPrivate: QObject
+class MTexturePixmapPrivate
{
- Q_OBJECT
public:
MTexturePixmapPrivate(Window window, QGLWidget *w, MTexturePixmapItem *item);
~MTexturePixmapPrivate();
@@ -62,11 +57,7 @@
void resize(int w, int h);
void windowRaised();
void drawTexture(const QTransform& transform, const QRectF& drawRect, qreal opacity);
-
- void q_drawTexture(const QTransform& transform, const QRectF& drawRect, qreal opacity);
void damageTracking(bool enabled);
- void installEffect(MCompositeWindowShaderEffect* effect);
- static GLuint installPixelShader(const QByteArray& code);
QGLContext *ctx;
QGLWidget *glwidget;
@@ -89,16 +80,11 @@
Damage damage_object;
MTexturePixmapItem *item;
- QPointer<MCompositeWindowShaderEffect> current_effect;
#ifdef GLES2_VERSION
static EglResourceManager *eglresource;
#endif
static MGLResourceManager* glresource;
-
-private slots:
- void activateEffect(bool enabled);
- void removeEffect();
};
#endif //DUITEXTUREPIXMAPITEM_P_H
--- src/mwindowpropertycache.cpp
+++ src/mwindowpropertycache.cpp
@@ -261,9 +261,6 @@
const QRegion &MWindowPropertyCache::shapeRegion()
{
if (!is_valid || shape_rects_valid) {
- if (!shape_region.isEmpty() && isInputOnly())
- // InputOnly window obstructs nothing
- shape_region = QRegion(0, 0, 0, 0);
if (shape_region.isEmpty())
shape_region = QRegion(realGeometry());
return shape_region;
@@ -419,7 +416,6 @@
xcb_icon_geom_cookie = xcb_get_property(xcb_conn, 0, window,
ATOM(_NET_WM_ICON_GEOMETRY),
XCB_ATOM_CARDINAL, 0, 4);
- emit iconGeometryUpdated();
} else if (e->atom == ATOM(_MEEGOTOUCH_GLOBAL_ALPHA)) {
if (global_alpha < 0)
// collect the old reply
@@ -444,8 +440,6 @@
xcb_decor_buttons_cookie = xcb_get_property(xcb_conn, 0, window,
ATOM(_MEEGOTOUCH_DECORATOR_BUTTONS),
XCB_ATOM_CARDINAL, 0, 8);
- // TODO: could be based on a signal
- return true;
} else if (e->atom == ATOM(WM_PROTOCOLS)) {
if (!wm_protocols_valid)
// collect the old reply
--- src/mwindowpropertycache.h
+++ src/mwindowpropertycache.h
@@ -20,20 +20,19 @@
#ifndef MWINDOWPROPERTYCACHE_H
#define MWINDOWPROPERTYCACHE_H
-#include <QRegion>
#include <X11/Xutil.h>
#include <X11/Xlib-xcb.h>
#include <xcb/render.h>
#include <xcb/shape.h>
#include <X11/extensions/shape.h>
#include "mcompatoms_p.h"
+#include <QRegion>
/*!
* This is a class for caching window property values for a window.
*/
-class MWindowPropertyCache: public QObject
+class MWindowPropertyCache
{
- Q_OBJECT
public:
/*! Construct a MWindowPropertyCache
@@ -153,7 +152,7 @@
if (s)
attrs->map_state = XCB_MAP_STATE_VIEWABLE;
else
- attrs->map_state = XCB_MAP_STATE_UNMAPPED;
+ attrs->map_state = XCB_MAP_STATE_UNVIEWABLE;
}
/*!
@@ -172,11 +171,6 @@
return false;
return attrs->override_redirect;
}
- bool isInputOnly() const {
- if (!is_valid || !attrs)
- return false;
- return attrs->_class == XCB_WINDOW_CLASS_INPUT_ONLY;
- }
const XWMHints &getWMHints();
@@ -211,9 +205,6 @@
MWindowPropertyCache::xcb_conn = c;
}
-signals:
- void iconGeometryUpdated();
-
private:
int alphaValue(xcb_get_property_cookie_t c);
void buttonGeometryHelper();
--- src/src.pro
+++ src/src.pro
@@ -21,7 +21,7 @@
}
}
-TEMPLATE = lib
+TEMPLATE = app
TARGET = mcompositor
DEPENDPATH += .
QT += dbus
@@ -30,7 +30,6 @@
INCLUDEPATH += ../decorators/libdecorator/
HEADERS += \
mtexturepixmapitem.h \
- mtexturepixmapitem_p.h \
mcompositescene.h \
mcompositewindow.h \
mwindowpropertycache.h \
@@ -40,12 +39,10 @@
mcompositemanager_p.h \
mdevicestate.h \
mcompatoms_p.h \
- mdecoratorframe.h \
- mcompositemanagerextension.h \
- mcompositewindowshadereffect.h \
- mcompmgrextensionfactory.h
+ mdecoratorframe.h
SOURCES += \
+ main.cpp \
mtexturepixmapitem_p.cpp \
mcompositescene.cpp \
mcompositewindow.cpp \
@@ -54,9 +51,7 @@
mcompositemanager.cpp \
msimplewindowframe.cpp \
mdevicestate.cpp \
- mdecoratorframe.cpp \
- mcompositemanagerextension.cpp \
- mcompositewindowshadereffect.cpp
+ mdecoratorframe.cpp
RESOURCES = tools.qrc
@@ -64,7 +59,7 @@
PKGCONFIG += contextsubscriber-1.0
QT += core gui opengl
-target.path += /usr/lib
+target.path += $$M_INSTALL_BIN
INSTALLS += target
LIBS += -lXdamage -lXcomposite -lXfixes -lX11-xcb -lxcb-render -lxcb-shape \
--- src/texturepixmapshaders.h
+++ src/texturepixmapshaders.h
@@ -40,15 +40,6 @@
gl_FragColor = texture2D(texture, fragTexCoord) * opacity; \
}";
-static const char* TexpCustomShaderSource = "\
- varying highp vec2 fragTexCoord;\n\
- uniform lowp sampler2D texture;\n\
- uniform lowp float opacity;\n\
- void main(void) \n\
- {\n\
- gl_FragColor = customShader(texture, fragTexCoord) * opacity; \n\
- }\n\n";
-
#if 0
static const char *AlphaTestFragShaderSource = "\
--- tests/focus-tracker/focus-tracker.c
+++ tests/focus-tracker/focus-tracker.c
@@ -140,13 +140,13 @@
name = get_window_name (dpy, w);
if (strstr(type, "_NET_WM_WINDOW_"))
- printf ("0x%lx %s %-7s %s",
+ printf ("%07lx %s %-7s %s",
w,
wmclass,
type + strlen("_NET_WM_WINDOW_"),
!name ? "(no name)" : name);
else
- printf ("0x%lx %s %-7s %s",
+ printf ("%07lx %s %-7s %s",
w,
wmclass,
type,
@@ -158,7 +158,7 @@
if (parent) {
name = get_window_name (dpy, parent);
- printf (" (tr. to 0x%lx %s)",
+ printf (" (tr. to %07lx %s)",
parent,
!name ? "(no name)" : name);
free(name);
@@ -210,7 +210,7 @@
XGetInputFocus(dpy, &focused, &reverted_to);
if (focused != old_focused) {
- printf("Focused ");
+ printf("Focused ");
dump_window(dpy, root, focused);
if (one_shot) return 0;
}
--- tests/functional/test0.py
+++ tests/functional/test0.py
@@ -13,9 +13,6 @@
if os.system('/sbin/mcetool --unblank-screen --set-tklock-mode=unlocked --set-inhibit-mode=stay-on'):
print 'mcetool is missing!'
-if os.system('/usr/bin/gconftool-2 --type bool --set /desktop/meego/notifications/previews_enabled false'):
- print 'cannot disable notifications'
-
if os.system('pidof mcompositor'):
print 'mcompositor is not running'
sys.exit(1)
@@ -54,7 +51,4 @@
os.popen('pkill windowctl')
time.sleep(1)
-if os.system('/usr/bin/gconftool-2 --type bool --set /desktop/meego/notifications/previews_enabled true'):
- print 'cannot re-enable notifications'
-
sys.exit(ret)
--- tests/functional/test1.py
+++ tests/functional/test1.py
@@ -13,9 +13,6 @@
if os.system('/sbin/mcetool --unblank-screen --set-tklock-mode=unlocked --set-inhibit-mode=stay-on'):
print 'mcetool is missing!'
-if os.system('/usr/bin/gconftool-2 --type bool --set /desktop/meego/notifications/previews_enabled false'):
- print 'cannot disable notifications'
-
if os.system('pidof mcompositor'):
print 'mcompositor is not running'
sys.exit(1)
@@ -50,7 +47,4 @@
os.popen('pkill windowctl')
time.sleep(1)
-if os.system('/usr/bin/gconftool-2 --type bool --set /desktop/meego/notifications/previews_enabled true'):
- print 'cannot re-enable notifications'
-
sys.exit(ret)
--- tests/functional/test10.py
+++ tests/functional/test10.py
@@ -17,9 +17,6 @@
if os.system('/sbin/mcetool --unblank-screen --set-tklock-mode=unlocked --set-inhibit-mode=stay-on'):
print 'mcetool is missing!'
-if os.system('/usr/bin/gconftool-2 --type bool --set /desktop/meego/notifications/previews_enabled false'):
- print 'cannot disable notifications'
-
if os.system('pidof mcompositor'):
print 'mcompositor is not running'
sys.exit(1)
@@ -97,7 +94,4 @@
os.popen('pkill windowctl')
time.sleep(1)
-if os.system('/usr/bin/gconftool-2 --type bool --set /desktop/meego/notifications/previews_enabled true'):
- print 'cannot re-enable notifications'
-
sys.exit(ret)
--- tests/functional/test11.py
+++ tests/functional/test11.py
@@ -16,9 +16,6 @@
if os.system('/sbin/mcetool --unblank-screen --set-tklock-mode=unlocked --set-inhibit-mode=stay-on'):
print 'mcetool is missing!'
-if os.system('/usr/bin/gconftool-2 --type bool --set /desktop/meego/notifications/previews_enabled false'):
- print 'cannot disable notifications'
-
if os.system('pidof mcompositor'):
print 'mcompositor is not running'
sys.exit(1)
@@ -74,7 +71,4 @@
os.popen('pkill windowctl')
time.sleep(1)
-if os.system('/usr/bin/gconftool-2 --type bool --set /desktop/meego/notifications/previews_enabled true'):
- print 'cannot re-enable notifications'
-
sys.exit(ret)
--- tests/functional/test12.py
+++ tests/functional/test12.py
@@ -18,9 +18,6 @@
if os.system('/sbin/mcetool --unblank-screen --set-inhibit-mode=stay-on'):
print 'mcetool is missing!'
-if os.system('/usr/bin/gconftool-2 --type bool --set /desktop/meego/notifications/previews_enabled false'):
- print 'cannot disable notifications'
-
if os.system('pidof mcompositor'):
print 'mcompositor is not running'
sys.exit(1)
@@ -109,8 +106,4 @@
os.popen('pkill windowctl')
time.sleep(1)
-if os.system('/usr/bin/gconftool-2 --type bool --set /desktop/meego/notifications/previews_enabled true'):
- print 'cannot re-enable notifications'
-
-
sys.exit(ret)
--- tests/functional/test13.py
+++ tests/functional/test13.py
@@ -13,9 +13,6 @@
if os.system('/sbin/mcetool --unblank-screen --set-tklock-mode=unlocked --set-inhibit-mode=stay-on'):
print 'mcetool is missing!'
-if os.system('/usr/bin/gconftool-2 --type bool --set /desktop/meego/notifications/previews_enabled false'):
- print 'cannot disable notifications'
-
if os.system('pidof mcompositor'):
print 'mcompositor is not running'
sys.exit(1)
@@ -56,7 +53,4 @@
os.popen('pkill windowctl')
time.sleep(1)
-if os.system('/usr/bin/gconftool-2 --type bool --set /desktop/meego/notifications/previews_enabled true'):
- print 'cannot re-enable notifications'
-
sys.exit(ret)
--- tests/functional/test14.py
+++ tests/functional/test14.py
@@ -14,9 +14,6 @@
if os.system('/sbin/mcetool --unblank-screen --set-tklock-mode=unlocked --set-inhibit-mode=stay-on'):
print 'mcetool is missing!'
-if os.system('/usr/bin/gconftool-2 --type bool --set /desktop/meego/notifications/previews_enabled false'):
- print 'cannot disable notifications'
-
if os.system('pidof mcompositor'):
print 'mcompositor is not running'
sys.exit(1)
@@ -57,7 +54,4 @@
os.popen('pkill windowctl')
time.sleep(1)
-if os.system('/usr/bin/gconftool-2 --type bool --set /desktop/meego/notifications/previews_enabled true'):
- print 'cannot re-enable notifications'
-
sys.exit(ret)
--- tests/functional/test15.py
+++ tests/functional/test15.py
@@ -20,9 +20,6 @@
if os.system('/sbin/mcetool --unblank-screen --set-tklock-mode=unlocked --set-inhibit-mode=stay-on'):
print 'mcetool is missing!'
-if os.system('/usr/bin/gconftool-2 --type bool --set /desktop/meego/notifications/previews_enabled false'):
- print 'cannot disable notifications'
-
if os.system('pidof mcompositor'):
print 'mcompositor is not running'
sys.exit(1)
@@ -77,7 +74,4 @@
os.popen('pkill windowctl')
time.sleep(1)
-if os.system('/usr/bin/gconftool-2 --type bool --set /desktop/meego/notifications/previews_enabled true'):
- print 'cannot re-enable notifications'
-
sys.exit(ret)
--- tests/functional/test16.py
+++ tests/functional/test16.py
@@ -12,9 +12,6 @@
if os.system('/sbin/mcetool --unblank-screen --set-tklock-mode=unlocked --set-inhibit-mode=stay-on'):
print 'mcetool is missing!'
-if os.system('/usr/bin/gconftool-2 --type bool --set /desktop/meego/notifications/previews_enabled false'):
- print 'cannot disable notifications'
-
if os.system('pidof mcompositor'):
print 'mcompositor is not running'
sys.exit(1)
@@ -54,7 +51,4 @@
os.popen('pkill windowctl')
time.sleep(1)
-if os.system('/usr/bin/gconftool-2 --type bool --set /desktop/meego/notifications/previews_enabled true'):
- print 'cannot re-enable notifications'
-
sys.exit(ret)
--- tests/functional/test17.py
+++ tests/functional/test17.py
@@ -27,8 +27,8 @@
fd = os.popen('focus-tracker -o')
s = fd.read(5000)
for l in s.splitlines():
- m = re.search('(?<=^Focused )0x[0-9a-f]+', l.strip()).group(0)
- if m == w:
+ m = re.search('(?<=^Focused )[0-9a-f]+', l.strip()).group(0)
+ if m and ('0x%s' % m) == w:
correct = 1
break
if correct == 0:
@@ -41,9 +41,6 @@
if os.system('/sbin/mcetool --unblank-screen --set-inhibit-mode=stay-on'):
print 'mcetool is missing!'
-if os.system('/usr/bin/gconftool-2 --type bool --set /desktop/meego/notifications/previews_enabled false'):
- print 'cannot disable notifications'
-
if os.system('pidof mcompositor'):
print 'mcompositor is not running'
sys.exit(1)
@@ -97,7 +94,4 @@
time.sleep(1)
check_focus(home_win)
-if os.system('/usr/bin/gconftool-2 --type bool --set /desktop/meego/notifications/previews_enabled true'):
- print 'cannot re-enable notifications'
-
sys.exit(ret)
--- tests/functional/test18.py
+++ tests/functional/test18.py
@@ -21,9 +21,6 @@
if os.system('/sbin/mcetool --unblank-screen --set-tklock-mode=unlocked --set-inhibit-mode=stay-on'):
print 'mcetool is missing!'
-if os.system('/usr/bin/gconftool-2 --type bool --set /desktop/meego/notifications/previews_enabled false'):
- print 'cannot disable notifications'
-
if os.system('pidof mcompositor'):
print 'mcompositor is not running'
sys.exit(1)
@@ -106,7 +103,4 @@
os.popen('pkill windowctl')
time.sleep(1)
-if os.system('/usr/bin/gconftool-2 --type bool --set /desktop/meego/notifications/previews_enabled true'):
- print 'cannot re-enable notifications'
-
sys.exit(ret)
--- tests/functional/test19.py
+++ tests/functional/test19.py
@@ -17,9 +17,6 @@
if os.system('/sbin/mcetool --unblank-screen --set-tklock-mode=unlocked --set-inhibit-mode=stay-on'):
print 'mcetool is missing!'
-if os.system('/usr/bin/gconftool-2 --type bool --set /desktop/meego/notifications/previews_enabled false'):
- print 'cannot disable notifications'
-
if os.system('pidof mcompositor'):
print 'mcompositor is not running'
sys.exit(1)
@@ -87,7 +84,4 @@
os.popen('pkill windowctl')
time.sleep(1)
-if os.system('/usr/bin/gconftool-2 --type bool --set /desktop/meego/notifications/previews_enabled true'):
- print 'cannot re-enable notifications'
-
sys.exit(ret)
--- tests/functional/test2.py
+++ tests/functional/test2.py
@@ -13,9 +13,6 @@
if os.system('/sbin/mcetool --unblank-screen --set-tklock-mode=unlocked --set-inhibit-mode=stay-on'):
print 'mcetool is missing!'
-if os.system('/usr/bin/gconftool-2 --type bool --set /desktop/meego/notifications/previews_enabled false'):
- print 'cannot disable notifications'
-
if os.system('pidof mcompositor'):
print 'mcompositor is not running'
sys.exit(1)
@@ -44,7 +41,4 @@
os.popen('pkill windowctl')
time.sleep(1)
-if os.system('/usr/bin/gconftool-2 --type bool --set /desktop/meego/notifications/previews_enabled true'):
- print 'cannot re-enable notifications'
-
sys.exit(ret)
--- tests/functional/test20.py
+++ tests/functional/test20.py
@@ -17,9 +17,6 @@
if os.system('/sbin/mcetool --unblank-screen --set-tklock-mode=unlocked --set-inhibit-mode=stay-on'):
print 'mcetool is missing!'
-if os.system('/usr/bin/gconftool-2 --type bool --set /desktop/meego/notifications/previews_enabled false'):
- print 'cannot disable notifications'
-
if os.system('pidof mcompositor'):
print 'mcompositor is not running'
sys.exit(1)
@@ -60,7 +57,7 @@
# simulate a phone call
fd = os.popen('windowctl P')
-time.sleep(3)
+time.sleep(1)
# create a fullscreen application window
fd = os.popen('windowctl fn')
@@ -84,7 +81,4 @@
os.popen('pkill context-provide')
time.sleep(1)
-if os.system('/usr/bin/gconftool-2 --type bool --set /desktop/meego/notifications/previews_enabled true'):
- print 'cannot re-enable notifications'
-
sys.exit(ret)
--- tests/functional/test3.py
+++ tests/functional/test3.py
@@ -13,9 +13,6 @@
if os.system('/sbin/mcetool --unblank-screen --set-tklock-mode=unlocked --set-inhibit-mode=stay-on'):
print 'mcetool is missing!'
-if os.system('/usr/bin/gconftool-2 --type bool --set /desktop/meego/notifications/previews_enabled false'):
- print 'cannot disable notifications'
-
if os.system('pidof mcompositor'):
print 'mcompositor is not running'
sys.exit(1)
@@ -73,7 +70,4 @@
os.popen('pkill windowctl')
time.sleep(1)
-if os.system('/usr/bin/gconftool-2 --type bool --set /desktop/meego/notifications/previews_enabled true'):
- print 'cannot re-enable notifications'
-
sys.exit(ret)
--- tests/functional/test4.py
+++ tests/functional/test4.py
@@ -13,9 +13,6 @@
if os.system('/sbin/mcetool --unblank-screen --set-tklock-mode=unlocked --set-inhibit-mode=stay-on'):
print 'mcetool is missing!'
-if os.system('/usr/bin/gconftool-2 --type bool --set /desktop/meego/notifications/previews_enabled false'):
- print 'cannot disable notifications'
-
if os.system('pidof mcompositor'):
print 'mcompositor is not running'
sys.exit(1)
@@ -44,7 +41,4 @@
os.popen('pkill windowctl')
time.sleep(1)
-if os.system('/usr/bin/gconftool-2 --type bool --set /desktop/meego/notifications/previews_enabled true'):
- print 'cannot re-enable notifications'
-
sys.exit(ret)
--- tests/functional/test5.py
+++ tests/functional/test5.py
@@ -14,9 +14,6 @@
if os.system('/sbin/mcetool --unblank-screen --set-tklock-mode=unlocked --set-inhibit-mode=stay-on'):
print 'mcetool is missing!'
-if os.system('/usr/bin/gconftool-2 --type bool --set /desktop/meego/notifications/previews_enabled false'):
- print 'cannot disable notifications'
-
if os.system('pidof mcompositor'):
print 'mcompositor is not running'
sys.exit(1)
@@ -54,7 +51,4 @@
os.popen('pkill windowctl')
time.sleep(1)
-if os.system('/usr/bin/gconftool-2 --type bool --set /desktop/meego/notifications/previews_enabled true'):
- print 'cannot re-enable notifications'
-
sys.exit(ret)
--- tests/functional/test6.py
+++ tests/functional/test6.py
@@ -15,9 +15,6 @@
if os.system('/sbin/mcetool --unblank-screen --set-tklock-mode=unlocked --set-inhibit-mode=stay-on'):
print 'mcetool is missing!'
-if os.system('/usr/bin/gconftool-2 --type bool --set /desktop/meego/notifications/previews_enabled false'):
- print 'cannot disable notifications'
-
if os.system('pidof mcompositor'):
print 'mcompositor is not running'
sys.exit(1)
@@ -83,7 +80,4 @@
os.popen('pkill windowctl')
time.sleep(1)
-if os.system('/usr/bin/gconftool-2 --type bool --set /desktop/meego/notifications/previews_enabled true'):
- print 'cannot re-enable notifications'
-
sys.exit(ret)
--- tests/functional/test7.py
+++ tests/functional/test7.py
@@ -17,9 +17,6 @@
if os.system('/sbin/mcetool --unblank-screen --set-tklock-mode=unlocked --set-inhibit-mode=stay-on'):
print 'mcetool is missing!'
-if os.system('/usr/bin/gconftool-2 --type bool --set /desktop/meego/notifications/previews_enabled false'):
- print 'cannot disable notifications'
-
if os.system('pidof mcompositor'):
print 'mcompositor is not running'
sys.exit(1)
@@ -65,7 +62,4 @@
os.popen('pkill windowctl')
time.sleep(1)
-if os.system('/usr/bin/gconftool-2 --type bool --set /desktop/meego/notifications/previews_enabled true'):
- print 'cannot re-enable notifications'
-
sys.exit(ret)
--- tests/functional/test8.py
+++ tests/functional/test8.py
@@ -19,9 +19,6 @@
if os.system('/sbin/mcetool --unblank-screen --set-tklock-mode=unlocked --set-inhibit-mode=stay-on'):
print 'mcetool is missing!'
-if os.system('/usr/bin/gconftool-2 --type bool --set /desktop/meego/notifications/previews_enabled false'):
- print 'cannot disable notifications'
-
if os.system('pidof mcompositor'):
print 'mcompositor is not running'
sys.exit(1)
@@ -108,7 +105,4 @@
os.popen('pkill windowctl')
time.sleep(1)
-if os.system('/usr/bin/gconftool-2 --type bool --set /desktop/meego/notifications/previews_enabled true'):
- print 'cannot re-enable notifications'
-
sys.exit(ret)
--- tests/functional/test9.py
+++ tests/functional/test9.py
@@ -16,9 +16,6 @@
if os.system('/sbin/mcetool --unblank-screen --set-tklock-mode=unlocked --set-inhibit-mode=stay-on'):
print 'mcetool is missing!'
-if os.system('/usr/bin/gconftool-2 --type bool --set /desktop/meego/notifications/previews_enabled false'):
- print 'cannot disable notifications'
-
if os.system('pidof mcompositor'):
print 'mcompositor is not running'
sys.exit(1)
@@ -84,7 +81,4 @@
os.popen('pkill windowctl')
time.sleep(1)
-if os.system('/usr/bin/gconftool-2 --type bool --set /desktop/meego/notifications/previews_enabled true'):
- print 'cannot re-enable notifications'
-
sys.exit(ret)
--- tests/windowctl/windowctl.cpp
+++ tests/windowctl/windowctl.cpp
@@ -267,13 +267,13 @@
static Window create_window(Display *dpy, int width, int height,
int argb, int fullscreen, Colormap *colormap,
- int override, int input_only)
+ int override)
{
Window w;
XSetWindowAttributes attrs;
int attr_mask = CWOverrideRedirect;
attrs.override_redirect = override ? True : False;
- if (argb && !input_only) {
+ if (argb) {
/* use ARGB window */
Visual *visual;
@@ -290,13 +290,9 @@
} else {
attrs.background_pixel = BlackPixel (dpy, 0);
w = XCreateWindow(dpy, DefaultRootWindow (dpy), 0, 0,
- width, height, 0, input_only ? 0 : CopyFromParent,
- input_only ? InputOnly : InputOutput,
+ width, height, 0, CopyFromParent, InputOutput,
CopyFromParent,
- input_only ? 0 : (attr_mask | CWBackPixel),
- input_only ? 0 : &attrs);
- if (input_only && override)
- XChangeWindowAttributes(dpy, w, CWOverrideRedirect, &attrs);
+ attr_mask | CWBackPixel, &attrs);
*colormap = DefaultColormap (dpy, 0);
}
if (fullscreen)
@@ -337,7 +333,7 @@
static void print_usage_and_exit(QString& stdOut)
{
#define PROG "windowctl"
- stdOut = "Usage 1: " PROG " [afoemksIchpl](n|d|i|b) [transient for <XID>]\n"
+ stdOut = "Usage 1: " PROG " [afoemksIchp](n|d|i|b) [transient for <XID>]\n"
"a - ARGB (32-bit) window, otherwise 16-bit is used\n"
"f - fullscreen window\n"
"o - override-redirect window\n"
@@ -349,7 +345,6 @@
"c - set InputHint=False in WM_HINTS\n"
"h - set _MEEGOTOUCH_DECORATOR_BUTTONS for home and close buttons\n"
"p - claim to support the _NET_WM_PING protocol (but don't)\n"
- "l - use InputOnly window class\n"
"n - WM_TYPE_NORMAL window (if 'k' is given, that is the first type)\n"
"d - WM_TYPE_DIALOG window\n"
"i - WM_TYPE_INPUT window\n"
@@ -607,8 +602,7 @@
time_t last_time;
int argb = 0, fullscreen = 0, override_redirect = 0, decor_buttons = 0,
exit_on_unmap = 1, modal = 0, kde_override = 0, meego_layer = -1,
- shaped = 0, initial_iconic = 0, no_focus = 0, support_ping = 0,
- input_only = 0;
+ shaped = 0, initial_iconic = 0, no_focus = 0, support_ping = 0;
WindowType windowtype = TYPE_INVALID;
if (args.count() < 1 || args.count() > 4) {
@@ -672,10 +666,6 @@
support_ping = 1;
continue;
}
- if (*p == 'l') {
- input_only = 1;
- continue;
- }
if (*p == 'd') {
windowtype = TYPE_DIALOG;
continue;
@@ -790,7 +780,7 @@
}
w = create_window (dpy, WIN_W * 2 / 3, WIN_H * 2 / 3, argb, fullscreen,
- &colormap, override_redirect, input_only);
+ &colormap, override_redirect);
/* print XID of the window */
{
char buf[20];
++++++ meegotouch-compositor.yaml
--- meegotouch-compositor.yaml
+++ meegotouch-compositor.yaml
@@ -1,6 +1,6 @@
Name: meegotouch-compositor
Summary: MeeGo UI Compositing Window Manager
-Version: 0.7.1
+Version: 0.5.7
Release: 1
Group: System/Desktop
License: LGPL v2.1
@@ -13,6 +13,7 @@
- fix_test_compile_issues.patch
- fix_build_on_ARM.patch
- initialize_EGL_library.patch
+ - Fixes-MB-2951-black-screen-on-netbook.patch
Description: Direct UI compositing window manager
PkgConfigBR:
- QtDBus
@@ -26,7 +27,7 @@
- x11
- xext
- xrender
- - meegotouch
+ - meegotouch >= 0.20.34
Provides:
- duicompositor >= 0.3.9
- mcompositor >= 0.4.6
More information about the MeeGo-commits
mailing list