diff options
-rw-r--r-- | include/compiz-core.h | 92 | ||||
-rw-r--r-- | metadata/core.xml.in.in | 114 | ||||
-rw-r--r-- | src/display.c | 61 |
3 files changed, 34 insertions, 233 deletions
diff --git a/include/compiz-core.h b/include/compiz-core.h index 9039d0dd..38ad93d2 100644 --- a/include/compiz-core.h +++ b/include/compiz-core.h @@ -28,7 +28,7 @@ #include <compiz-plugin.h> -#define CORE_ABIVERSION 20081218 +#define CORE_ABIVERSION 20090128 #include <stdio.h> #include <sys/time.h> @@ -749,63 +749,39 @@ removeFileWatch (CompFileWatchHandle handle); #define COMP_DISPLAY_OPTION_CLOSE_WINDOW_BUTTON 7 #define COMP_DISPLAY_OPTION_MAIN_MENU_KEY 8 #define COMP_DISPLAY_OPTION_RUN_DIALOG_KEY 9 -#define COMP_DISPLAY_OPTION_COMMAND0 10 -#define COMP_DISPLAY_OPTION_COMMAND1 11 -#define COMP_DISPLAY_OPTION_COMMAND2 12 -#define COMP_DISPLAY_OPTION_COMMAND3 13 -#define COMP_DISPLAY_OPTION_COMMAND4 14 -#define COMP_DISPLAY_OPTION_COMMAND5 15 -#define COMP_DISPLAY_OPTION_COMMAND6 16 -#define COMP_DISPLAY_OPTION_COMMAND7 17 -#define COMP_DISPLAY_OPTION_COMMAND8 18 -#define COMP_DISPLAY_OPTION_COMMAND9 19 -#define COMP_DISPLAY_OPTION_COMMAND10 20 -#define COMP_DISPLAY_OPTION_COMMAND11 21 -#define COMP_DISPLAY_OPTION_RUN_COMMAND0_KEY 22 -#define COMP_DISPLAY_OPTION_RUN_COMMAND1_KEY 23 -#define COMP_DISPLAY_OPTION_RUN_COMMAND2_KEY 24 -#define COMP_DISPLAY_OPTION_RUN_COMMAND3_KEY 25 -#define COMP_DISPLAY_OPTION_RUN_COMMAND4_KEY 26 -#define COMP_DISPLAY_OPTION_RUN_COMMAND5_KEY 27 -#define COMP_DISPLAY_OPTION_RUN_COMMAND6_KEY 28 -#define COMP_DISPLAY_OPTION_RUN_COMMAND7_KEY 29 -#define COMP_DISPLAY_OPTION_RUN_COMMAND8_KEY 30 -#define COMP_DISPLAY_OPTION_RUN_COMMAND9_KEY 31 -#define COMP_DISPLAY_OPTION_RUN_COMMAND10_KEY 32 -#define COMP_DISPLAY_OPTION_RUN_COMMAND11_KEY 33 -#define COMP_DISPLAY_OPTION_SLOW_ANIMATIONS_KEY 34 -#define COMP_DISPLAY_OPTION_RAISE_WINDOW_KEY 35 -#define COMP_DISPLAY_OPTION_RAISE_WINDOW_BUTTON 36 -#define COMP_DISPLAY_OPTION_LOWER_WINDOW_KEY 37 -#define COMP_DISPLAY_OPTION_LOWER_WINDOW_BUTTON 38 -#define COMP_DISPLAY_OPTION_UNMAXIMIZE_WINDOW_KEY 39 -#define COMP_DISPLAY_OPTION_MINIMIZE_WINDOW_KEY 40 -#define COMP_DISPLAY_OPTION_MINIMIZE_WINDOW_BUTTON 41 -#define COMP_DISPLAY_OPTION_MAXIMIZE_WINDOW_KEY 42 -#define COMP_DISPLAY_OPTION_MAXIMIZE_WINDOW_HORZ_KEY 43 -#define COMP_DISPLAY_OPTION_MAXIMIZE_WINDOW_VERT_KEY 44 -#define COMP_DISPLAY_OPTION_SCREENSHOT 45 -#define COMP_DISPLAY_OPTION_RUN_SCREENSHOT_KEY 46 -#define COMP_DISPLAY_OPTION_WINDOW_SCREENSHOT 47 -#define COMP_DISPLAY_OPTION_RUN_WINDOW_SCREENSHOT_KEY 48 -#define COMP_DISPLAY_OPTION_WINDOW_MENU_BUTTON 49 -#define COMP_DISPLAY_OPTION_WINDOW_MENU_KEY 50 -#define COMP_DISPLAY_OPTION_SHOW_DESKTOP_KEY 51 -#define COMP_DISPLAY_OPTION_SHOW_DESKTOP_EDGE 52 -#define COMP_DISPLAY_OPTION_RAISE_ON_CLICK 53 -#define COMP_DISPLAY_OPTION_AUDIBLE_BELL 54 -#define COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED_KEY 55 -#define COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED_BUTTON 56 -#define COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED_HORZ_KEY 57 -#define COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED_VERT_KEY 58 -#define COMP_DISPLAY_OPTION_HIDE_SKIP_TASKBAR_WINDOWS 59 -#define COMP_DISPLAY_OPTION_TOGGLE_WINDOW_SHADED_KEY 60 -#define COMP_DISPLAY_OPTION_IGNORE_HINTS_WHEN_MAXIMIZED 61 -#define COMP_DISPLAY_OPTION_TERMINAL 62 -#define COMP_DISPLAY_OPTION_RUN_TERMINAL_KEY 63 -#define COMP_DISPLAY_OPTION_PING_DELAY 64 -#define COMP_DISPLAY_OPTION_EDGE_DELAY 65 -#define COMP_DISPLAY_OPTION_NUM 66 +#define COMP_DISPLAY_OPTION_SLOW_ANIMATIONS_KEY 10 +#define COMP_DISPLAY_OPTION_RAISE_WINDOW_KEY 11 +#define COMP_DISPLAY_OPTION_RAISE_WINDOW_BUTTON 12 +#define COMP_DISPLAY_OPTION_LOWER_WINDOW_KEY 13 +#define COMP_DISPLAY_OPTION_LOWER_WINDOW_BUTTON 14 +#define COMP_DISPLAY_OPTION_UNMAXIMIZE_WINDOW_KEY 15 +#define COMP_DISPLAY_OPTION_MINIMIZE_WINDOW_KEY 16 +#define COMP_DISPLAY_OPTION_MINIMIZE_WINDOW_BUTTON 17 +#define COMP_DISPLAY_OPTION_MAXIMIZE_WINDOW_KEY 18 +#define COMP_DISPLAY_OPTION_MAXIMIZE_WINDOW_HORZ_KEY 19 +#define COMP_DISPLAY_OPTION_MAXIMIZE_WINDOW_VERT_KEY 20 +#define COMP_DISPLAY_OPTION_SCREENSHOT 21 +#define COMP_DISPLAY_OPTION_RUN_SCREENSHOT_KEY 22 +#define COMP_DISPLAY_OPTION_WINDOW_SCREENSHOT 23 +#define COMP_DISPLAY_OPTION_RUN_WINDOW_SCREENSHOT_KEY 24 +#define COMP_DISPLAY_OPTION_WINDOW_MENU_BUTTON 25 +#define COMP_DISPLAY_OPTION_WINDOW_MENU_KEY 26 +#define COMP_DISPLAY_OPTION_SHOW_DESKTOP_KEY 27 +#define COMP_DISPLAY_OPTION_SHOW_DESKTOP_EDGE 28 +#define COMP_DISPLAY_OPTION_RAISE_ON_CLICK 29 +#define COMP_DISPLAY_OPTION_AUDIBLE_BELL 30 +#define COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED_KEY 31 +#define COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED_BUTTON 32 +#define COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED_HORZ_KEY 33 +#define COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED_VERT_KEY 34 +#define COMP_DISPLAY_OPTION_HIDE_SKIP_TASKBAR_WINDOWS 35 +#define COMP_DISPLAY_OPTION_TOGGLE_WINDOW_SHADED_KEY 36 +#define COMP_DISPLAY_OPTION_IGNORE_HINTS_WHEN_MAXIMIZED 37 +#define COMP_DISPLAY_OPTION_TERMINAL 38 +#define COMP_DISPLAY_OPTION_RUN_TERMINAL_KEY 39 +#define COMP_DISPLAY_OPTION_PING_DELAY 40 +#define COMP_DISPLAY_OPTION_EDGE_DELAY 41 +#define COMP_DISPLAY_OPTION_NUM 42 typedef void (*HandleEventProc) (CompDisplay *display, XEvent *event); diff --git a/metadata/core.xml.in.in b/metadata/core.xml.in.in index 088cefe7..358e7b3b 100644 --- a/metadata/core.xml.in.in +++ b/metadata/core.xml.in.in @@ -205,120 +205,6 @@ <group> <_short>Commands</_short> <subgroup> - <_short>Commands</_short> - <option name="command0" type="string"> - <_short>Command line 0</_short> - <_long>Command line to be executed in shell when run_command0 is invoked</_long> - <default></default> - </option> - <option name="command1" type="string"> - <_short>Command line 1</_short> - <_long>Command line to be executed in shell when run_command1 is invoked</_long> - <default></default> - </option> - <option name="command2" type="string"> - <_short>Command line 2</_short> - <_long>Command line to be executed in shell when run_command2 is invoked</_long> - <default></default> - </option> - <option name="command3" type="string"> - <_short>Command line 3</_short> - <_long>Command line to be executed in shell when run_command3 is invoked</_long> - <default></default> - </option> - <option name="command4" type="string"> - <_short>Command line 4</_short> - <_long>Command line to be executed in shell when run_command4 is invoked</_long> - <default></default> - </option> - <option name="command5" type="string"> - <_short>Command line 5</_short> - <_long>Command line to be executed in shell when run_command5 is invoked</_long> - <default></default> - </option> - <option name="command6" type="string"> - <_short>Command line 6</_short> - <_long>Command line to be executed in shell when run_command6 is invoked</_long> - <default></default> - </option> - <option name="command7" type="string"> - <_short>Command line 7</_short> - <_long>Command line to be executed in shell when run_command7 is invoked</_long> - <default></default> - </option> - <option name="command8" type="string"> - <_short>Command line 8</_short> - <_long>Command line to be executed in shell when run_command8 is invoked</_long> - <default></default> - </option> - <option name="command9" type="string"> - <_short>Command line 9</_short> - <_long>Command line to be executed in shell when run_command9 is invoked</_long> - <default></default> - </option> - <option name="command10" type="string"> - <_short>Command line 10</_short> - <_long>Command line to be executed in shell when run_command10 is invoked</_long> - <default></default> - </option> - <option name="command11" type="string"> - <_short>Command line 11</_short> - <_long>Command line to be executed in shell when run_command11 is invoked</_long> - <default></default> - </option> - </subgroup> - <subgroup> - <_short>Key bindings</_short> - <option name="run_command0_key" type="key"> - <_short>Run command 0</_short> - <_long>A keybinding that when invoked, will run the shell command identified by command0</_long> - </option> - <option name="run_command1_key" type="key"> - <_short>Run command 1</_short> - <_long>A keybinding that when invoked, will run the shell command identified by command1</_long> - </option> - <option name="run_command2_key" type="key"> - <_short>Run command 2</_short> - <_long>A keybinding that when invoked, will run the shell command identified by command2</_long> - </option> - <option name="run_command3_key" type="key"> - <_short>Run command 3</_short> - <_long>A keybinding that when invoked, will run the shell command identified by command3</_long> - </option> - <option name="run_command4_key" type="key"> - <_short>Run command 4</_short> - <_long>A keybinding that when invoked, will run the shell command identified by command4</_long> - </option> - <option name="run_command5_key" type="key"> - <_short>Run command 5</_short> - <_long>A keybinding that when invoked, will run the shell command identified by command5</_long> - </option> - <option name="run_command6_key" type="key"> - <_short>Run command 6</_short> - <_long>A keybinding that when invoked, will run the shell command identified by command6</_long> - </option> - <option name="run_command7_key" type="key"> - <_short>Run command 7</_short> - <_long>A keybinding that when invoked, will run the shell command identified by command7</_long> - </option> - <option name="run_command8_key" type="key"> - <_short>Run command 8</_short> - <_long>A keybinding that when invoked, will run the shell command identified by command8</_long> - </option> - <option name="run_command9_key" type="key"> - <_short>Run command 9</_short> - <_long>A keybinding that when invoked, will run the shell command identified by command9</_long> - </option> - <option name="run_command10_key" type="key"> - <_short>Run command 10</_short> - <_long>A keybinding that when invoked, will run the shell command identified by command10</_long> - </option> - <option name="run_command11_key" type="key"> - <_short>Run command 11</_short> - <_long>A keybinding that when invoked, will run the shell command identified by command11</_long> - </option> - </subgroup> - <subgroup> <_short>Screenshot commands</_short> <option name="command_screenshot" type="string"> <_short>Screenshot command line</_short> diff --git a/src/display.c b/src/display.c index 176f769f..b19182fb 100644 --- a/src/display.c +++ b/src/display.c @@ -400,43 +400,6 @@ lowerInitiate (CompDisplay *d, } static Bool -runCommandDispatch (CompDisplay *d, - CompAction *action, - CompActionState state, - CompOption *option, - int nOption) -{ - CompScreen *s; - Window xid; - - xid = getIntOptionNamed (option, nOption, "root", 0); - - s = findScreenAtDisplay (d, xid); - if (s) - { - int index = -1; - int i = COMP_DISPLAY_OPTION_RUN_COMMAND0_KEY; - - while (i <= COMP_DISPLAY_OPTION_RUN_COMMAND11_KEY) - { - if (action == &d->opt[i].value.action) - { - index = i - COMP_DISPLAY_OPTION_RUN_COMMAND0_KEY + - COMP_DISPLAY_OPTION_COMMAND0; - break; - } - - i++; - } - - if (index > 0) - runCommand (s, d->opt[index].value.s); - } - - return TRUE; -} - -static Bool runCommandScreenshot (CompDisplay *d, CompAction *action, CompActionState state, @@ -623,30 +586,6 @@ const CompMetadataOptionInfo coreDisplayOptionInfo[COMP_DISPLAY_OPTION_NUM] = { { "close_window_button", "button", 0, closeWin, 0 }, { "main_menu_key", "key", 0, mainMenu, 0 }, { "run_key", "key", 0, runDialog, 0 }, - { "command0", "string", 0, 0, 0 }, - { "command1", "string", 0, 0, 0 }, - { "command2", "string", 0, 0, 0 }, - { "command3", "string", 0, 0, 0 }, - { "command4", "string", 0, 0, 0 }, - { "command5", "string", 0, 0, 0 }, - { "command6", "string", 0, 0, 0 }, - { "command7", "string", 0, 0, 0 }, - { "command8", "string", 0, 0, 0 }, - { "command9", "string", 0, 0, 0 }, - { "command10", "string", 0, 0, 0 }, - { "command11", "string", 0, 0, 0 }, - { "run_command0_key", "key", 0, runCommandDispatch, 0 }, - { "run_command1_key", "key", 0, runCommandDispatch, 0 }, - { "run_command2_key", "key", 0, runCommandDispatch, 0 }, - { "run_command3_key", "key", 0, runCommandDispatch, 0 }, - { "run_command4_key", "key", 0, runCommandDispatch, 0 }, - { "run_command5_key", "key", 0, runCommandDispatch, 0 }, - { "run_command6_key", "key", 0, runCommandDispatch, 0 }, - { "run_command7_key", "key", 0, runCommandDispatch, 0 }, - { "run_command8_key", "key", 0, runCommandDispatch, 0 }, - { "run_command9_key", "key", 0, runCommandDispatch, 0 }, - { "run_command10_key", "key", 0, runCommandDispatch, 0 }, - { "run_command11_key", "key", 0, runCommandDispatch, 0 }, { "slow_animations_key", "key", 0, toggleSlowAnimations, 0 }, { "raise_window_key", "key", 0, raiseInitiate, 0 }, { "raise_window_button", "button", 0, raiseInitiate, 0 }, |