Merge lp:~brandontschaefer/compiz/fix-viewport-focus into lp:compiz/0.9.12

Proposed by Brandon Schaefer
Status: Rejected
Rejected by: Christopher Townsend
Proposed branch: lp:~brandontschaefer/compiz/fix-viewport-focus
Merge into: lp:compiz/0.9.12
Diff against target: 16 lines (+5/-0)
1 file modified
src/screen.cpp (+5/-0)
To merge this branch: bzr merge lp:~brandontschaefer/compiz/fix-viewport-focus
Reviewer Review Type Date Requested Status
Christopher Townsend Disapprove
PS Jenkins bot (community) continuous-integration Needs Fixing
Stephen M. Webb Needs Fixing
Review via email: mp+243333@code.launchpad.net

Commit message

Is when you move through a workspace, it ends up saving the ActiveWindow() under that workspace. This is incorrect, since that window doesn't belong to that workspace.

The fix, is simple to double check a window belong to the workspace we are attempting to restore focus to.

Description of the change

The issue with this change:
https://code.launchpad.net/~dgadomski/compiz/remember-focus/+merge/236735

Is when you move through a workspace, it ends up saving the ActiveWindow() under that workspace. This is incorrect, since that window doesn't belong to that workspace.

The fix, is simple to double check a window belong to the workspace we are attempting to restore focus to.

A different solution would be to figure out how to save the window correctly but I couldn't find a simple place to put that.

To post a comment you must log in.
3908. By Brandon Schaefer

* Spacing fix...

Revision history for this message
Stephen M. Webb (bregma) wrote :

Haven't checked the tab stuff, but other style issues need fixing.

review: Needs Fixing
3909. By Brandon Schaefer

 * Fix some more styling errors.

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

FAILED: Continuous integration, rev:3909
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https://code.launchpad.net/~brandontschaefer/compiz/fix-viewport-focus/+merge/243333/+edit-commit-message

http://jenkins.qa.ubuntu.com/job/compiz-ci/18/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/compiz-vivid-amd64-ci/8
    SUCCESS: http://jenkins.qa.ubuntu.com/job/compiz-vivid-armhf-ci/8
    SUCCESS: http://jenkins.qa.ubuntu.com/job/compiz-vivid-i386-ci/8

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/compiz-ci/18/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Christopher Townsend (townsend) wrote :

Styling looks fine and the fix now focuses the window in the viewport, so I think we are good. Just add a commit message and I'll top approve:)

review: Approve
Revision history for this message
Christopher Townsend (townsend) wrote :

Since we are reverting rev. 3891 due to multiple regressions found, I'm going to disapprove of this MP and wait for a good fix of the reverted code.

review: Disapprove

Unmerged revisions

3909. By Brandon Schaefer

 * Fix some more styling errors.

3908. By Brandon Schaefer

* Spacing fix...

3907. By Brandon Schaefer

* Make sure the window we are trying to restore is actually on that workspace!
  otherwise you'll get strange focus issues.

* This is caused because moving through a workspace will cause it to save the
  currenlty focused in that workspace.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/screen.cpp'
2--- src/screen.cpp 2014-10-03 10:14:50 +0000
3+++ src/screen.cpp 2014-12-01 21:27:29 +0000
4@@ -5186,7 +5186,12 @@
5 if (it != savedViewportFocus.end ())
6 {
7 Window id = it->second;
8+ CompWindow *const w = findWindow (id);
9 savedViewportFocus.erase (it);
10+
11+ if (w->defaultViewport () != privateScreen.viewPort.vp)
12+ return NULL;
13+
14 return findWindow (id);
15 }
16 }

Subscribers

People subscribed via source and target branches