fixed maximization handling

svn path=/trunk/kdebase/kwin/; revision=113436
icc-effect-5.14.5
Matthias Ettrich 2001-09-05 20:40:04 +00:00
parent 0f2643c994
commit 9388aeba3d
2 changed files with 8 additions and 7 deletions

View File

@ -518,7 +518,7 @@ Client::Client( Workspace *ws, WId w, QWidget *parent, const char *name, WFlags
is_sticky = FALSE;
stays_on_top = FALSE;
may_move = TRUE;
is_fullscreen = TRUE;
is_fullscreen = FALSE;
skip_taskbar = FALSE;
skip_pager = FALSE;
max_mode = MaximizeRestore;
@ -1136,6 +1136,8 @@ bool Client::configureRequest( XConfigureRequestEvent& e )
//QRect area = workspace()->clientArea();
if ( isMaximizable() && isMaximized() ) { //&& ( ns.width() < area.width() || ns.height() < area.height() ) ) {
if ( (e.value_mask & (CWX | CWY )) == 0 )
geom_restore.moveTopLeft( geometry().topLeft() );
geom_restore.setSize( ns );
maximize( Client::MaximizeRestore );
} else if ( !isMaximized() ) {

View File

@ -23,7 +23,6 @@ Copyright (C) 1999, 2000 Matthias Ettrich <ettrich@kde.org>
#include <kprocess.h>
#include <kiconloader.h>
#include <kstartupinfo.h>
#include <qdesktopwidget.h>
#include "workspace.h"
#include "client.h"
@ -92,8 +91,8 @@ private:
class WorkspacePrivate
{
public:
WorkspacePrivate()
: startup(0), electric_have_borders(false),
WorkspacePrivate()
: startup(0), electric_have_borders(false),
electric_current_border(None),
electric_top_border(None),
electric_bottom_border(None),
@ -1058,7 +1057,7 @@ bool Workspace::keyPress(XKeyEvent key)
if (!control_grab){
if( keyCombQt == walkThroughWindowsKeycode
|| keyCombQt == walkBackThroughWindowsKeycode ) {
if (!tab_grab)
if (!tab_grab)
return FALSE;
KDEWalkThroughWindows( keyCombQt == walkThroughWindowsKeycode );
}
@ -1074,7 +1073,7 @@ bool Workspace::keyPress(XKeyEvent key)
}
else if( keyCombQt == walkThroughDesktopListKeycode
|| keyCombQt == walkBackThroughDesktopListKeycode ) {
if (!control_grab)
if (!control_grab)
return FALSE;
walkThroughDesktops( keyCombQt == walkThroughDesktopListKeycode );
}
@ -4215,7 +4214,7 @@ void Workspace::electricBorder(XEvent *e)
QRect r = QApplication::desktop()->geometry();
int offset;
if (border == d->electric_top_border){
offset = r.height() / 3;
QCursor::setPos(e->xcrossing.x_root, r.height() - offset);