KWindowInfo
svn path=/trunk/KDE/kdebase/workspace/; revision=651965
This commit is contained in:
parent
4fa16a5039
commit
81f00aa8b8
4 changed files with 8 additions and 8 deletions
|
@ -65,7 +65,7 @@ class DetectDialog
|
||||||
QString selectedTitle() const;
|
QString selectedTitle() const;
|
||||||
Rules::StringMatch titleMatch() const;
|
Rules::StringMatch titleMatch() const;
|
||||||
QByteArray selectedMachine() const;
|
QByteArray selectedMachine() const;
|
||||||
const KWM::WindowInfo& windowInfo() const;
|
const KWindowInfo& windowInfo() const;
|
||||||
signals:
|
signals:
|
||||||
void detectionDone( bool );
|
void detectionDone( bool );
|
||||||
protected:
|
protected:
|
||||||
|
@ -84,11 +84,11 @@ class DetectDialog
|
||||||
QByteArray machine;
|
QByteArray machine;
|
||||||
DetectWidget* widget;
|
DetectWidget* widget;
|
||||||
QDialog* grabber;
|
QDialog* grabber;
|
||||||
KWM::WindowInfo info;
|
KWindowInfo info;
|
||||||
};
|
};
|
||||||
|
|
||||||
inline
|
inline
|
||||||
const KWM::WindowInfo& DetectDialog::windowInfo() const
|
const KWindowInfo& DetectDialog::windowInfo() const
|
||||||
{
|
{
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,7 +69,7 @@ static void saveRules( const QList< Rules* >& rules )
|
||||||
|
|
||||||
static Rules* findRule( const QList< Rules* >& rules, Window wid, bool whole_app )
|
static Rules* findRule( const QList< Rules* >& rules, Window wid, bool whole_app )
|
||||||
{
|
{
|
||||||
KWM::WindowInfo info = KWM::windowInfo( wid,
|
KWindowInfo info = KWM::windowInfo( wid,
|
||||||
NET::WMName | NET::WMWindowType,
|
NET::WMName | NET::WMWindowType,
|
||||||
NET::WM2WindowClass | NET::WM2WindowRole | NET::WM2ClientMachine );
|
NET::WM2WindowClass | NET::WM2WindowRole | NET::WM2ClientMachine );
|
||||||
if( !info.valid()) // shouldn't really happen
|
if( !info.valid()) // shouldn't really happen
|
||||||
|
|
|
@ -588,7 +588,7 @@ void RulesWidget::detected( bool ok )
|
||||||
machine_match->setCurrentIndex( Rules::UnimportantMatch );
|
machine_match->setCurrentIndex( Rules::UnimportantMatch );
|
||||||
machineMatchChanged();
|
machineMatchChanged();
|
||||||
// prefill values from to window to settings which already set
|
// prefill values from to window to settings which already set
|
||||||
const KWM::WindowInfo& info = detect_dlg->windowInfo();
|
const KWindowInfo& info = detect_dlg->windowInfo();
|
||||||
prefillUnusedValues( info );
|
prefillUnusedValues( info );
|
||||||
}
|
}
|
||||||
delete detect_dlg;
|
delete detect_dlg;
|
||||||
|
@ -606,7 +606,7 @@ void RulesWidget::detected( bool ok )
|
||||||
#define LINEEDIT_PREFILL( var, func, info ) GENERIC_PREFILL( var, func, info, setText )
|
#define LINEEDIT_PREFILL( var, func, info ) GENERIC_PREFILL( var, func, info, setText )
|
||||||
#define COMBOBOX_PREFILL( var, func, info ) GENERIC_PREFILL( var, func, info, setCurrentIndex )
|
#define COMBOBOX_PREFILL( var, func, info ) GENERIC_PREFILL( var, func, info, setCurrentIndex )
|
||||||
|
|
||||||
void RulesWidget::prefillUnusedValues( const KWM::WindowInfo& info )
|
void RulesWidget::prefillUnusedValues( const KWindowInfo& info )
|
||||||
{
|
{
|
||||||
LINEEDIT_PREFILL( position, positionToStr, info.frameGeometry().topLeft() );
|
LINEEDIT_PREFILL( position, positionToStr, info.frameGeometry().topLeft() );
|
||||||
LINEEDIT_PREFILL( size, sizeToStr, info.frameGeometry().size() );
|
LINEEDIT_PREFILL( size, sizeToStr, info.frameGeometry().size() );
|
||||||
|
@ -673,7 +673,7 @@ bool RulesWidget::finalCheck()
|
||||||
void RulesWidget::prepareWindowSpecific( WId window )
|
void RulesWidget::prepareWindowSpecific( WId window )
|
||||||
{
|
{
|
||||||
tabs->setCurrentIndex( 2 ); // geometry tab, skip tabs for window identification
|
tabs->setCurrentIndex( 2 ); // geometry tab, skip tabs for window identification
|
||||||
KWM::WindowInfo info( window, -1U, -1U ); // read everything
|
KWindowInfo info( window, -1U, -1U ); // read everything
|
||||||
prefillUnusedValues( info );
|
prefillUnusedValues( info );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -89,7 +89,7 @@ class RulesWidget
|
||||||
private:
|
private:
|
||||||
int desktopToCombo( int d ) const;
|
int desktopToCombo( int d ) const;
|
||||||
int comboToDesktop( int val ) const;
|
int comboToDesktop( int val ) const;
|
||||||
void prefillUnusedValues( const KWM::WindowInfo& info );
|
void prefillUnusedValues( const KWindowInfo& info );
|
||||||
DetectDialog* detect_dlg;
|
DetectDialog* detect_dlg;
|
||||||
bool detect_dlg_ok;
|
bool detect_dlg_ok;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue