fixed a minor focus problem
svn path=/trunk/kdebase/kwin/; revision=36074
This commit is contained in:
parent
126bc26fda
commit
9764a4f487
2 changed files with 12 additions and 13 deletions
|
@ -258,7 +258,7 @@ StdClient::StdClient( Workspace *ws, WId w, QWidget *parent, const char *name )
|
|||
button[6]->setIconSet( *question_mark_pix );
|
||||
connect( button[6], SIGNAL( clicked() ), this, ( SLOT( contextHelp() ) ) );
|
||||
}
|
||||
|
||||
|
||||
hb->addWidget( button[3] );
|
||||
hb->addWidget( button[4] );
|
||||
hb->addWidget( button[5] );
|
||||
|
@ -294,8 +294,8 @@ StdClient::StdClient( Workspace *ws, WId w, QWidget *parent, const char *name )
|
|||
|
||||
if ( button[6] ) {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if ( isTransient() ) {
|
||||
// lighter decoration for transient windows
|
||||
button[1]->hide();
|
||||
|
@ -384,7 +384,7 @@ void StdClient::paintEvent( QPaintEvent* )
|
|||
t.setRight( t.right() - 2 );
|
||||
p.setPen(options->color(Options::Font, isActive()));
|
||||
p.setFont(options->font(isActive()));
|
||||
p.drawText( t, AlignLeft|AlignVCenter, caption() );
|
||||
p.drawText( t, AlignLeft|AlignVCenter|SingleLine, caption() );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -245,7 +245,7 @@ bool Workspace::workspaceEvent( XEvent * e )
|
|||
mouse_emulation = FALSE;
|
||||
XUngrabKeyboard( qt_xdisplay(), kwin_time );
|
||||
}
|
||||
|
||||
|
||||
Client * c = findClient( e->xany.window );
|
||||
if ( c )
|
||||
return c->windowEvent( e );
|
||||
|
@ -853,12 +853,11 @@ void Workspace::requestFocus( Client* c)
|
|||
|
||||
if ( !popup || !popup->isVisible() )
|
||||
popup_client = c;
|
||||
|
||||
active_client = c;
|
||||
|
||||
if ( c->isVisible() && !c->isShade() ) {
|
||||
c->takeFocus();
|
||||
should_get_focus = c;
|
||||
setActiveClient( c );
|
||||
} else if ( c->isShade() ) {
|
||||
// client cannot accept focus, but at least the window should be active (window menu, et. al. )
|
||||
focusToNull();
|
||||
|
@ -1731,7 +1730,7 @@ void Workspace::desktopPopupAboutToShow()
|
|||
|
||||
/*!
|
||||
The client popup menu will become visible soon.
|
||||
|
||||
|
||||
Adjust the items according to the respective popup client.
|
||||
*/
|
||||
void Workspace::clientPopupAboutToShow()
|
||||
|
@ -1916,7 +1915,7 @@ QPoint Workspace::adjustClientPosition( Client* c, QPoint pos )
|
|||
}
|
||||
|
||||
|
||||
/*!
|
||||
/*!
|
||||
Handles keypress event during mouse emulation
|
||||
*/
|
||||
bool Workspace::keyPressMouseEmulation( XKeyEvent key )
|
||||
|
@ -1925,12 +1924,12 @@ bool Workspace::keyPressMouseEmulation( XKeyEvent key )
|
|||
return FALSE;
|
||||
int kc = XKeycodeToKeysym(qt_xdisplay(), key.keycode, 0);
|
||||
int km = key.state & (ControlMask | Mod1Mask | ShiftMask);
|
||||
|
||||
|
||||
bool is_control = km & ControlMask;
|
||||
bool is_alt = km & Mod1Mask;
|
||||
int delta = is_control?1:is_alt?32:8;
|
||||
QPoint pos = QCursor::pos();
|
||||
|
||||
|
||||
switch ( kc ) {
|
||||
case XK_Left:
|
||||
case XK_KP_Left:
|
||||
|
@ -1959,7 +1958,7 @@ bool Workspace::keyPressMouseEmulation( XKeyEvent key )
|
|||
uint state;
|
||||
Window w;
|
||||
Client * c = 0;
|
||||
do {
|
||||
do {
|
||||
w = child;
|
||||
if (!c)
|
||||
c = findClientWidthId( w );
|
||||
|
@ -1998,7 +1997,7 @@ bool Workspace::keyPressMouseEmulation( XKeyEvent key )
|
|||
default:
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
QCursor::setPos( pos );
|
||||
return TRUE;
|
||||
|
||||
|
|
Loading…
Reference in a new issue