From 9388aeba3df35bdddc01338ad9cdf361d7a8b7d6 Mon Sep 17 00:00:00 2001 From: Matthias Ettrich Date: Wed, 5 Sep 2001 20:40:04 +0000 Subject: [PATCH] fixed maximization handling svn path=/trunk/kdebase/kwin/; revision=113436 --- client.cpp | 4 +++- workspace.cpp | 11 +++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/client.cpp b/client.cpp index 8c5e278494..bf3d3b7ae7 100644 --- a/client.cpp +++ b/client.cpp @@ -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() ) { diff --git a/workspace.cpp b/workspace.cpp index 0436e499a5..e55b2be7ab 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -23,7 +23,6 @@ Copyright (C) 1999, 2000 Matthias Ettrich #include #include #include -#include #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);