cooperate with qt-2.2.4 (the deadkey popup fix) and qt-copy.

Don't update the frame decoration if it didn't change, I don't want
flicker when changing the focus policy.

svn path=/trunk/kdebase/kwin/; revision=80891
This commit is contained in:
Matthias Ettrich 2001-02-01 01:13:44 +00:00
parent d3944b3934
commit 3deaa52496
4 changed files with 25 additions and 14 deletions

View file

@ -375,7 +375,7 @@ bool WindowWrapper::x11Event( XEvent * e)
&& ( options->focusPolicy != Options::ClickToFocus
&& options->clickRaise && !mod1 ) ) {
((Client*)parentWidget())->autoRaise();
ungrabButton( winId(), None );
ungrabButton( winId(), None );
}
Options::MouseCommand com = Options::MouseNothing;
@ -869,6 +869,8 @@ bool Client::windowEvent( XEvent * e)
break; // we neither
if ( e->xfocus.detail != NotifyNonlinear )
return TRUE; // hack for motif apps like netscape
if ( QApplication::activePopupWidget() )
break;
setActive( FALSE );
break;
case ReparentNotify:
@ -2301,7 +2303,6 @@ void Client::takeFocus( bool force )
setActive( TRUE );
// Qt may delay the mapping which may cause XSetInputFocus to fail, force show window
QApplication::sendPostedEvents( windowWrapper(), QEvent::ShowWindowRequest );
XSetInputFocus( qt_xdisplay(), win, RevertToPointerRoot, kwin_time );
}
if ( Ptakefocus )
@ -2385,7 +2386,8 @@ bool Client::performMouseCommand( Options::MouseCommand command, QPoint globalPo
case Options::MouseOperationsMenu:
if ( isActive() & ( options->focusPolicy != Options::ClickToFocus && options->clickRaise ) )
autoRaise();
workspace()->clientPopup( this )->popup( globalPos );
workspace()->clientPopup( this )->exec( globalPos );
workspace()->requestFocus( this );
break;
case Options::MouseToggleRaiseAndLower:
if ( workspace()->topClientOnDesktop() == this )

View file

@ -97,7 +97,7 @@ void PluginMenu::slotActivated(int id)
QString newPlugin;
if (id > 0)
newPlugin = fileList[id-1];
KConfig *config = KGlobal::config();
config->setGroup("Style");
config->writeEntry("PluginLib", newPlugin);
@ -121,14 +121,17 @@ PluginMgr::~PluginMgr()
lt_dlclose(handle);
}
void
bool
PluginMgr::updatePlugin()
{
KConfig *config = KGlobal::config();
config->setGroup("Style");
QString newPlugin = config->readEntry("PluginLib", "default");
if (newPlugin != pluginStr)
if (newPlugin != pluginStr) {
loadPlugin(newPlugin);
return true;
}
return false;
}
Client* PluginMgr::allocateClient(Workspace *ws, WId w, bool tool)

View file

@ -24,7 +24,7 @@ public:
~PluginMgr();
Client *allocateClient(Workspace *ws, WId w, bool tool);
void loadPlugin(QString name);
void updatePlugin();
bool updatePlugin();
QString currentPlugin() { return pluginStr; }
signals:
void resetAllClients();

View file

@ -223,7 +223,7 @@ Workspace::Workspace( bool restore )
if ( restore )
loadSessionInfo();
loadFakeSessionInfo();
(void) QApplication::desktop(); // trigger creation of desktop widget
@ -324,7 +324,7 @@ void Workspace::init()
XWindowAttributes attr;
connect(&resetTimer, SIGNAL(timeout()), this,
SLOT(slotResetAllClients()));
SLOT(slotResetAllClients()));
connect(&mgr, SIGNAL(resetAllClients()), this,
SLOT(slotResetAllClients()));
@ -1102,7 +1102,7 @@ bool Workspace::hasCaption( const QString& caption )
*/
void Workspace::requestFocus( Client* c, bool force )
{
if (!focusChangeEnabled())
if (!focusChangeEnabled() && ( c != active_client) )
return;
//TODO will be different for non-root clients. (subclassing?)
@ -1228,8 +1228,11 @@ void Workspace::showWindowMenuAt( unsigned long id, int x, int y )
if (!target)
return;
Client* c = active_client;
QPopupMenu* p = clientPopup( target );
p->popup( QPoint( x, y ) );
p->exec( QPoint( x, y ) );
if ( hasClient( c ) )
requestFocus( c );
}
void Workspace::performWindowOperation( Client* c, Options::WindowOperation op ) {
@ -1597,9 +1600,9 @@ void Workspace::unclutterDesktop()
*/
void Workspace::reconfigure()
{
slotResetAllClientsDelayed();
KGlobal::config()->reparseConfiguration();
mgr.updatePlugin();
if ( mgr.updatePlugin() )
slotResetAllClientsDelayed();
options->reload();
keys->readSettings();
grabControlTab(options->useControlTab);
@ -2456,7 +2459,10 @@ void Workspace::slotWindowOperations()
return;
QPopupMenu* p = clientPopup( active_client );
p->popup( active_client->mapToGlobal( active_client->windowWrapper()->geometry().topLeft() ) );
Client* c = active_client;
p->exec( active_client->mapToGlobal( active_client->windowWrapper()->geometry().topLeft() ) );
if ( hasClient( c ) )
requestFocus( c );
}