]> Dogcows Code - chaz/openbox/commitdiff
remove the activate action, make the focus action "activate" but not raise or unshade
authorDana Jansens <danakj@orodu.net>
Fri, 22 Jun 2007 14:09:57 +0000 (14:09 +0000)
committerDana Jansens <danakj@orodu.net>
Fri, 22 Jun 2007 14:09:57 +0000 (14:09 +0000)
Makefile.am
openbox/actions/all.c
openbox/actions/all.h
openbox/actions/focus.c [moved from openbox/actions/activate.c with 77% similarity]
openbox/focus_cycle.c

index 61bc0b3d8c5d46c43b282fc021978c55cd3c8f59..a1bc2645ce631aa56277ad48098cbdaf139739da 100644 (file)
@@ -156,13 +156,13 @@ openbox_openbox_SOURCES = \
        gettext.h \
        openbox/actions/all.c \
        openbox/actions/all.h \
        gettext.h \
        openbox/actions/all.c \
        openbox/actions/all.h \
-       openbox/actions/activate.c \
        openbox/actions/breakchroot.c \
        openbox/actions/close.c \
        openbox/actions/cyclewindows.c \
        openbox/actions/debug.c \
        openbox/actions/execute.c \
        openbox/actions/exit.c \
        openbox/actions/breakchroot.c \
        openbox/actions/close.c \
        openbox/actions/cyclewindows.c \
        openbox/actions/debug.c \
        openbox/actions/execute.c \
        openbox/actions/exit.c \
+       openbox/actions/focus.c \
        openbox/actions/move.c \
        openbox/actions/reconfigure.c \
        openbox/actions/restart.c \
        openbox/actions/move.c \
        openbox/actions/reconfigure.c \
        openbox/actions/restart.c \
index a65d76b529cfc686d5d436243189b7ee369c1c37..71e439e6a76df65e7b6846c2c1afa3b8881f204c 100644 (file)
@@ -10,8 +10,8 @@ void action_all_startup()
     action_exit_startup();
     action_restart_startup();
     action_cyclewindows_startup();
     action_exit_startup();
     action_restart_startup();
     action_cyclewindows_startup();
-    action_activate_startup();
     action_breakchroot_startup();
     action_close_startup();
     action_move_startup();
     action_breakchroot_startup();
     action_close_startup();
     action_move_startup();
+    action_focus_startup();
 }
 }
index fa2524925c36ffc09b8a6775da19bfce46a01ad4..2f2cf18aed517fd7fc29a33145ef3edd60337d4a 100644 (file)
@@ -11,9 +11,9 @@ void action_reconfigure_startup();
 void action_exit_startup();
 void action_restart_startup();
 void action_cyclewindows_startup();
 void action_exit_startup();
 void action_restart_startup();
 void action_cyclewindows_startup();
-void action_activate_startup();
 void action_breakchroot_startup();
 void action_close_startup();
 void action_move_startup();
 void action_breakchroot_startup();
 void action_close_startup();
 void action_move_startup();
+void action_focus_startup();
 
 #endif
 
 #endif
similarity index 77%
rename from openbox/actions/activate.c
rename to openbox/actions/focus.c
index c3f3f98e2b62b75a0e4b715b2b4606bb917ffcc4..9be6741cd38bf9810ab5472267f0633165e6030d 100644 (file)
@@ -5,17 +5,15 @@
 
 typedef struct {
     gboolean here;
 
 typedef struct {
     gboolean here;
-    gboolean raise;
-    gboolean unshade;
 } Options;
 
 static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
 static void     free_func(gpointer options);
 static gboolean run_func(ObActionsData *data, gpointer options);
 
 } Options;
 
 static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
 static void     free_func(gpointer options);
 static gboolean run_func(ObActionsData *data, gpointer options);
 
-void action_activate_startup()
+void action_focus_startup()
 {
 {
-    actions_register("Activate",
+    actions_register("Focus",
                      setup_func,
                      free_func,
                      run_func,
                      setup_func,
                      free_func,
                      run_func,
@@ -28,15 +26,9 @@ static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
     Options *o;
 
     o = g_new0(Options, 1);
     Options *o;
 
     o = g_new0(Options, 1);
-    o->raise = TRUE;
-    o->unshade = TRUE;
 
     if ((n = parse_find_node("here", node)))
         o->here = parse_bool(doc, n);
 
     if ((n = parse_find_node("here", node)))
         o->here = parse_bool(doc, n);
-    if ((n = parse_find_node("raise", node)))
-        o->raise = parse_bool(doc, n);
-    if ((n = parse_find_node("unshade", node)))
-        o->unshade = parse_bool(doc, n);
     return o;
 }
 
     return o;
 }
 
@@ -57,7 +49,7 @@ static gboolean run_func(ObActionsData *data, gpointer options)
             data->context != OB_FRAME_CONTEXT_CLIENT ||
             data->context != OB_FRAME_CONTEXT_FRAME)
         {
             data->context != OB_FRAME_CONTEXT_CLIENT ||
             data->context != OB_FRAME_CONTEXT_FRAME)
         {
-            client_activate(data->client, o->here, o->raise, o->unshade, TRUE);
+            client_activate(data->client, o->here, FALSE, FALSE, TRUE);
         }
     } else {
         /* focus action on something other than a client, make keybindings
         }
     } else {
         /* focus action on something other than a client, make keybindings
index 22398851ddfab0995e5b19d2df4cfc540e253478..0396dd86d9ed624be717361132776ee6391f1850 100644 (file)
@@ -137,7 +137,7 @@ ObClient* focus_cycle(gboolean forward, gboolean all_desktops,
                                            focus_cycle_all_desktops,
                                            focus_cycle_dock_windows,
                                            focus_cycle_desktop_windows);
                                            focus_cycle_all_desktops,
                                            focus_cycle_dock_windows,
                                            focus_cycle_desktop_windows);
-                return NULL;
+                return focus_cycle_target;
             } else if (ft != focus_cycle_target) {
                 focus_cycle_target = ft;
                 done = TRUE;
             } else if (ft != focus_cycle_target) {
                 focus_cycle_target = ft;
                 done = TRUE;
@@ -316,7 +316,7 @@ ObClient* focus_directional_cycle(ObDirection dir, gboolean dock_windows,
                                       focus_cycle_all_desktops,
                                       focus_cycle_dock_windows,
                                       focus_cycle_desktop_windows);
                                       focus_cycle_all_desktops,
                                       focus_cycle_dock_windows,
                                       focus_cycle_desktop_windows);
-    return NULL;
+    return focus_cycle_target;
 
 done_cycle:
     if (done && !cancel) ret = focus_cycle_target;
 
 done_cycle:
     if (done && !cancel) ret = focus_cycle_target;
This page took 0.035458 seconds and 4 git commands to generate.