Lines 76-81
Link Here
|
76 |
#define KWIN_SHADEHOVER_INTERVAL "ShadeHoverInterval" |
76 |
#define KWIN_SHADEHOVER_INTERVAL "ShadeHoverInterval" |
77 |
#define KWIN_FOCUS_STEALING "FocusStealingPreventionLevel" |
77 |
#define KWIN_FOCUS_STEALING "FocusStealingPreventionLevel" |
78 |
#define KWIN_HIDE_UTILITY "HideUtilityWindowsForInactive" |
78 |
#define KWIN_HIDE_UTILITY "HideUtilityWindowsForInactive" |
|
|
79 |
#define KWIN_SEPARATE_SCREEN_FOCUS "SeparateScreenFocus" |
80 |
#define KWIN_ACTIVE_MOUSE_SCREEN "ActiveMouseScreen" |
79 |
|
81 |
|
80 |
// kwm config keywords |
82 |
// kwm config keywords |
81 |
#define KWM_ELECTRIC_BORDER "ElectricBorders" |
83 |
#define KWM_ELECTRIC_BORDER "ElectricBorders" |
Lines 209-214
KFocusConfig::KFocusConfig (bool _standA
Link Here
|
209 |
QWhatsThis::add( delayFocus, i18n("This is the delay after which the window the mouse pointer is over" |
211 |
QWhatsThis::add( delayFocus, i18n("This is the delay after which the window the mouse pointer is over" |
210 |
" will automatically receive focus.") ); |
212 |
" will automatically receive focus.") ); |
211 |
|
213 |
|
|
|
214 |
separateScreenFocus = new QCheckBox( i18n( "S&eparate screen focus" ), fcsBox ); |
215 |
fLay->addWidget( separateScreenFocus ); |
216 |
wtstr = i18n( "When this option is enabled, focus operations are limited only to the active Xinerama screen" ); |
217 |
QWhatsThis::add( separateScreenFocus, wtstr ); |
218 |
|
219 |
activeMouseScreen = new QCheckBox( i18n( "Active &mouse screen" ), fcsBox ); |
220 |
fLay->addWidget( activeMouseScreen ); |
221 |
wtstr = i18n( "When this option is enabled, active Xinerama screen (where for example new windows appear)" |
222 |
" is the screen with the mouse pointer. When disabled, the active Xinerama screen is the screen" |
223 |
" with the focused window. This option is by default disabled for Click to focus and" |
224 |
" enabled for other focus policies." ); |
225 |
QWhatsThis::add( activeMouseScreen, wtstr ); |
226 |
connect(focusCombo, SIGNAL(activated(int)), this, SLOT(updateActiveMouseScreen())); |
227 |
|
228 |
if (!QApplication::desktop()->isVirtualDesktop() || |
229 |
QApplication::desktop()->numScreens() == 1) // No Ximerama |
230 |
{ |
231 |
separateScreenFocus->hide(); |
232 |
activeMouseScreen->hide(); |
233 |
} |
234 |
|
212 |
lay->addWidget(fcsBox); |
235 |
lay->addWidget(fcsBox); |
213 |
|
236 |
|
214 |
kbdBox = new QButtonGroup(i18n("Navigation"), this); |
237 |
kbdBox = new QButtonGroup(i18n("Navigation"), this); |
Lines 260-265
KFocusConfig::KFocusConfig (bool _standA
Link Here
|
260 |
connect(fcsBox, SIGNAL(clicked(int)), SLOT(changed())); |
283 |
connect(fcsBox, SIGNAL(clicked(int)), SLOT(changed())); |
261 |
connect(autoRaise, SIGNAL(valueChanged(int)), SLOT(changed())); |
284 |
connect(autoRaise, SIGNAL(valueChanged(int)), SLOT(changed())); |
262 |
connect(delayFocus, SIGNAL(valueChanged(int)), SLOT(changed())); |
285 |
connect(delayFocus, SIGNAL(valueChanged(int)), SLOT(changed())); |
|
|
286 |
connect(separateScreenFocus, SIGNAL(clicked()), SLOT(changed())); |
287 |
connect(activeMouseScreen, SIGNAL(clicked()), SLOT(changed())); |
263 |
connect(altTabPopup, SIGNAL(clicked()), SLOT(changed())); |
288 |
connect(altTabPopup, SIGNAL(clicked()), SLOT(changed())); |
264 |
connect(traverseAll, SIGNAL(clicked()), SLOT(changed())); |
289 |
connect(traverseAll, SIGNAL(clicked()), SLOT(changed())); |
265 |
connect(rollOverDesktops, SIGNAL(clicked()), SLOT(changed())); |
290 |
connect(rollOverDesktops, SIGNAL(clicked()), SLOT(changed())); |
Lines 366-371
void KFocusConfig::delayFocusOnTog(bool
Link Here
|
366 |
void KFocusConfig::clickRaiseOnTog(bool ) { |
391 |
void KFocusConfig::clickRaiseOnTog(bool ) { |
367 |
} |
392 |
} |
368 |
|
393 |
|
|
|
394 |
void KFocusConfig::setSeparateScreenFocus(bool s) { |
395 |
separateScreenFocus->setChecked(s); |
396 |
} |
397 |
|
398 |
void KFocusConfig::setActiveMouseScreen(bool a) { |
399 |
activeMouseScreen->setChecked(a); |
400 |
} |
401 |
|
402 |
void KFocusConfig::updateActiveMouseScreen() |
403 |
{ |
404 |
// on by default for non click to focus policies |
405 |
KConfigGroup cfg( config, "Windows" ); |
406 |
if( !cfg.hasKey( KWIN_ACTIVE_MOUSE_SCREEN )) |
407 |
setActiveMouseScreen( focusCombo->currentItem() != 0 ); |
408 |
} |
409 |
|
369 |
void KFocusConfig::setAltTabMode(bool a) { |
410 |
void KFocusConfig::setAltTabMode(bool a) { |
370 |
altTabPopup->setChecked(a); |
411 |
altTabPopup->setChecked(a); |
371 |
} |
412 |
} |
Lines 412-417
void KFocusConfig::load( void )
Link Here
|
412 |
setClickRaise(key != "off"); |
453 |
setClickRaise(key != "off"); |
413 |
setAutoRaiseEnabled(); // this will disable/hide the auto raise delay widget if focus==click |
454 |
setAutoRaiseEnabled(); // this will disable/hide the auto raise delay widget if focus==click |
414 |
setDelayFocusEnabled(); |
455 |
setDelayFocusEnabled(); |
|
|
456 |
|
457 |
setSeparateScreenFocus( config->readBoolEntry(KWIN_SEPARATE_SCREEN_FOCUS, false)); |
458 |
// on by default for non click to focus policies |
459 |
setActiveMouseScreen( config->readBoolEntry(KWIN_ACTIVE_MOUSE_SCREEN, focusCombo->currentItem() != 0 )); |
415 |
|
460 |
|
416 |
key = config->readEntry(KWIN_ALTTABMODE, "KDE"); |
461 |
key = config->readEntry(KWIN_ALTTABMODE, "KDE"); |
417 |
setAltTabMode(key == "KDE"); |
462 |
setAltTabMode(key == "KDE"); |
Lines 467-472
void KFocusConfig::save( void )
Link Here
|
467 |
else |
512 |
else |
468 |
config->writeEntry(KWIN_CLICKRAISE, "off"); |
513 |
config->writeEntry(KWIN_CLICKRAISE, "off"); |
469 |
|
514 |
|
|
|
515 |
config->writeEntry(KWIN_SEPARATE_SCREEN_FOCUS, separateScreenFocus->isChecked()); |
516 |
config->writeEntry(KWIN_ACTIVE_MOUSE_SCREEN, activeMouseScreen->isChecked()); |
517 |
|
470 |
if (altTabPopup->isChecked()) |
518 |
if (altTabPopup->isChecked()) |
471 |
config->writeEntry(KWIN_ALTTABMODE, "KDE"); |
519 |
config->writeEntry(KWIN_ALTTABMODE, "KDE"); |
472 |
else |
520 |
else |
Lines 500-505
void KFocusConfig::defaults()
Link Here
|
500 |
setAutoRaise(false); |
548 |
setAutoRaise(false); |
501 |
setDelayFocus(false); |
549 |
setDelayFocus(false); |
502 |
setClickRaise(true); |
550 |
setClickRaise(true); |
|
|
551 |
setSeparateScreenFocus( false ); |
552 |
// on by default for non click to focus policies |
553 |
setActiveMouseScreen( focusCombo->currentItem() != 0 ); |
503 |
setAltTabMode(true); |
554 |
setAltTabMode(true); |
504 |
setTraverseAll( false ); |
555 |
setTraverseAll( false ); |
505 |
setRollOverDesktops(true); |
556 |
setRollOverDesktops(true); |