fixed: title changes in default style, minimization of maximized windows
svn path=/trunk/kdebase/kwin/; revision=61601
This commit is contained in:
parent
48fcf83842
commit
fe4bfc015c
3 changed files with 15 additions and 12 deletions
13
client.cpp
13
client.cpp
|
@ -623,6 +623,7 @@ void Client::getWmNormalHints()
|
|||
long msize;
|
||||
if (XGetWMNormalHints(qt_xdisplay(), win, &xSizeHint, &msize) == 0 )
|
||||
xSizeHint.flags = 0;
|
||||
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -1220,7 +1221,7 @@ void Client::mouseMoveEvent( QMouseEvent * e)
|
|||
moveResizeMode = TRUE;
|
||||
if ( isMaximized() ) {
|
||||
// in case we were maximized, reset state
|
||||
geom_restore = QRect();
|
||||
geom_restore = QRect();
|
||||
maximizeChange(FALSE );
|
||||
}
|
||||
workspace()->setFocusChangeEnabled(false);
|
||||
|
@ -1492,8 +1493,8 @@ void Client::invalidateWindow()
|
|||
*/
|
||||
void Client::iconify()
|
||||
{
|
||||
if (!isMovable())
|
||||
return;
|
||||
if ( windowType() != NET::Normal && windowType() != NET::Toolbar ) // desktop and dock cannot be minimized
|
||||
return;
|
||||
|
||||
if ( isShade() )
|
||||
setShade( FALSE );
|
||||
|
@ -2119,7 +2120,7 @@ bool Client::performMouseCommand( Options::MouseCommand command, QPoint globalPo
|
|||
moveResizeMode = TRUE;
|
||||
if ( isMaximized() ) {
|
||||
// in case we were maximized, reset state
|
||||
geom_restore = QRect();
|
||||
geom_restore = QRect();
|
||||
maximizeChange(FALSE );
|
||||
}
|
||||
workspace()->setFocusChangeEnabled(false);
|
||||
|
@ -2137,7 +2138,7 @@ bool Client::performMouseCommand( Options::MouseCommand command, QPoint globalPo
|
|||
moveResizeMode = TRUE;
|
||||
if ( isMaximized() ) {
|
||||
// in case we were maximized, reset state
|
||||
geom_restore = QRect();
|
||||
geom_restore = QRect();
|
||||
maximizeChange(FALSE );
|
||||
}
|
||||
workspace()->setFocusChangeEnabled(false);
|
||||
|
@ -2348,7 +2349,7 @@ bool Client::wantsTabFocus() const
|
|||
*/
|
||||
bool Client::isMovable() const
|
||||
{
|
||||
return may_move &&
|
||||
return may_move &&
|
||||
( windowType() == NET::Normal || windowType() == NET::Toolbar ) &&
|
||||
( !isMaximized() || max_mode != MaximizeFull );
|
||||
}
|
||||
|
|
|
@ -41,9 +41,9 @@ static unsigned char question_bits[] = {
|
|||
|
||||
static unsigned char unsticky_bits[] = {
|
||||
0x3c, 0x42, 0x99, 0xbd, 0xbd, 0x99, 0x42, 0x3c};
|
||||
|
||||
|
||||
static unsigned char sticky_bits[] = {
|
||||
0x3c, 0x42, 0x81, 0x81, 0x81, 0x81, 0x42, 0x3c};
|
||||
0x3c, 0x42, 0x81, 0x81, 0x81, 0x81, 0x42, 0x3c};
|
||||
|
||||
static QPixmap *titlePix=0;
|
||||
static KPixmap *aUpperGradient=0;
|
||||
|
@ -404,6 +404,8 @@ void KDEClient::resizeEvent( QResizeEvent* e)
|
|||
|
||||
void KDEClient::captionChange( const QString& )
|
||||
{
|
||||
if ( isActive() )
|
||||
updateActiveBuffer( true );
|
||||
repaint( titlebar->geometry(), false );
|
||||
}
|
||||
|
||||
|
@ -587,11 +589,11 @@ void KDEClient::calcHiddenButtons()
|
|||
lastWidth = width();
|
||||
}
|
||||
|
||||
void KDEClient::updateActiveBuffer()
|
||||
void KDEClient::updateActiveBuffer( bool force )
|
||||
{
|
||||
static int lastWidth = 0;
|
||||
|
||||
if(lastWidth == titlebar->geometry().width())
|
||||
if( !force && lastWidth == titlebar->geometry().width())
|
||||
return;
|
||||
lastWidth = titlebar->geometry().width();
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ public:
|
|||
void reset();
|
||||
QSize sizeHint() const;
|
||||
int last_button;
|
||||
|
||||
|
||||
protected:
|
||||
void mousePressEvent( QMouseEvent* e )
|
||||
{
|
||||
|
@ -62,7 +62,7 @@ protected:
|
|||
void activeChange(bool);
|
||||
|
||||
void calcHiddenButtons();
|
||||
void updateActiveBuffer();
|
||||
void updateActiveBuffer( bool force = false );
|
||||
protected slots:
|
||||
void slotReset();
|
||||
void slotMaximize();
|
||||
|
|
Loading…
Reference in a new issue