Send setActive signal when taking focus in Client::takeFocus

This relates to Bug 2189
Clean up minor formatting issues
pull/2/head
Timothy Pearson 10 years ago
parent 2f7d50c20c
commit 17b142dd64

@ -314,7 +314,7 @@ void Workspace::requestFocus( Client* c, bool force )
void Workspace::takeActivity( Client* c, int flags, bool handled )
{
// the 'if( c == active_client ) return;' optimization mustn't be done here
// the 'if( c == active_client ) return;' optimization must not be done here
if (!focusChangeEnabled() && ( c != active_client) )
flags &= ~ActivityFocus;

@ -2200,9 +2200,13 @@ void Client::takeFocus( allowed_t )
if ( rules()->checkAcceptFocus( input ))
{
XSetInputFocus( tqt_xdisplay(), window(), RevertToPointerRoot, GET_QT_X_TIME() );
// Signal that we took focus!
setActive( true, true );
}
if ( Ptakefocus )
{
sendClientMessage(window(), atoms->wm_protocols, atoms->wm_take_focus);
}
workspace()->setShouldGetFocus( this );
}

@ -1156,7 +1156,6 @@ void KeramikClient::updateMask()
TQRegion r;
register int w, y = 0;
int nrects;
if ( TQApplication::reverseLayout() ) {
@ -1168,8 +1167,6 @@ void KeramikClient::updateMask()
r += TQRegion( x + 9, y++, w - 15, 1 );
r += TQRegion( x + 7, y++, w - 12, 1 );
} else {
nrects = 8;
// Do we have a large titlebar with a retracted caption bubble?
// (i.e. the style is set to use large caption bubbles, we're
// not maximized and not active)
@ -1191,15 +1188,12 @@ void KeramikClient::updateMask()
// If the caption bubble is visible and extends above the titlebar
if ( largeCaption && captionRect.width() >= 25 ) {
nrects = 11;
register int x = captionRect.left();
w = captionRect.width();
r += TQRegion( x + 8, y++, w - 19, 1 );
r += TQRegion( x + 6, y++, w - 15, 1 );
r += TQRegion( x + 5, y++, w - 12, 1 );
} else {
nrects = 8;
// Do we have a large titlebar with a retracted caption bubble?
// (i.e. the style is set to use large caption bubbles, we're
// not maximized and not active)

@ -518,7 +518,7 @@ bool Client::sameAppWindowRoleMatch( const Client* c1, const Client* c2, bool ac
||
// hacks here
// Mozilla has resourceName() and resourceClass() swapped
c1->resourceName() == "mozilla" && c2->resourceName() == "mozilla" )
((c1->resourceName() == "mozilla") && (c2->resourceName() == "mozilla")) )
{
if( !active_hack ) // without the active hack for focus stealing prevention,
return c1 == c2; // different mainwindows are always different apps

@ -362,12 +362,17 @@ void Placement::placeCascaded (Client* c, TQRect& area, Policy nextPlacement)
if ((yp + ch) > H) yp = Y;
if ((xp + cw) > W)
{
if (!yp)
{
place(c,area,nextPlacement);
return;
}
else xp = X;
}
else
{
xp = X;
}
//if this isn't the first window
if (cci[dn].pos.x() != X && cci[dn].pos.y() != Y)

Loading…
Cancel
Save