cosmetic api change
This commit is contained in:
parent
1056474e1d
commit
1d8dfcdf9a
3 changed files with 23 additions and 8 deletions
|
@ -1389,7 +1389,7 @@ void Ewmh::updateActions(FluxboxWindow &win) {
|
|||
actions.push_back(m_net->wm_action_minimize);
|
||||
|
||||
unsigned int max_width, max_height;
|
||||
win.maxSize(max_width, max_height);
|
||||
win.getMaxSize(&max_width, &max_height);
|
||||
|
||||
// if unlimited max width we can maximize horizontal
|
||||
if (max_width == 0) {
|
||||
|
|
|
@ -1261,18 +1261,33 @@ void FluxboxWindow::moveResizeForClient(int new_x, int new_y,
|
|||
|
||||
}
|
||||
|
||||
void FluxboxWindow::maxSize(unsigned int &width, unsigned int &height) const {
|
||||
void FluxboxWindow::getMaxSize(unsigned int* width, unsigned int* height) const {
|
||||
|
||||
if (!width || !height)
|
||||
return;
|
||||
|
||||
ClientList::const_iterator it = clientList().begin();
|
||||
ClientList::const_iterator it_end = clientList().end();
|
||||
width = height = 0; // unlimited
|
||||
|
||||
unsigned int w;
|
||||
unsigned int h;
|
||||
|
||||
w = h = 0; // unlimited
|
||||
|
||||
for (; it != it_end; ++it) {
|
||||
// special case for max height/width == 0
|
||||
// 0 indicates unlimited size, so we skip them
|
||||
if (!height || (*it)->maxHeight() && height > (*it)->maxHeight())
|
||||
height = (*it)->maxHeight();
|
||||
if (!width || (*it)->maxWidth() && width > (*it)->maxWidth())
|
||||
width = (*it)->maxWidth();
|
||||
if (h || (*it)->maxHeight() && h > (*it)->maxHeight())
|
||||
h = (*it)->maxHeight();
|
||||
if (!w || (*it)->maxWidth() && w > (*it)->maxWidth())
|
||||
w = (*it)->maxWidth();
|
||||
}
|
||||
|
||||
if (width)
|
||||
*width = w;
|
||||
|
||||
if (height)
|
||||
*height = h;
|
||||
}
|
||||
|
||||
// returns whether the focus was "set" to this window
|
||||
|
|
|
@ -305,7 +305,7 @@ public:
|
|||
* @param width will be filled in with maximum width
|
||||
* @param height will be filled in with maximum height
|
||||
*/
|
||||
void maxSize(unsigned int &width, unsigned int &height) const;
|
||||
void getMaxSize(unsigned int* width, unsigned int* height) const;
|
||||
void setWorkspace(int n);
|
||||
void updateFunctions();
|
||||
void restoreAttributes();
|
||||
|
|
Loading…
Reference in a new issue