Merge lp:~mkhu/compiz/fix_startup_notification_busy_cursor into lp:compiz/0.9.10

Proposed by Micheal Hsu
Status: Merged
Approved by: Sam Spilsbury
Approved revision: 3693
Merged at revision: 3696
Proposed branch: lp:~mkhu/compiz/fix_startup_notification_busy_cursor
Merge into: lp:compiz/0.9.10
Diff against target: 70 lines (+9/-4)
3 files modified
CMakeLists.txt (+1/-1)
src/privatescreen.h (+1/-0)
src/screen.cpp (+7/-3)
To merge this branch: bzr merge lp:~mkhu/compiz/fix_startup_notification_busy_cursor
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Sam Spilsbury Approve
MC Return Abstain
Review via email: mp+163421@code.launchpad.net

Commit message

Use XIDefineCursor rather than XDefineCursor.

compiz should show a busy cursor during the application startup stage.
the corresponding code is in scr/screen.cpp:
cps::StartupSequenceImpl::updateStateFeedback ()
the patch changes all XDefineCursor to XIDefineCursor (see XInput2 extension)

(LP: #1179155)

Description of the change

compiz should show a busy cursor during the application startup stage.
the corresponding code is in scr/screen.cpp:
cps::StartupSequenceImple::updateStateFeedback ()
the patch changes all XDefineCursor to XIDefineCursor (see XInput2 extension)

To post a comment you must log in.
Revision history for this message
Micheal Hsu (mkhu) wrote :

A little note:
"xext" is duplicated in CMake variable COMPIZ_REQUIRES (see top level CMakeLists.txt)
so I changed the second one to "xi".
it's not apparent in the generated diff.

Revision history for this message
MC Return (mc-return) wrote :

+1, LGTM, but waiting for Sam's opinion on this one...

Abstain for now.

review: Abstain
Revision history for this message
Sam Spilsbury (smspillaz) wrote :

Hi, this looks fine - can you check if the build-deps in debian/control also need to be updated for the xi dep?

review: Needs Information
Revision history for this message
Micheal Hsu (mkhu) wrote :

"libxi-dev" is in the Build-Depends section.

Revision history for this message
Sam Spilsbury (smspillaz) wrote :

Thanks. I haven't been able to check this myself from my current location.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Autolanding.
No commit message was specified in the merge proposal. Hit 'Add commit message' on the merge proposal web page or follow the link below. You can approve the merge proposal yourself to rerun.
https://code.launchpad.net/~stevenhooke11/compiz/fix_startup_notification_busy_cursor/+merge/163421/+edit-commit-message

review: Needs Fixing (continuous-integration)
Revision history for this message
Sam Spilsbury (smspillaz) :
review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2013-02-27 11:48:55 +0000
3+++ CMakeLists.txt 2013-05-12 08:40:34 +0000
4@@ -104,7 +104,7 @@
5 x11-xcb
6 xrandr
7 xinerama
8- xext
9+ xi
10 ice
11 sm
12 libxml-2.0
13
14=== modified file 'src/privatescreen.h'
15--- src/privatescreen.h 2013-02-27 03:24:45 +0000
16+++ src/privatescreen.h 2013-05-12 08:40:34 +0000
17@@ -744,6 +744,7 @@
18
19 Window wmSnSelectionWindow;
20
21+ int clientPointerDeviceId;
22 Cursor normalCursor;
23 Cursor busyCursor;
24 Cursor invisibleCursor;
25
26=== modified file 'src/screen.cpp'
27--- src/screen.cpp 2013-02-03 17:58:29 +0000
28+++ src/screen.cpp 2013-05-12 08:40:34 +0000
29@@ -52,6 +52,7 @@
30 #include <X11/extensions/Xrandr.h>
31 #include <X11/extensions/shape.h>
32 #include <X11/cursorfont.h>
33+#include <X11/extensions/XInput2.h>
34
35 #include <core/global.h>
36 #include <core/screen.h>
37@@ -2082,9 +2083,9 @@
38 if (priv->initialized)
39 {
40 if (!emptySequence())
41- XDefineCursor (priv->dpy, priv->rootWindow(), priv->busyCursor);
42+ XIDefineCursor (priv->dpy, priv->clientPointerDeviceId, priv->rootWindow(), priv->busyCursor);
43 else
44- XDefineCursor (priv->dpy, priv->rootWindow(), priv->normalCursor);
45+ XIDefineCursor (priv->dpy, priv->clientPointerDeviceId, priv->rootWindow(), priv->normalCursor);
46 }
47 }
48
49@@ -5002,10 +5003,12 @@
50 eventManager.setSupportingWmCheck (dpy, rootWindow());
51 screen->updateSupportedWmHints ();
52
53+ XIGetClientPointer (dpy, None, &clientPointerDeviceId);
54+
55 normalCursor = XCreateFontCursor (dpy, XC_left_ptr);
56 busyCursor = XCreateFontCursor (dpy, XC_watch);
57
58- XDefineCursor (dpy, rootWindow(), normalCursor);
59+ XIDefineCursor (dpy, clientPointerDeviceId, rootWindow(), normalCursor);
60
61 /* Attempt to gain SubstructureRedirectMask */
62 CompScreenImpl::checkForError (dpy);
63@@ -5180,6 +5183,7 @@
64 nDesktop (1),
65 currentDesktop (0),
66 wmSnSelectionWindow (None),
67+ clientPointerDeviceId (None),
68 normalCursor (None),
69 busyCursor (None),
70 invisibleCursor (None),

Subscribers

People subscribed via source and target branches