Merge lp:~mc-return/compiz/compiz.merge-fix1009999-shiftswitcher-ignores-setting-show-window-title into lp:compiz/0.9.9

Proposed by MC Return
Status: Merged
Approved by: Sam Spilsbury
Approved revision: 3441
Merged at revision: 3445
Proposed branch: lp:~mc-return/compiz/compiz.merge-fix1009999-shiftswitcher-ignores-setting-show-window-title
Merge into: lp:compiz/0.9.9
Diff against target: 39 lines (+12/-6)
1 file modified
plugins/shift/src/shift.cpp (+12/-6)
To merge this branch: bzr merge lp:~mc-return/compiz/compiz.merge-fix1009999-shiftswitcher-ignores-setting-show-window-title
Reviewer Review Type Date Requested Status
Sam Spilsbury Approve
PS Jenkins bot (community) continuous-integration Needs Fixing
Daniel van Vugt Approve
Review via email: mp+131148@code.launchpad.net

Commit message

"Show Window Title" was always rendered, CCSM settings to disable the window title were ignored. Fixed this by adding checks to ShiftScreen::drawWindowTitle.

Minor optimization in ShiftScreen::renderWindowTitle: Do not create variables and call freeWindowTitle (), if the text plug-in is not available or window title rendering is disabled.

(LP: #1009999)

To post a comment you must log in.
Revision history for this message
Sam Spilsbury (smspillaz) :
review: Approve
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Works for me. Though I would have made it a single if statement each time.

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

I've cherry picked the revision that fixes the test failures from https://code.launchpad.net/~vanvugt/ubuntu/quantal/compiz/fix-1071238 , re-approving

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/shift/src/shift.cpp'
2--- plugins/shift/src/shift.cpp 2012-09-07 23:29:42 +0000
3+++ plugins/shift/src/shift.cpp 2012-10-24 09:44:22 +0000
4@@ -139,17 +139,17 @@
5 void
6 ShiftScreen::renderWindowTitle ()
7 {
8+ if (!textAvailable)
9+ return;
10+
11+ if (!optionGetWindowTitle ())
12+ return;
13+
14 CompText::Attrib tA;
15 CompRect oe;
16
17 freeWindowTitle ();
18
19- if (!textAvailable)
20- return;
21-
22- if (!optionGetWindowTitle ())
23- return;
24-
25 if (optionGetMultioutputMode () ==
26 ShiftOptions::MultioutputModeOneBigSwitcher)
27 {
28@@ -187,6 +187,12 @@
29 void
30 ShiftScreen::drawWindowTitle (const GLMatrix &transform)
31 {
32+ if (!textAvailable)
33+ return;
34+
35+ if (!optionGetWindowTitle ())
36+ return;
37+
38 float width, height, border = 10.0f;
39 CompRect oe;
40

Subscribers

People subscribed via source and target branches