WARNING: This server is unstable and will be retired in the next days. If you want to keep this forum available, please request immediately a migration on the Nabble Support forum. Forums that don't receive any migration request will be deleted forever.

 « Return to Thread: Review Request: avoid setOnAllActivities recursion

Re: Review Request: avoid setOnAllActivities recursion

by Martin Gräßlin :: Rate this Message:

| View in Thread

This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/105192/

Ship it!

Let's give it a few days for feedback than ship even without.

- Martin


On June 9th, 2012, 11:47 a.m., Thomas Lübking wrote:

Review request for kwin, Ivan Čukić and Martin Gräßlin.
By Thomas Lübking.

Updated June 9, 2012, 11:47 a.m.

Description

if for whatever reason (let's say, the window is on the only activity) ::setOnActivities() enters the setOnAllActivities(true) branch and activityList is NOT empty, ::setOnAllActivities() will fail the isOnAllActivities() test (which only checks for this condition) and enter ::setOnActivities() with an empty stringlist leading to the setOnAllActivities(true) branch which will still fail because the activityList is (never...) cleared outside the recursion (i didn't like the code on first sight but didn't see this either)

Since ::setOnAllActivities(true) does nothing but calling ::setOnActivities(QStringList()) there's really no point in calling it from ::setOnActivities() - the relevant part is clearing the list and updating the X11 property.

Testing

compiles, runs, i can still mark windows on all or random activities - kinda waiting for fix confirmation from Sandro, but the code seemed suspicious anyway
Bugs: 301397

Diffs

  • kwin/client.cpp (c2437d8)

View Diff


_______________________________________________
kwin mailing list
kwin@...
https://mail.kde.org/mailman/listinfo/kwin

 « Return to Thread: Review Request: avoid setOnAllActivities recursion