Merge lp:~fboucault/unity-2d/nautilus_window_instead_of_wallpaper into lp:unity-2d

Proposed by Florian Boucault
Status: Work in progress
Proposed branch: lp:~fboucault/unity-2d/nautilus_window_instead_of_wallpaper
Merge into: lp:unity-2d
Diff against target: 375 lines (+219/-26)
10 files modified
libunity-2d-private/Unity2d/plugin.cpp (+3/-0)
libunity-2d-private/src/CMakeLists.txt (+1/-0)
libunity-2d-private/src/rootwindowinfo.cpp (+121/-0)
libunity-2d-private/src/rootwindowinfo.h (+57/-0)
libunity-2d-private/src/unity2ddeclarativeview.cpp (+11/-0)
libunity-2d-private/src/unity2ddeclarativeview.h (+4/-0)
places/app/dashdeclarativeview.cpp (+1/-1)
spread/Workspace.qml (+21/-10)
spread/app/spreadview.cpp (+0/-12)
spread/app/spreadview.h (+0/-3)
To merge this branch: bzr merge lp:~fboucault/unity-2d/nautilus_window_instead_of_wallpaper
Reviewer Review Type Date Requested Status
Gerry Boland (community) Approve
Florian Boucault (community) Needs Fixing
Review via email: mp+86170@code.launchpad.net

Description of the change

[workspace switcher] Draw Nautilus desktop window's screenshot instead of loading the GNOME wallpaper.

Greatly improves startup speed therefore contributing to fixing https://bugs.launchpad.net/unity-2d/+bug/745764

The following changes were necessary to have the desktop window screenshot taken only when necessary:
- Defined new 'visible' property on Unity2dDeclarativeView.
- Cleaned up descendant classes handling of hideEvent and showEvent.

To post a comment you must log in.
Revision history for this message
Florian Boucault (fboucault) wrote :

Do not merge yet as the screenshoting of Nautilus is done as many times as we have desktops (taking in average 35ms on my laptop).

Revision history for this message
Florian Boucault (fboucault) :
review: Needs Fixing
Revision history for this message
Florian Boucault (fboucault) wrote :

https://bugs.launchpad.net/unity-2d/+bug/900019 should also be fixed with this MR

Revision history for this message
Florian Boucault (fboucault) wrote :

> Do not merge yet as the screenshoting of Nautilus is done as many times as we
> have desktops (taking in average 35ms on my laptop).

A cache based on timestamp should solve that.

832. By Andrea Cimitan

Some fixes to dash layout, especially on the filters pane. Fixes: https://bugs.launchpad.net/bugs/906235. Appoved by .

833. By Albert Astals Cid

[launcher] Move the RMB menu from clicked to pressed

Fixes LP bug #813036
. Fixes: https://bugs.launchpad.net/bugs/813036. Appoved by Lohith D Shivamurthy.

834. By Tiago Salem Herrmann

This merge request intends to fix lp:838708, making BFB behavior and visual match the design.. Fixes: https://bugs.launchpad.net/bugs/838708. Appoved by Lohith D Shivamurthy.

835. By Gerry Boland

[tests] Update visual asset of BFB - UNBLOCK. Fixes: . Appoved by .

836. By Albert Astals Cid

Use QScopedPointers to properly delete the lists returned from qtbamf. Fixes: . Appoved by .

837. By Albert Astals Cid

Reset window to NULL if it's not the one we are looking for

Otherwise in case we don't find the one with the xid we want the function returns the pointer of the last window of the list
. Fixes: . Appoved by .

838. By Albert Astals Cid

Do not invoke m_application->windows() multiple times

Two reasons for that:
 * the result of m_application->windows() needs to be deleted and if we call it in the for loop we can't
 * The size of the list itself can change (and more critically shrink) between calls ending up in a call to an invalid index (Bug 854634)
. Fixes: https://bugs.launchpad.net/bugs/854634. Appoved by Gerry Boland, Lohith D Shivamurthy.

839. By Tiago Salem Herrmann

The request to open the command lens (alt+f2) happens before the list of available lenses is properly populated when unity-2d-places is started by a dbus call.
This patch adds a simple "queue" that checks if the requested queue is available everytime a new lens is added to the "lenses" variable. Fixes: https://bugs.launchpad.net/bugs/883392. Appoved by Gerry Boland, Lohith D Shivamurthy.

840. By Michał Sawicz

[debian] package debug symbols. Fixes: . Appoved by Gerry Boland.

841. By Tiago Salem Herrmann

[dash] Remove underline from "Filter results" when it is highlighted. Fixes: https://bugs.launchpad.net/bugs/893061. Appoved by Gerry Boland.

842. By Gerry Boland

[test] [xdo] Ensure WM controls work by checking metacity's settings. Fixes: . Appoved by Lohith D Shivamurthy.

843. By Gerry Boland

[test] Fix Xdo to properly send function keys and re-enable Alt+F1 focus test. Fixes: . Appoved by Lohith D Shivamurthy.

844. By Didier Roche-Tolomelli

Dummy commit to rebuild against latest libunity and unity packaging
(libunity ABI bump) UNBLOCK. Fixes: . Appoved by Aurélien Gâteau.

845. By Aurélien Gâteau

* debian/control:
  - bump build-dep versions.

846. By Aurélien Gâteau

releasing version 5.2.0-0ubuntu1

847. By Didier Roche-Tolomelli

post-changelog edit

848. By Didier Roche-Tolomelli

remove TODO

849. By Albert Astals Cid

[test] Check that F1 toggles the launcher and brings the focus to the previous active window
. Fixes: . Appoved by Gerry Boland.

850. By Albert Astals Cid

[test] Check that showing the desktop shows also the launcher
. Fixes: . Appoved by .

851. By Gerry Boland

Rewrite launcher autohide_show_tests to use the verify* methods. Also add TmpWindow class manage creating and closing windows needed for tests.

Replacing the assert* with verify* methods mean we can remove the arbitrary sleep times, which means the test suite will run more smoothly (and faster!). The TmpWindow class provides book-keeping so that all created windows can be closed by the test teardown method, so that one failed test won't cause other tests to fail.. Fixes: . Appoved by Albert Astals Cid.

852. By Albert Astals Cid

Do not use "" to assign to QStrings, use QString() instead that is much faster or do not do nothing if they were just declared. Fixes: . Appoved by .

853. By Albert Astals Cid

Add some const &

It is true that those classes are refcounted so the win is not huge, but there's no reason not to save some locks in some atomic integers used for the ref/unrefing. Fixes: . Appoved by Gerry Boland.

854. By Albert Astals Cid

Add two more files to .bzrignore. Fixes: . Appoved by Gerry Boland.

855. By Albert Astals Cid

Wait for the Quit event to be delivered before really quitting

I think this is a problem either in Qt or in gnome-session, but we can "easily" workaround it ourselves, and could not find how to fix it "properly" so this seems like an acceptable workaround to me.. Fixes: https://bugs.launchpad.net/bugs/812104. Appoved by Gerry Boland.

856. By Albert Astals Cid

[test] Small improvements to autohide tests regarding timing on mouse moves
. Fixes: . Appoved by Gerry Boland.

857. By Albert Astals Cid

Remove Places related code as it is not used anymore. Fixes: . Appoved by Gerry Boland.

858. By Albert Astals Cid

[test] Check that the launcher is around for 1 second after removing an application tile
. Fixes: . Appoved by Michał Sawicz.

859. By Florian Boucault

Defined new 'visible' property on Unity2dDeclarativeView.
Cleaned up descendant classes handling of hideEvent and showEvent.

860. By Florian Boucault

[workspace switcher] Draw Nautilus desktop window's screenshot instead of loading the GNOME wallpaper.

861. By Florian Boucault

Added FIXME.

862. By Florian Boucault

Merged lp:unity-2d

863. By Florian Boucault

Fixes bug #900019

Revision history for this message
Gerry Boland (gerboland) wrote :

This improves the Spread visuals a lot.

It looks less good on multimonitor (the whole desktop of all screens is squeezed into each desktop), but as spread requires lots of MM work, I will accept this.

review: Approve
Revision history for this message
Florian Boucault (fboucault) wrote :

Thanks Gerry. There is still work to do on this MR though, work highlighted above. In summary:
* FIXME: Nautilus' window pixmap is reloaded as many times as there is workspaces
* writing automated tests:
  - make sure nautilus' pixmap is loaded only once
  - make sure nautilus XID retrieval works

Revision history for this message
Florian Boucault (fboucault) wrote :

> This improves the Spread visuals a lot.
>
> It looks less good on multimonitor (the whole desktop of all screens is
> squeezed into each desktop), but as spread requires lots of MM work, I will
> accept this.

Can you post a screenshot of what you described here. I sense that this is not acceptable as it would be a regression of what we currently have.

Revision history for this message
Gerry Boland (gerboland) wrote :

MM Screengrab: https://imgur.com/I4OVY

Yes it is a regression of what we have right now.

Since you plan to continue working on this branch, can you please mark it as Work in Progress until it's ready for review again?

Unmerged revisions

863. By Florian Boucault

Fixes bug #900019

862. By Florian Boucault

Merged lp:unity-2d

861. By Florian Boucault

Added FIXME.

860. By Florian Boucault

[workspace switcher] Draw Nautilus desktop window's screenshot instead of loading the GNOME wallpaper.

859. By Florian Boucault

Defined new 'visible' property on Unity2dDeclarativeView.
Cleaned up descendant classes handling of hideEvent and showEvent.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'libunity-2d-private/Unity2d/plugin.cpp'
--- libunity-2d-private/Unity2d/plugin.cpp 2012-01-24 16:46:52 +0000
+++ libunity-2d-private/Unity2d/plugin.cpp 2012-01-26 22:03:24 +0000
@@ -36,6 +36,7 @@
36#include "windowinfo.h"36#include "windowinfo.h"
37#include "windowslist.h"37#include "windowslist.h"
38#include "screeninfo.h"38#include "screeninfo.h"
39#include "rootwindowinfo.h"
39#include "plugin.h"40#include "plugin.h"
40#include "cacheeffect.h"41#include "cacheeffect.h"
41#include "iconutilities.h"42#include "iconutilities.h"
@@ -102,6 +103,7 @@
102 qmlRegisterType<WindowsList>(uri, 0, 1, "WindowsList");103 qmlRegisterType<WindowsList>(uri, 0, 1, "WindowsList");
103 qmlRegisterType<ScreenInfo>(); // Register the type as non creatable104 qmlRegisterType<ScreenInfo>(); // Register the type as non creatable
104 qmlRegisterType<WorkspacesInfo>(); // Register the type as non creatable105 qmlRegisterType<WorkspacesInfo>(); // Register the type as non creatable
106 qmlRegisterType<RootWindowInfo>(); // Register the type as non creatable
105107
106 qmlRegisterType<CacheEffect>(uri, 0, 1, "CacheEffect");108 qmlRegisterType<CacheEffect>(uri, 0, 1, "CacheEffect");
107 qmlRegisterType<QGraphicsBlurEffect>("Effects", 1, 0, "Blur");109 qmlRegisterType<QGraphicsBlurEffect>("Effects", 1, 0, "Blur");
@@ -175,6 +177,7 @@
175 not creatable directly in QML */177 not creatable directly in QML */
176 engine->rootContext()->setContextProperty("screen", ScreenInfo::instance());178 engine->rootContext()->setContextProperty("screen", ScreenInfo::instance());
177 engine->rootContext()->setContextProperty("iconUtilities", new IconUtilities(engine));179 engine->rootContext()->setContextProperty("iconUtilities", new IconUtilities(engine));
180 engine->rootContext()->setContextProperty("rootWindow", RootWindowInfo::instance());
178181
179 /* Expose QConf objects as a context property not to initialize it multiple times */182 /* Expose QConf objects as a context property not to initialize it multiple times */
180 engine->rootContext()->setContextProperty("dash2dConfiguration", &dash2dConfiguration());183 engine->rootContext()->setContextProperty("dash2dConfiguration", &dash2dConfiguration());
181184
=== modified file 'libunity-2d-private/src/CMakeLists.txt'
--- libunity-2d-private/src/CMakeLists.txt 2012-01-24 11:50:38 +0000
+++ libunity-2d-private/src/CMakeLists.txt 2012-01-26 22:03:24 +0000
@@ -34,6 +34,7 @@
34 windowinfo.cpp34 windowinfo.cpp
35 windowslist.cpp35 windowslist.cpp
36 screeninfo.cpp36 screeninfo.cpp
37 rootwindowinfo.cpp
37 cacheeffect.cpp38 cacheeffect.cpp
38 workspacesinfo.cpp39 workspacesinfo.cpp
39 signalwaiter.cpp40 signalwaiter.cpp
4041
=== added file 'libunity-2d-private/src/rootwindowinfo.cpp'
--- libunity-2d-private/src/rootwindowinfo.cpp 1970-01-01 00:00:00 +0000
+++ libunity-2d-private/src/rootwindowinfo.cpp 2012-01-26 22:03:24 +0000
@@ -0,0 +1,121 @@
1/*
2 * Copyright (C) 2011 Canonical, Ltd.
3 *
4 * Authors:
5 * Florian Boucault <florian.boucault@canonical.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; version 3.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#include "rootwindowinfo.h"
21
22#include <QX11Info>
23#include <QAbstractEventDispatcher>
24
25#include <X11/Xlib.h>
26#include <X11/Xatom.h>
27
28
29QAbstractEventDispatcher::EventFilter RootWindowInfo::s_oldEventFilter = NULL;
30Atom RootWindowInfo::NAUTILUS_DESKTOP_WINDOW_ID = 0;
31
32RootWindowInfo::RootWindowInfo(QObject *parent) :
33 QObject(parent),
34 m_nautilusDesktopWindowId(0)
35{
36 RootWindowInfo::internX11Atoms();
37
38 /* Setup a low-level event filter to receive X11 events directly,
39 then ask X11 to notify us of property changes on the root window.
40 */
41 QAbstractEventDispatcher *dispatcher = QAbstractEventDispatcher::instance();
42 RootWindowInfo::s_oldEventFilter = dispatcher->setEventFilter(RootWindowInfo::globalEventFilter);
43 XSelectInput(QX11Info::display(), QX11Info::appRootWindow(), PropertyChangeMask);
44
45 /* Initialize cached values of properties */
46 updateNautilusDesktopWindowId();
47}
48
49RootWindowInfo* RootWindowInfo::instance()
50{
51 static RootWindowInfo* singleton = new RootWindowInfo();
52 return singleton;
53}
54
55void RootWindowInfo::internX11Atoms()
56{
57 NAUTILUS_DESKTOP_WINDOW_ID = XInternAtom(QX11Info::display(),
58 "NAUTILUS_DESKTOP_WINDOW_ID",
59 False);
60}
61
62bool RootWindowInfo::globalEventFilter(void* message)
63{
64 /* Always call the old event handler before we do our thing, and
65 make sure to always return what it did return, as we don't really
66 "handle" any event, we just monitor them */
67 bool result;
68 result = (RootWindowInfo::s_oldEventFilter != NULL) ? RootWindowInfo::s_oldEventFilter(message) : false;
69
70 XEvent* event = static_cast<XEvent*>(message);
71 if (event->type == PropertyNotify) {
72 if (event->xproperty.atom == NAUTILUS_DESKTOP_WINDOW_ID) {
73 RootWindowInfo::instance()->updateNautilusDesktopWindowId();
74 }
75 }
76
77 return result;
78}
79
80bool RootWindowInfo::getX11Property(Atom property, long long_length, Atom req_type, unsigned long &value)
81{
82 Atom actual_type_return;
83 int actual_format_return;
84 unsigned long nitems_return;
85 unsigned long bytes_after_return;
86 unsigned char *prop_return;
87 int result;
88
89 result = XGetWindowProperty(QX11Info::display(), QX11Info::appRootWindow(),
90 property,
91 0, long_length, False, req_type,
92 &actual_type_return, &actual_format_return, &nitems_return,
93 &bytes_after_return, &prop_return);
94 if (result == Success && actual_type_return != None) {
95 value = ((unsigned long*) prop_return)[0];
96 XFree(prop_return);
97 return true;
98 }
99
100 return false;
101}
102
103void RootWindowInfo::updateNautilusDesktopWindowId()
104{
105 unsigned long value = 0;
106
107 getX11Property(NAUTILUS_DESKTOP_WINDOW_ID, 1, XA_WINDOW, value);
108
109 if (m_nautilusDesktopWindowId != value) {
110 m_nautilusDesktopWindowId = value;
111 Q_EMIT nautilusDesktopWindowIdChanged();
112 }
113}
114
115unsigned long RootWindowInfo::nautilusDesktopWindowId() const
116{
117 return m_nautilusDesktopWindowId;
118}
119
120
121#include "rootwindowinfo.moc"
0122
=== added file 'libunity-2d-private/src/rootwindowinfo.h'
--- libunity-2d-private/src/rootwindowinfo.h 1970-01-01 00:00:00 +0000
+++ libunity-2d-private/src/rootwindowinfo.h 2012-01-26 22:03:24 +0000
@@ -0,0 +1,57 @@
1/*
2 * Copyright (C) 2011 Canonical, Ltd.
3 *
4 * Authors:
5 * Florian Boucault <florian.boucault@canonical.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; version 3.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#ifndef ROOTWINDOWINFO_H
21#define ROOTWINDOWINFO_H
22
23#include <QObject>
24#include <QAbstractEventDispatcher>
25
26typedef unsigned long Atom;
27
28class RootWindowInfo : public QObject
29{
30 Q_OBJECT
31
32 Q_PROPERTY(unsigned long nautilusDesktopWindowId READ nautilusDesktopWindowId
33 NOTIFY nautilusDesktopWindowIdChanged)
34public:
35 static RootWindowInfo* instance();
36
37 /* getters */
38 unsigned long nautilusDesktopWindowId() const;
39
40Q_SIGNALS:
41 void nautilusDesktopWindowIdChanged();
42
43private:
44 explicit RootWindowInfo(QObject *parent = 0);
45
46 static void internX11Atoms();
47 static bool globalEventFilter(void* message);
48 static bool getX11Property(Atom property, long long_length, Atom req_type, unsigned long &value);
49
50 void updateNautilusDesktopWindowId();
51
52 static QAbstractEventDispatcher::EventFilter s_oldEventFilter;
53 static Atom NAUTILUS_DESKTOP_WINDOW_ID;
54 unsigned long m_nautilusDesktopWindowId;
55};
56
57#endif // ROOTWINDOWINFO_H
058
=== modified file 'libunity-2d-private/src/unity2ddeclarativeview.cpp'
--- libunity-2d-private/src/unity2ddeclarativeview.cpp 2011-12-08 19:41:38 +0000
+++ libunity-2d-private/src/unity2ddeclarativeview.cpp 2012-01-26 22:03:24 +0000
@@ -158,6 +158,17 @@
158 Q_EMIT globalPositionChanged(globalPosition());158 Q_EMIT globalPositionChanged(globalPosition());
159}159}
160160
161void Unity2DDeclarativeView::showEvent(QShowEvent* event)
162{
163 QDeclarativeView::showEvent(event);
164 Q_EMIT visibleChanged(true);
165}
166
167void Unity2DDeclarativeView::hideEvent(QHideEvent* event)
168{
169 QDeclarativeView::hideEvent(event);
170 Q_EMIT visibleChanged(false);
171}
161172
162/* Obtaining & Discarding Keyboard Focus for Window on Demand173/* Obtaining & Discarding Keyboard Focus for Window on Demand
163 *174 *
164175
=== modified file 'libunity-2d-private/src/unity2ddeclarativeview.h'
--- libunity-2d-private/src/unity2ddeclarativeview.h 2011-12-08 19:41:38 +0000
+++ libunity-2d-private/src/unity2ddeclarativeview.h 2012-01-26 22:03:24 +0000
@@ -26,6 +26,7 @@
26 Q_PROPERTY(bool useOpenGL READ useOpenGL WRITE setUseOpenGL NOTIFY useOpenGLChanged)26 Q_PROPERTY(bool useOpenGL READ useOpenGL WRITE setUseOpenGL NOTIFY useOpenGLChanged)
27 Q_PROPERTY(bool transparentBackground READ transparentBackground WRITE setTransparentBackground NOTIFY transparentBackgroundChanged)27 Q_PROPERTY(bool transparentBackground READ transparentBackground WRITE setTransparentBackground NOTIFY transparentBackgroundChanged)
28 Q_PROPERTY(QPoint globalPosition READ globalPosition NOTIFY globalPositionChanged)28 Q_PROPERTY(QPoint globalPosition READ globalPosition NOTIFY globalPositionChanged)
29 Q_PROPERTY(bool visible READ isVisible NOTIFY visibleChanged)
2930
30public:31public:
31 Unity2DDeclarativeView(QWidget *parent = 0);32 Unity2DDeclarativeView(QWidget *parent = 0);
@@ -44,10 +45,13 @@
44 void useOpenGLChanged(bool);45 void useOpenGLChanged(bool);
45 void transparentBackgroundChanged(bool);46 void transparentBackgroundChanged(bool);
46 void globalPositionChanged(QPoint);47 void globalPositionChanged(QPoint);
48 void visibleChanged(bool);
4749
48protected:50protected:
49 void setupViewport();51 void setupViewport();
50 virtual void moveEvent(QMoveEvent* event);52 virtual void moveEvent(QMoveEvent* event);
53 virtual void showEvent(QShowEvent* event);
54 virtual void hideEvent(QHideEvent* event);
5155
52protected Q_SLOTS:56protected Q_SLOTS:
53 void forceActivateWindow();57 void forceActivateWindow();
5458
=== modified file 'places/app/dashdeclarativeview.cpp'
--- places/app/dashdeclarativeview.cpp 2012-01-26 13:12:12 +0000
+++ places/app/dashdeclarativeview.cpp 2012-01-26 22:03:24 +0000
@@ -134,7 +134,7 @@
134void134void
135DashDeclarativeView::showEvent(QShowEvent *event)135DashDeclarativeView::showEvent(QShowEvent *event)
136{136{
137 QDeclarativeView::showEvent(event);137 Unity2DDeclarativeView::showEvent(event);
138 /* Note that this has to be called everytime the window is shown, as the WM138 /* Note that this has to be called everytime the window is shown, as the WM
139 will remove the flags when the window is hidden */139 will remove the flags when the window is hidden */
140 setWMFlags();140 setWMFlags();
141141
=== modified file 'spread/Workspace.qml'
--- spread/Workspace.qml 2011-10-21 12:46:08 +0000
+++ spread/Workspace.qml 2012-01-26 22:03:24 +0000
@@ -16,7 +16,7 @@
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */17 */
1818
19import QtQuick 1.019import QtQuick 1.1
20import "utils.js" as Utils20import "utils.js" as Utils
21import Unity2d 1.021import Unity2d 1.0
2222
@@ -47,15 +47,26 @@
47 height: switcher.height47 height: switcher.height
48 state: parent.state48 state: parent.state
4949
50 GnomeBackground {50 clip: true
51 anchors.fill: parent51
52 overlay_color: "black"52 Image {
53 overlay_alpha: 053 x: -declarativeView.globalPosition.x
5454 y: -declarativeView.globalPosition.y
55 clip: true55 width: screen.geometry.width
56 cached: false56 height: screen.geometry.height
57 offsetX: -screen.panelsFreeGeometry.x57
58 offsetY: -screen.panelsFreeGeometry.y58 smooth: true
59 /* The window is scaled to a rectangle as large as possible inside
60 sourceSize while preserving its aspect ratio.
61 It saves video memory when using the OpenGL backend.
62 It makes scaling cheaper in the spread when using the raster backend.
63 */
64 sourceSize.width: 512
65 sourceSize.height: 512
66
67 source: declarativeView.visible ? "image://window/" + rootWindow.nautilusDesktopWindowId : ""
68 /* FIXME: Nautilus' window pixmap is reloaded as many times as there is workspaces */
69 cache: false
59 }70 }
6071
61 Windows {72 Windows {
6273
=== modified file 'spread/app/spreadview.cpp'
--- spread/app/spreadview.cpp 2011-12-08 18:39:18 +0000
+++ spread/app/spreadview.cpp 2012-01-26 22:03:24 +0000
@@ -97,15 +97,3 @@
9797
98 return false;98 return false;
99}99}
100
101void SpreadView::showEvent(QShowEvent *event)
102{
103 Q_UNUSED(event);
104 Q_EMIT visibleChanged(true);
105}
106
107void SpreadView::hideEvent(QHideEvent *event)
108{
109 Q_UNUSED(event);
110 Q_EMIT visibleChanged(false);
111}
112100
=== modified file 'spread/app/spreadview.h'
--- spread/app/spreadview.h 2011-12-08 18:39:18 +0000
+++ spread/app/spreadview.h 2012-01-26 22:03:24 +0000
@@ -39,13 +39,10 @@
39protected:39protected:
40 virtual void focusInEvent( QFocusEvent * event );40 virtual void focusInEvent( QFocusEvent * event );
41 virtual void focusOutEvent( QFocusEvent * event );41 virtual void focusOutEvent( QFocusEvent * event );
42 virtual void showEvent(QShowEvent *event);
43 virtual void hideEvent(QHideEvent *event);
44 bool eventFilter(QObject *obj, QEvent *event);42 bool eventFilter(QObject *obj, QEvent *event);
4543
46Q_SIGNALS:44Q_SIGNALS:
47 void outsideClick();45 void outsideClick();
48 void visibleChanged(bool visible);
49};46};
5047
51#endif // SPREADVIEW_H48#endif // SPREADVIEW_H

Subscribers

People subscribed via source and target branches