mirror of
https://github.com/edeproject/ede.git
synced 2023-08-10 21:13:03 +03:00
Cleaning some compiler warnings.
This commit is contained in:
parent
f1a37cefd2
commit
d6dd94778c
@ -171,7 +171,8 @@ public:
|
|||||||
|
|
||||||
Action(uint action, int param_i[3]) : _action(action)
|
Action(uint action, int param_i[3]) : _action(action)
|
||||||
{
|
{
|
||||||
std::memcpy(_param_i, param_i, sizeof(param_i));
|
// used references explicitly to shout memcpy warning
|
||||||
|
std::memcpy(&_param_i, ¶m_i, sizeof(param_i));
|
||||||
}
|
}
|
||||||
Action(uint action, const std::string ¶m_s)
|
Action(uint action, const std::string ¶m_s)
|
||||||
: _action(action), _param_s(param_s)
|
: _action(action), _param_s(param_s)
|
||||||
|
@ -260,7 +260,7 @@ AutoProperties::findProperty(const ClassHint* class_hint,
|
|||||||
list<uint>::iterator w_it;
|
list<uint>::iterator w_it;
|
||||||
|
|
||||||
// start searching for a suitable property
|
// start searching for a suitable property
|
||||||
for (bool ok = false; it != prop_list->end(); ++it, ok = false) {
|
for (; it != prop_list->end(); ++it) {
|
||||||
// see if the type matches, if we have one
|
// see if the type matches, if we have one
|
||||||
if ((type != 0) && ! (*it)->isApplyOn(type))
|
if ((type != 0) && ! (*it)->isApplyOn(type))
|
||||||
continue;
|
continue;
|
||||||
|
@ -244,7 +244,9 @@ RootWO::RootWO(Window root)
|
|||||||
AtomUtil::setLong(_window, Atoms::getAtom(NET_NUMBER_OF_DESKTOPS), Config::instance()->getWorkspaces());
|
AtomUtil::setLong(_window, Atoms::getAtom(NET_NUMBER_OF_DESKTOPS), Config::instance()->getWorkspaces());
|
||||||
AtomUtil::setLong(_window, Atoms::getAtom(NET_CURRENT_DESKTOP), 0);
|
AtomUtil::setLong(_window, Atoms::getAtom(NET_CURRENT_DESKTOP), 0);
|
||||||
|
|
||||||
long desktop_geometry[2] = { _gm.width, _gm.height };
|
long desktop_geometry[2];
|
||||||
|
desktop_geometry[0] = _gm.width;
|
||||||
|
desktop_geometry[1] = _gm.height;
|
||||||
AtomUtil::setLongs(_window, Atoms::getAtom(NET_DESKTOP_GEOMETRY), desktop_geometry, 2);
|
AtomUtil::setLongs(_window, Atoms::getAtom(NET_DESKTOP_GEOMETRY), desktop_geometry, 2);
|
||||||
|
|
||||||
woListAdd(this);
|
woListAdd(this);
|
||||||
@ -339,7 +341,11 @@ RootWO::handleLeaveEvent(XCrossingEvent *ev)
|
|||||||
void
|
void
|
||||||
RootWO::setEwmhWorkarea(const Geometry &workarea)
|
RootWO::setEwmhWorkarea(const Geometry &workarea)
|
||||||
{
|
{
|
||||||
long workarea_array[4] = { workarea.x, workarea.y, workarea.width, workarea.height };
|
long workarea_array[4];
|
||||||
|
workarea_array[0] = workarea.x;
|
||||||
|
workarea_array[1] = workarea.y;
|
||||||
|
workarea_array[2] = workarea.width;
|
||||||
|
workarea_array[3] = workarea.height;
|
||||||
AtomUtil::setLongs(_window, Atoms::getAtom(NET_WORKAREA), workarea_array, 4);
|
AtomUtil::setLongs(_window, Atoms::getAtom(NET_WORKAREA), workarea_array, 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -125,7 +125,10 @@ PDecor::Button::setState(ButtonState state)
|
|||||||
ScreenResources::instance()->getPixmapHandler()->returnPixmap(shape);
|
ScreenResources::instance()->getPixmapHandler()->returnPixmap(shape);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
XRectangle rect = {0 /* x */, 0 /* y */, _gm.width, _gm.height };
|
XRectangle rect;
|
||||||
|
rect.x = 0; rect.y = 0;
|
||||||
|
rect.width = _gm.width;
|
||||||
|
rect.height = _gm.height;
|
||||||
XShapeCombineRectangles(_dpy, _window, ShapeBounding,
|
XShapeCombineRectangles(_dpy, _window, ShapeBounding,
|
||||||
0, 0, &rect, 1, ShapeSet, YXBanded);
|
0, 0, &rect, 1, ShapeSet, YXBanded);
|
||||||
}
|
}
|
||||||
|
@ -488,7 +488,7 @@ PImage::createXImage(uchar *data, uint width, uint height)
|
|||||||
g = *src++;
|
g = *src++;
|
||||||
b = *src++;
|
b = *src++;
|
||||||
if (_has_alpha) {
|
if (_has_alpha) {
|
||||||
*src++;
|
src++;
|
||||||
}
|
}
|
||||||
|
|
||||||
XPutPixel(ximage, x, y, getPixelFromRgb(ximage, r, g, b));
|
XPutPixel(ximage, x, y, getPixelFromRgb(ximage, r, g, b));
|
||||||
|
@ -96,7 +96,7 @@ PImageLoaderXpm::load(const std::string &file, uint &width, uint &height,
|
|||||||
use_alpha = true;
|
use_alpha = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
*src++;
|
src++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user