allow changing maximization state while window is fullscreen
This commit is contained in:
parent
ecead0f5ed
commit
42ace97775
1 changed files with 9 additions and 13 deletions
|
@ -537,18 +537,17 @@ void FluxboxWindow::init() {
|
||||||
m_focused = false;
|
m_focused = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// maximization won't work if we think the window is fullscreen
|
if (fullscreen) {
|
||||||
bool tmp_fullscreen = fullscreen;
|
fullscreen = false;
|
||||||
fullscreen = false;
|
setFullscreen(true);
|
||||||
|
}
|
||||||
|
|
||||||
if (maximized) {
|
if (maximized) {
|
||||||
int tmp = maximized;
|
int tmp = maximized;
|
||||||
maximized = MAX_NONE;
|
maximized = MAX_NONE;
|
||||||
setMaximizedState(tmp);
|
setMaximizedState(tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tmp_fullscreen)
|
|
||||||
setFullscreen(true);
|
|
||||||
|
|
||||||
|
|
||||||
struct timeval now;
|
struct timeval now;
|
||||||
gettimeofday(&now, NULL);
|
gettimeofday(&now, NULL);
|
||||||
|
@ -1596,8 +1595,8 @@ void FluxboxWindow::setFullscreen(bool flag) {
|
||||||
*/
|
*/
|
||||||
void FluxboxWindow::maximize(int type) {
|
void FluxboxWindow::maximize(int type) {
|
||||||
|
|
||||||
// doesn't make sense to maximize
|
// nothing to do
|
||||||
if (isFullscreen() || type == MAX_NONE)
|
if (type == MAX_NONE)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
int new_max = maximized;
|
int new_max = maximized;
|
||||||
|
@ -1618,15 +1617,12 @@ void FluxboxWindow::maximize(int type) {
|
||||||
|
|
||||||
void FluxboxWindow::setMaximizedState(int type) {
|
void FluxboxWindow::setMaximizedState(int type) {
|
||||||
|
|
||||||
if (!m_initialized) {
|
if (!m_initialized || isFullscreen() || type == maximized) {
|
||||||
// this will interfere with the window getting placed, so we delay it
|
// this will interfere with window placement, so we delay it
|
||||||
maximized = type;
|
maximized = type;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isFullscreen() || type == maximized)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (isShaded())
|
if (isShaded())
|
||||||
shade();
|
shade();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue