client and stacking list work
This commit is contained in:
parent
f5f0a2c2ed
commit
126d9fc846
1 changed files with 30 additions and 15 deletions
|
@ -267,12 +267,13 @@ void OBScreen::calcArea()
|
||||||
void OBScreen::setClientList()
|
void OBScreen::setClientList()
|
||||||
{
|
{
|
||||||
Window *windows;
|
Window *windows;
|
||||||
|
unsigned int size = clients.size();
|
||||||
|
|
||||||
// create an array of the window ids
|
// create an array of the window ids
|
||||||
if (clients.size() > 0) {
|
if (size > 0) {
|
||||||
Window *win_it;
|
Window *win_it;
|
||||||
|
|
||||||
windows = new Window[clients.size()];
|
windows = new Window[size];
|
||||||
win_it = windows;
|
win_it = windows;
|
||||||
ClientList::const_iterator it = clients.begin();
|
ClientList::const_iterator it = clients.begin();
|
||||||
const ClientList::const_iterator end = clients.end();
|
const ClientList::const_iterator end = clients.end();
|
||||||
|
@ -284,9 +285,9 @@ void OBScreen::setClientList()
|
||||||
Openbox::instance->property()->set(_info->rootWindow(),
|
Openbox::instance->property()->set(_info->rootWindow(),
|
||||||
otk::OBProperty::net_client_list,
|
otk::OBProperty::net_client_list,
|
||||||
otk::OBProperty::Atom_Window,
|
otk::OBProperty::Atom_Window,
|
||||||
windows, clients.size());
|
windows, size);
|
||||||
|
|
||||||
if (clients.size())
|
if (size)
|
||||||
delete [] windows;
|
delete [] windows;
|
||||||
|
|
||||||
setStackingList();
|
setStackingList();
|
||||||
|
@ -295,19 +296,32 @@ void OBScreen::setClientList()
|
||||||
|
|
||||||
void OBScreen::setStackingList()
|
void OBScreen::setStackingList()
|
||||||
{
|
{
|
||||||
// The below comment is wrong now hopefully :> but ill keep it here for
|
Window *windows;
|
||||||
// reference anyways
|
unsigned int size = _stacking.size();
|
||||||
/*
|
|
||||||
Get the stacking order from all of the workspaces.
|
assert(size == clients.size()); // just making sure.. :)
|
||||||
We start with the current workspace so that the sticky windows will be
|
|
||||||
in the right order on the current workspace.
|
|
||||||
*/
|
// create an array of the window ids
|
||||||
/*
|
if (size > 0) {
|
||||||
Openbox::instance->property()->set(_info->getRootWindow(),
|
Window *win_it;
|
||||||
|
|
||||||
|
windows = new Window[size];
|
||||||
|
win_it = windows;
|
||||||
|
ClientList::const_iterator it = _stacking.begin();
|
||||||
|
const ClientList::const_iterator end = _stacking.end();
|
||||||
|
for (; it != end; ++it, ++win_it)
|
||||||
|
*win_it = (*it)->window();
|
||||||
|
} else
|
||||||
|
windows = (Window*) 0;
|
||||||
|
|
||||||
|
Openbox::instance->property()->set(_info->rootWindow(),
|
||||||
otk::OBProperty::net_client_list_stacking,
|
otk::OBProperty::net_client_list_stacking,
|
||||||
otk::OBProperty::Atom_Window,
|
otk::OBProperty::Atom_Window,
|
||||||
_stacking, _stacking.size());
|
windows, size);
|
||||||
*/
|
|
||||||
|
if (size)
|
||||||
|
delete [] windows;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -498,6 +512,7 @@ void OBScreen::restack(bool raise, OBClient *client)
|
||||||
wins.push_back((*it)->frame->window());
|
wins.push_back((*it)->frame->window());
|
||||||
|
|
||||||
XRestackWindows(otk::OBDisplay::display, &wins[0], wins.size());
|
XRestackWindows(otk::OBDisplay::display, &wins[0], wins.size());
|
||||||
|
setStackingList();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue