Code was generating an internal compiler error with egcs-2.91.66 on
my SuSE 6.3. Rearranging the statements fixed it. svn path=/trunk/kdebase/kwin/; revision=37132
This commit is contained in:
parent
f9c7091e05
commit
7a0af99fb9
1 changed files with 17 additions and 3 deletions
|
@ -1174,7 +1174,6 @@ void Workspace::smartPlacement(Client* c){
|
||||||
void Workspace::cascadePlacement (Client* c, bool re_init) {
|
void Workspace::cascadePlacement (Client* c, bool re_init) {
|
||||||
/* cascadePlacement by Cristian Tibirna (tibirna@kde.org) (30Jan98)
|
/* cascadePlacement by Cristian Tibirna (tibirna@kde.org) (30Jan98)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// work coords
|
// work coords
|
||||||
int xp, yp;
|
int xp, yp;
|
||||||
|
|
||||||
|
@ -1218,8 +1217,23 @@ void Workspace::cascadePlacement (Client* c, bool re_init) {
|
||||||
|
|
||||||
//if this isn't the first window
|
//if this isn't the first window
|
||||||
if ( cci[d].pos.x() != X && cci[d].pos.y() != Y ) {
|
if ( cci[d].pos.x() != X && cci[d].pos.y() != Y ) {
|
||||||
if ( xp != X && yp == Y ) xp = delta_x * (++(cci[d].col));
|
/* The following statements cause an internal compiler error with
|
||||||
if ( yp != Y && xp == X ) yp = delta_y * (++(cci[d].row));
|
* egcs-2.91.66 on SuSE Linux 6.3. The equivalent forms compile fine.
|
||||||
|
* 22-Dec-1999 CS
|
||||||
|
*
|
||||||
|
* if ( xp != X && yp == Y ) xp = delta_x * (++(cci[d].col));
|
||||||
|
* if ( yp != Y && xp == X ) yp = delta_y * (++(cci[d].row));
|
||||||
|
*/
|
||||||
|
if ( xp != X && yp == Y )
|
||||||
|
{
|
||||||
|
++(cci[d].col);
|
||||||
|
xp = delta_x * cci[d].col;
|
||||||
|
}
|
||||||
|
if ( yp != Y && xp == X )
|
||||||
|
{
|
||||||
|
++(cci[d].row);
|
||||||
|
yp = delta_y * cci[d].row;
|
||||||
|
}
|
||||||
|
|
||||||
// last resort: if still doesn't fit, smart place it
|
// last resort: if still doesn't fit, smart place it
|
||||||
if ( ((xp + cw) > W - X) || ((yp + ch) > H - Y) ) {
|
if ( ((xp + cw) > W - X) || ((yp + ch) > H - Y) ) {
|
||||||
|
|
Loading…
Reference in a new issue