Move plugin: Code needs cleanup
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Compiz |
Fix Released
|
Medium
|
MC Return |
Bug Description
Examples:
There are a ton of
if (a)
if (b)
if (c)
{
do ()
}
combinations, or things like:
if (s->otherGrabExist ("move", NULL))
return false;
if (ms->w)
return false;
if (w->type () & (CompWindowType
return false;
if (w->overrideRed
return false;
which can be better written as:
if (s->otherGrabExist ("move", NULL) ||
ms->w ||
w-
w->type () & (CompWindowType
CompWindow
CompWindow
return false;
also this block above comes after these lines:
unsigned int mods = CompOption:
int x = CompOption:
int y = CompOption:
int button = CompOption:
but all those calculations of local variables do not need to happen if we return false, so
those should be calculated after the return false check...
Changed in compiz: | |
assignee: | nobody → MC Return (mc-return) |
status: | New → In Progress |
Changed in compiz: | |
status: | In Progress → Fix Committed |
Changed in compiz: | |
importance: | Undecided → Medium |
milestone: | none → 0.9.10.0 |
Fix Released in Compiz Compiz 0.9.10.0.