Merge lp:~unity-team/unity/unity.fix_743390 into lp:unity

Proposed by Sam Spilsbury
Status: Merged
Merged at revision: 1184
Proposed branch: lp:~unity-team/unity/unity.fix_743390
Merge into: lp:unity
Diff against target: 54 lines (+10/-7)
2 files modified
utouch/unity-mt-grab-handles/src/unity-mt-grab-handles.cpp (+3/-0)
utouch/unity-mt-grab-handles/src/unity-mt-grab-handles.h (+7/-7)
To merge this branch: bzr merge lp:~unity-team/unity/unity.fix_743390
Reviewer Review Type Date Requested Status
Didier Roche-Tolomelli Approve
Review via email: mp+58023@code.launchpad.net

Description of the change

Remove timeout when window is destroyed

To post a comment you must log in.
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

Approved!
If you ensure _timer_handle is set to 0 in the constructor and reset to 0 in the callback as well :)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'utouch/unity-mt-grab-handles/src/unity-mt-grab-handles.cpp'
2--- utouch/unity-mt-grab-handles/src/unity-mt-grab-handles.cpp 2011-04-13 06:19:52 +0000
3+++ utouch/unity-mt-grab-handles/src/unity-mt-grab-handles.cpp 2011-04-17 07:31:22 +0000
4@@ -907,6 +907,9 @@
5
6 UnityMTGrabHandlesWindow::~UnityMTGrabHandlesWindow ()
7 {
8+ if (_timer_handle)
9+ g_source_remove (_timer_handle);
10+
11 if (mHandles)
12 {
13 UnityMTGrabHandlesScreen::get (screen)->removeHandles (mHandles);
14
15=== modified file 'utouch/unity-mt-grab-handles/src/unity-mt-grab-handles.h'
16--- utouch/unity-mt-grab-handles/src/unity-mt-grab-handles.h 2011-04-05 09:28:19 +0000
17+++ utouch/unity-mt-grab-handles/src/unity-mt-grab-handles.h 2011-04-17 07:31:22 +0000
18@@ -119,12 +119,11 @@
19 CompAction::State state,
20 CompOption::Vector &options);
21
22-
23- bool showHandles (CompAction *action,
24+ bool showHandles (CompAction *action,
25 CompAction::State state,
26 CompOption::Vector &options);
27
28- bool hideHandles (CompAction *action,
29+ bool hideHandles (CompAction *action,
30 CompAction::State state,
31 CompOption::Vector &options);
32
33@@ -191,16 +190,17 @@
34 const CompRegion &,
35 unsigned int);
36
37- bool handlesVisible ();
38+ bool handlesVisible ();
39 void hideHandles ();
40 void showHandles (bool use_timer);
41 void restackHandles ();
42
43- void resetTimer ();
44- void disableTimer ();
45+ void resetTimer ();
46+ void disableTimer ();
47+
48 private:
49
50- static gboolean onHideTimeout (gpointer data);
51+ static gboolean onHideTimeout (gpointer data);
52
53 Unity::MT::GrabHandleGroup *mHandles;
54 UnityMTGrabHandlesScreen *_mt_screen;