diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt index a624ad1947..e4ebde6dce 100644 --- a/data/CMakeLists.txt +++ b/data/CMakeLists.txt @@ -28,6 +28,6 @@ install(TARGETS kwin_update_default_rules DESTINATION ${LIB_INSTALL_DIR}/kconf_u install( FILES fsp_workarounds_1.kwinrules DESTINATION ${DATA_INSTALL_DIR}/kwin/default_rules ) install( FILES pop.wav DESTINATION ${SOUND_INSTALL_DIR} ) -install( FILES kwin.upd kwinsticky.upd kwiniconify.upd kwin3_plugin.upd kwin_focus1.upd kwinupdatewindowsettings.upd kwin_focus2.upd kwin_fsp_workarounds_1.upd kwin_on_off.upd DESTINATION ${KCONF_UPDATE_INSTALL_DIR} ) -install( PROGRAMS pluginlibFix.pl kwin3_plugin.pl kwin_focus1.sh kwin_focus2.sh on-off_to_true-false.sh DESTINATION ${KCONF_UPDATE_INSTALL_DIR} ) +install( FILES kwin.upd kwinsticky.upd kwiniconify.upd kwin3_plugin.upd kwin_focus1.upd kwinupdatewindowsettings.upd kwin_focus2.upd kwin_fsp_workarounds_1.upd kwin_on_off.upd kwin_window_shortcuts.upd DESTINATION ${KCONF_UPDATE_INSTALL_DIR} ) +install( PROGRAMS pluginlibFix.pl kwin3_plugin.pl kwin_focus1.sh kwin_focus2.sh on-off_to_true-false.sh kwin_window_shortcuts.sh DESTINATION ${KCONF_UPDATE_INSTALL_DIR} ) diff --git a/data/kwin_window_shortcuts.sh b/data/kwin_window_shortcuts.sh new file mode 100644 index 0000000000..11b7c8e7b3 --- /dev/null +++ b/data/kwin_window_shortcuts.sh @@ -0,0 +1,10 @@ +#! /bin/sh +# remove = lines for per-window shortcuts that are not supposed to be saved +while read line; do + if echo "$line" | grep '^[0-9]\+=' >/dev/null 2>/dev/null; then + key=`echo "$line" | sed 's/^\([0-9]\+\)=.*$/\1/'` + echo '# DELETE [kwin]'$key + else + echo "$line" + fi +done diff --git a/data/kwin_window_shortcuts.upd b/data/kwin_window_shortcuts.upd new file mode 100644 index 0000000000..0554cdbb18 --- /dev/null +++ b/data/kwin_window_shortcuts.upd @@ -0,0 +1,5 @@ +Id=kde414 +File=kglobalshortcutsrc +Group=kwin +Options=overwrite +Script=kwin_window_shortcuts.sh,sh diff --git a/workspace.cpp b/workspace.cpp index fbdea84d53..2f118bd3b7 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -583,7 +583,10 @@ void Workspace::removeClient( Client* c, allowed_t ) if( client_keys_client == c ) setupWindowShortcutDone( false ); if( !c->shortcut().isEmpty()) + { c->setShortcut( QString() ); // remove from client_keys + clientShortcutUpdated( c ); // needed, since this is otherwise delayed by setShortcut() and wouldn't run + } if( c->isDialog()) Notify::raise( Notify::TransDelete );