Merge lp:~sil2100/compiz/scale_all into lp:compiz/0.9.8

Proposed by Łukasz Zemczak
Status: Merged
Approved by: Daniel van Vugt
Approved revision: 3257
Merged at revision: 3271
Proposed branch: lp:~sil2100/compiz/scale_all
Merge into: lp:compiz/0.9.8
Diff against target: 64 lines (+43/-0)
2 files modified
plugins/scale/src/privates.h (+2/-0)
plugins/scale/src/scale.cpp (+41/-0)
To merge this branch: bzr merge lp:~sil2100/compiz/scale_all
Reviewer Review Type Date Requested Status
Daniel van Vugt Approve
Review via email: mp+111570@code.launchpad.net

Commit message

Add support for initiating window picker in other than nomal mode. For now added only the additional 'All windows' picker, essentially fixing LP: #933776.
The code from the all mode comes from a patch made by Doug McMahon. Thanks!

Description of the change

Original description from the 0.9.7 MRQ:

The scale plugin has many actions defined: initiate for current workspace, for all windows, for groups and for current output device. But the scale plugin only supports one handler for all actions (the type of the action is not considered at all). For now I added a distinction between ScaleTypeAll and ScaleTypeNormal. I took the code proposed by Doug in the bug report as the code for ScaleTypeAll.

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

Tests are needed to enter distro

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Looks like this fixes bug 955035 too.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

OK, it works well and solves bug 933776 (and bug 955035 it seems).

Only a minor style issue in layoutThumbs() that I'll fix.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'plugins/scale/src/privates.h'
--- plugins/scale/src/privates.h 2012-02-01 17:49:07 +0000
+++ plugins/scale/src/privates.h 2012-06-22 10:18:21 +0000
@@ -63,6 +63,8 @@
63 void findBestSlots ();63 void findBestSlots ();
64 bool fillInWindows ();64 bool fillInWindows ();
65 bool layoutThumbs ();65 bool layoutThumbs ();
66 bool layoutThumbsAll ();
67 bool layoutThumbsSingle ();
6668
67 SlotArea::vector getSlotAreas ();69 SlotArea::vector getSlotAreas ();
6870
6971
=== modified file 'plugins/scale/src/scale.cpp'
--- plugins/scale/src/scale.cpp 2012-04-01 07:34:59 +0000
+++ plugins/scale/src/scale.cpp 2012-06-22 10:18:21 +0000
@@ -684,6 +684,47 @@
684bool684bool
685PrivateScaleScreen::layoutThumbs ()685PrivateScaleScreen::layoutThumbs ()
686{686{
687 switch (type) {
688 case ScaleTypeAll:
689 return layoutThumbsAll ();
690 case ScaleTypeNormal:
691 default:
692 return layoutThumbsSingle ();
693 }
694}
695
696bool
697PrivateScaleScreen::layoutThumbsAll ()
698{
699 windows.clear ();
700
701 /* add windows scale list, top most window first */
702 foreach (CompWindow *w, screen->windows ())
703 {
704 SCALE_WINDOW (w);
705
706 if (sw->priv->slot)
707 sw->priv->adjust = true;
708
709 sw->priv->slot = NULL;
710
711 if (!sw->priv->isScaleWin ())
712 continue;
713
714 windows.push_back (sw);
715 }
716
717 if (windows.empty ())
718 return false;
719
720 slots.resize (windows.size ());
721
722 return ScaleScreen::get (screen)->layoutSlotsAndAssignWindows ();
723}
724
725bool
726PrivateScaleScreen::layoutThumbsSingle ()
727{
687 bool ret = false;728 bool ret = false;
688 std::map <ScaleWindow *, ScaleSlot> slotWindows;729 std::map <ScaleWindow *, ScaleSlot> slotWindows;
689 CompWindowList allWindows;730 CompWindowList allWindows;

Subscribers

People subscribed via source and target branches