3 #include "moveresize.h"
15 typedef struct ActionString
{
17 void (*func
)(union ActionData
*);
18 void (*setup
)(Action
*);
21 Action
*action_new(void (*func
)(union ActionData
*data
))
23 Action
*a
= g_new0(Action
, 1);
29 void action_free(Action
*a
)
31 if (a
== NULL
) return;
33 /* deal with pointers */
34 if (a
->func
== action_execute
|| a
->func
== action_restart
)
35 g_free(a
->data
.execute
.path
);
36 else if (a
->func
== action_showmenu
)
37 g_free(a
->data
.showmenu
.name
);
42 void setup_action_directional_focus_north(Action
*a
)
44 a
->data
.diraction
.direction
= Direction_North
;
47 void setup_action_directional_focus_east(Action
*a
)
49 a
->data
.diraction
.direction
= Direction_East
;
52 void setup_action_directional_focus_south(Action
*a
)
54 a
->data
.diraction
.direction
= Direction_South
;
57 void setup_action_directional_focus_west(Action
*a
)
59 a
->data
.diraction
.direction
= Direction_West
;
62 void setup_action_directional_focus_northeast(Action
*a
)
64 a
->data
.diraction
.direction
= Direction_NorthEast
;
67 void setup_action_directional_focus_southeast(Action
*a
)
69 a
->data
.diraction
.direction
= Direction_SouthEast
;
72 void setup_action_directional_focus_southwest(Action
*a
)
74 a
->data
.diraction
.direction
= Direction_SouthWest
;
77 void setup_action_directional_focus_northwest(Action
*a
)
79 a
->data
.diraction
.direction
= Direction_NorthWest
;
82 void setup_action_send_to_desktop(Action
*a
)
84 a
->data
.sendto
.follow
= TRUE
;
87 void setup_action_send_to_desktop_direction(Action
*a
)
89 a
->data
.sendtodir
.wrap
= TRUE
;
90 a
->data
.sendtodir
.follow
= TRUE
;
93 void setup_action_desktop_direction(Action
*a
)
95 a
->data
.desktopdir
.wrap
= TRUE
;
98 void setup_action_move_keyboard(Action
*a
)
100 a
->data
.moveresize
.corner
= prop_atoms
.net_wm_moveresize_move_keyboard
;
103 void setup_action_move(Action
*a
)
105 a
->data
.moveresize
.corner
= prop_atoms
.net_wm_moveresize_move
;
108 void setup_action_resize(Action
*a
)
110 a
->data
.moveresize
.corner
= prop_atoms
.net_wm_moveresize_size_topleft
;
113 void setup_action_resize_keyboard(Action
*a
)
115 a
->data
.moveresize
.corner
= prop_atoms
.net_wm_moveresize_size_keyboard
;
118 void setup_action_cycle_windows_linear_next(Action
*a
)
120 a
->data
.cycle
.linear
= TRUE
;
121 a
->data
.cycle
.forward
= TRUE
;
124 void setup_action_cycle_windows_linear_previous(Action
*a
)
126 a
->data
.cycle
.linear
= TRUE
;
127 a
->data
.cycle
.forward
= FALSE
;
130 void setup_action_cycle_windows_next(Action
*a
)
132 a
->data
.cycle
.linear
= FALSE
;
133 a
->data
.cycle
.forward
= TRUE
;
136 void setup_action_cycle_windows_previous(Action
*a
)
138 a
->data
.cycle
.linear
= FALSE
;
139 a
->data
.cycle
.forward
= FALSE
;
142 void setup_action_movetoedge_north(Action
*a
)
144 a
->data
.diraction
.direction
= Direction_North
;
147 void setup_action_movetoedge_south(Action
*a
)
149 a
->data
.diraction
.direction
= Direction_South
;
152 void setup_action_movetoedge_east(Action
*a
)
154 a
->data
.diraction
.direction
= Direction_East
;
157 void setup_action_movetoedge_west(Action
*a
)
159 a
->data
.diraction
.direction
= Direction_West
;
162 void setup_action_top_layer(Action
*a
)
164 a
->data
.layer
.layer
= 1;
167 void setup_action_normal_layer(Action
*a
)
169 a
->data
.layer
.layer
= 0;
172 void setup_action_bottom_layer(Action
*a
)
174 a
->data
.layer
.layer
= -1;
177 ActionString actionstrings
[] =
185 "directionalfocusnorth",
186 action_directional_focus
,
187 setup_action_directional_focus_north
190 "directionalfocuseast",
191 action_directional_focus
,
192 setup_action_directional_focus_east
195 "directionalfocussouth",
196 action_directional_focus
,
197 setup_action_directional_focus_south
200 "directionalfocuswest",
201 action_directional_focus
,
202 setup_action_directional_focus_west
205 "directionalfocusnortheast",
206 action_directional_focus
,
207 setup_action_directional_focus_northeast
210 "directionalfocussoutheast",
211 action_directional_focus
,
212 setup_action_directional_focus_southeast
215 "directionalfocussouthwest",
216 action_directional_focus
,
217 setup_action_directional_focus_southwest
220 "directionalfocusnorthwest",
221 action_directional_focus
,
222 setup_action_directional_focus_northwest
291 action_toggle_omnipresent
,
296 action_move_relative_horz
,
301 action_move_relative_vert
,
305 "resizerelativehorz",
306 action_resize_relative_horz
,
310 "resizerelativevert",
311 action_resize_relative_vert
,
316 action_maximize_full
,
321 action_unmaximize_full
,
325 "togglemaximizefull",
326 action_toggle_maximize_full
,
331 action_maximize_horz
,
336 action_unmaximize_horz
,
340 "togglemaximizehorz",
341 action_toggle_maximize_horz
,
346 action_maximize_vert
,
351 action_unmaximize_vert
,
355 "togglemaximizevert",
356 action_toggle_maximize_vert
,
361 action_send_to_desktop
,
362 setup_action_send_to_desktop
365 "sendtodesktopright",
366 action_send_to_desktop_right
,
367 setup_action_send_to_desktop_direction
371 action_send_to_desktop_left
,
372 setup_action_send_to_desktop_direction
376 action_send_to_desktop_up
,
377 setup_action_send_to_desktop_direction
381 action_send_to_desktop_down
,
382 setup_action_send_to_desktop_direction
391 action_desktop_right
,
392 setup_action_desktop_direction
397 setup_action_desktop_direction
402 setup_action_desktop_direction
407 setup_action_desktop_direction
411 action_toggle_decorations
,
417 setup_action_move_keyboard
432 setup_action_resize_keyboard
436 action_toggle_show_desktop
,
446 action_unshow_desktop
,
466 action_send_to_layer
,
467 setup_action_top_layer
472 setup_action_top_layer
476 action_send_to_layer
,
477 setup_action_normal_layer
481 action_send_to_layer
,
482 setup_action_bottom_layer
485 "togglealwaysonbottom",
487 setup_action_bottom_layer
491 action_cycle_windows
,
492 setup_action_cycle_windows_linear_next
495 "previouswindowlinear",
496 action_cycle_windows
,
497 setup_action_cycle_windows_linear_previous
501 action_cycle_windows
,
502 setup_action_cycle_windows_next
506 action_cycle_windows
,
507 setup_action_cycle_windows_previous
512 setup_action_movetoedge_north
517 setup_action_movetoedge_south
522 setup_action_movetoedge_west
527 setup_action_movetoedge_east
536 Action
*action_from_string(char *name
)
541 for (i
= 0; actionstrings
[i
].name
; i
++)
542 if (!g_ascii_strcasecmp(name
, actionstrings
[i
].name
)) {
543 a
= action_new(actionstrings
[i
].func
);
544 if (actionstrings
[i
].setup
)
545 actionstrings
[i
].setup(a
);
551 void action_execute(union ActionData
*data
)
554 if (data
->execute
.path
)
555 if (!g_spawn_command_line_async(data
->execute
.path
, &e
)) {
556 g_warning("failed to execute '%s': %s",
557 data
->execute
.path
, e
->message
);
561 void action_focus(union ActionData
*data
)
564 client_focus(data
->client
.c
);
567 void action_unfocus (union ActionData
*data
)
570 client_unfocus(data
->client
.c
);
573 void action_iconify(union ActionData
*data
)
576 client_iconify(data
->client
.c
, TRUE
, TRUE
);
579 void action_focusraise(union ActionData
*data
)
581 if (data
->client
.c
) {
582 client_focus(data
->client
.c
);
583 stacking_raise(CLIENT_AS_WINDOW(data
->client
.c
));
587 void action_raise(union ActionData
*data
)
590 stacking_raise(CLIENT_AS_WINDOW(data
->client
.c
));
593 void action_unshaderaise(union ActionData
*data
)
595 if (data
->client
.c
) {
596 if (data
->client
.c
->shaded
)
597 client_shade(data
->client
.c
, FALSE
);
599 stacking_raise(CLIENT_AS_WINDOW(data
->client
.c
));
603 void action_shadelower(union ActionData
*data
)
605 if (data
->client
.c
) {
606 if (data
->client
.c
->shaded
)
607 stacking_lower(CLIENT_AS_WINDOW(data
->client
.c
));
609 client_shade(data
->client
.c
, TRUE
);
613 void action_lower(union ActionData
*data
)
616 stacking_lower(CLIENT_AS_WINDOW(data
->client
.c
));
619 void action_close(union ActionData
*data
)
622 client_close(data
->client
.c
);
625 void action_kill(union ActionData
*data
)
628 client_kill(data
->client
.c
);
631 void action_shade(union ActionData
*data
)
634 client_shade(data
->client
.c
, TRUE
);
637 void action_unshade(union ActionData
*data
)
640 client_shade(data
->client
.c
, FALSE
);
643 void action_toggle_shade(union ActionData
*data
)
646 client_shade(data
->client
.c
, !data
->client
.c
->shaded
);
649 void action_toggle_omnipresent(union ActionData
*data
)
652 client_set_desktop(data
->client
.c
,
653 data
->client
.c
->desktop
== DESKTOP_ALL
?
654 screen_desktop
: DESKTOP_ALL
, FALSE
);
657 void action_move_relative_horz(union ActionData
*data
)
659 Client
*c
= data
->relative
.c
;
661 client_configure(c
, Corner_TopLeft
,
662 c
->area
.x
+ data
->relative
.delta
, c
->area
.y
,
663 c
->area
.width
, c
->area
.height
, TRUE
, TRUE
);
666 void action_move_relative_vert(union ActionData
*data
)
668 Client
*c
= data
->relative
.c
;
670 client_configure(c
, Corner_TopLeft
,
671 c
->area
.x
, c
->area
.y
+ data
->relative
.delta
,
672 c
->area
.width
, c
->area
.height
, TRUE
, TRUE
);
675 void action_resize_relative_horz(union ActionData
*data
)
677 Client
*c
= data
->relative
.c
;
679 client_configure(c
, Corner_TopLeft
, c
->area
.x
, c
->area
.y
,
681 data
->relative
.delta
* c
->size_inc
.width
,
682 c
->area
.height
, TRUE
, TRUE
);
685 void action_resize_relative_vert(union ActionData
*data
)
687 Client
*c
= data
->relative
.c
;
689 client_configure(c
, Corner_TopLeft
, c
->area
.x
, c
->area
.y
,
690 c
->area
.width
, c
->area
.height
+
691 data
->relative
.delta
* c
->size_inc
.height
,
695 void action_maximize_full(union ActionData
*data
)
698 client_maximize(data
->client
.c
, TRUE
, 0, TRUE
);
701 void action_unmaximize_full(union ActionData
*data
)
704 client_maximize(data
->client
.c
, FALSE
, 0, TRUE
);
707 void action_toggle_maximize_full(union ActionData
*data
)
710 client_maximize(data
->client
.c
,
711 !(data
->client
.c
->max_horz
||
712 data
->client
.c
->max_vert
),
716 void action_maximize_horz(union ActionData
*data
)
719 client_maximize(data
->client
.c
, TRUE
, 1, TRUE
);
722 void action_unmaximize_horz(union ActionData
*data
)
725 client_maximize(data
->client
.c
, FALSE
, 1, TRUE
);
728 void action_toggle_maximize_horz(union ActionData
*data
)
731 client_maximize(data
->client
.c
, !data
->client
.c
->max_horz
, 1, TRUE
);
734 void action_maximize_vert(union ActionData
*data
)
737 client_maximize(data
->client
.c
, TRUE
, 2, TRUE
);
740 void action_unmaximize_vert(union ActionData
*data
)
743 client_maximize(data
->client
.c
, FALSE
, 2, TRUE
);
746 void action_toggle_maximize_vert(union ActionData
*data
)
749 client_maximize(data
->client
.c
, !data
->client
.c
->max_vert
, 2, TRUE
);
752 void action_send_to_desktop(union ActionData
*data
)
754 if (data
->sendto
.c
) {
755 if (data
->sendto
.desk
< screen_num_desktops
||
756 data
->sendto
.desk
== DESKTOP_ALL
) {
757 client_set_desktop(data
->desktop
.c
,
758 data
->sendto
.desk
, data
->sendto
.follow
);
759 if (data
->sendto
.follow
) screen_set_desktop(data
->sendto
.desk
);
764 void action_desktop(union ActionData
*data
)
766 if (data
->desktop
.desk
< screen_num_desktops
||
767 data
->desktop
.desk
== DESKTOP_ALL
)
768 screen_set_desktop(data
->desktop
.desk
);
771 static void cur_row_col(guint
*r
, guint
*c
)
773 switch (screen_desktop_layout
.orientation
) {
774 case Orientation_Horz
:
775 switch (screen_desktop_layout
.start_corner
) {
777 *r
= screen_desktop
/ screen_desktop_layout
.columns
;
778 *c
= screen_desktop
% screen_desktop_layout
.columns
;
780 case Corner_BottomLeft
:
781 *r
= screen_desktop_layout
.rows
- 1 -
782 screen_desktop
/ screen_desktop_layout
.columns
;
783 *c
= screen_desktop
% screen_desktop_layout
.columns
;
785 case Corner_TopRight
:
786 *r
= screen_desktop
/ screen_desktop_layout
.columns
;
787 *c
= screen_desktop_layout
.columns
- 1 -
788 screen_desktop
% screen_desktop_layout
.columns
;
790 case Corner_BottomRight
:
791 *r
= screen_desktop_layout
.rows
- 1 -
792 screen_desktop
/ screen_desktop_layout
.columns
;
793 *c
= screen_desktop_layout
.columns
- 1 -
794 screen_desktop
% screen_desktop_layout
.columns
;
798 case Orientation_Vert
:
799 switch (screen_desktop_layout
.start_corner
) {
801 *r
= screen_desktop
% screen_desktop_layout
.rows
;
802 *c
= screen_desktop
/ screen_desktop_layout
.rows
;
804 case Corner_BottomLeft
:
805 *r
= screen_desktop_layout
.rows
- 1 -
806 screen_desktop
% screen_desktop_layout
.rows
;
807 *c
= screen_desktop
/ screen_desktop_layout
.rows
;
809 case Corner_TopRight
:
810 *r
= screen_desktop
% screen_desktop_layout
.rows
;
811 *c
= screen_desktop_layout
.columns
- 1 -
812 screen_desktop
/ screen_desktop_layout
.rows
;
814 case Corner_BottomRight
:
815 *r
= screen_desktop_layout
.rows
- 1 -
816 screen_desktop
% screen_desktop_layout
.rows
;
817 *c
= screen_desktop_layout
.columns
- 1 -
818 screen_desktop
/ screen_desktop_layout
.rows
;
825 static guint
translate_row_col(guint r
, guint c
)
827 switch (screen_desktop_layout
.orientation
) {
828 case Orientation_Horz
:
829 switch (screen_desktop_layout
.start_corner
) {
831 return r
% screen_desktop_layout
.rows
*
832 screen_desktop_layout
.columns
+
833 c
% screen_desktop_layout
.columns
;
834 case Corner_BottomLeft
:
835 return (screen_desktop_layout
.rows
- 1 -
836 r
% screen_desktop_layout
.rows
) *
837 screen_desktop_layout
.columns
+
838 c
% screen_desktop_layout
.columns
;
839 case Corner_TopRight
:
840 return r
% screen_desktop_layout
.rows
*
841 screen_desktop_layout
.columns
+
842 (screen_desktop_layout
.columns
- 1 -
843 c
% screen_desktop_layout
.columns
);
844 case Corner_BottomRight
:
845 return (screen_desktop_layout
.rows
- 1 -
846 r
% screen_desktop_layout
.rows
) *
847 screen_desktop_layout
.columns
+
848 (screen_desktop_layout
.columns
- 1 -
849 c
% screen_desktop_layout
.columns
);
851 case Orientation_Vert
:
852 switch (screen_desktop_layout
.start_corner
) {
854 return c
% screen_desktop_layout
.columns
*
855 screen_desktop_layout
.rows
+
856 r
% screen_desktop_layout
.rows
;
857 case Corner_BottomLeft
:
858 return c
% screen_desktop_layout
.columns
*
859 screen_desktop_layout
.rows
+
860 (screen_desktop_layout
.rows
- 1 -
861 r
% screen_desktop_layout
.rows
);
862 case Corner_TopRight
:
863 return (screen_desktop_layout
.columns
- 1 -
864 c
% screen_desktop_layout
.columns
) *
865 screen_desktop_layout
.rows
+
866 r
% screen_desktop_layout
.rows
;
867 case Corner_BottomRight
:
868 return (screen_desktop_layout
.columns
- 1 -
869 c
% screen_desktop_layout
.columns
) *
870 screen_desktop_layout
.rows
+
871 (screen_desktop_layout
.rows
- 1 -
872 r
% screen_desktop_layout
.rows
);
875 g_assert_not_reached();
879 void action_desktop_right(union ActionData
*data
)
885 if (c
>= screen_desktop_layout
.columns
) {
886 if (!data
->desktopdir
.wrap
) return;
889 d
= translate_row_col(r
, c
);
890 if (d
>= screen_num_desktops
) {
891 if (!data
->desktopdir
.wrap
) return;
894 d
= translate_row_col(r
, c
);
895 if (d
< screen_num_desktops
)
896 screen_set_desktop(d
);
899 void action_send_to_desktop_right(union ActionData
*data
)
903 if (data
->sendtodir
.c
) {
906 if (c
>= screen_desktop_layout
.columns
) {
907 if (!data
->sendtodir
.wrap
) return;
910 d
= translate_row_col(r
, c
);
911 if (d
>= screen_num_desktops
) {
912 if (!data
->sendtodir
.wrap
) return;
915 d
= translate_row_col(r
, c
);
916 if (d
< screen_num_desktops
) {
917 client_set_desktop(data
->sendtodir
.c
, d
, data
->sendtodir
.follow
);
918 if (data
->sendtodir
.follow
) screen_set_desktop(d
);
923 void action_desktop_left(union ActionData
*data
)
929 if (c
>= screen_desktop_layout
.columns
) {
930 if (!data
->desktopdir
.wrap
) return;
931 c
= screen_desktop_layout
.columns
- 1;
933 d
= translate_row_col(r
, c
);
934 if (d
>= screen_num_desktops
) {
935 if (!data
->desktopdir
.wrap
) return;
938 d
= translate_row_col(r
, c
);
939 if (d
< screen_num_desktops
)
940 screen_set_desktop(d
);
943 void action_send_to_desktop_left(union ActionData
*data
)
947 if (data
->sendtodir
.c
) {
950 if (c
>= screen_desktop_layout
.columns
) {
951 if (!data
->sendtodir
.wrap
) return;
952 c
= screen_desktop_layout
.columns
- 1;
954 d
= translate_row_col(r
, c
);
955 if (d
>= screen_num_desktops
) {
956 if (!data
->sendtodir
.wrap
) return;
959 d
= translate_row_col(r
, c
);
960 if (d
< screen_num_desktops
) {
961 client_set_desktop(data
->sendtodir
.c
, d
, data
->sendtodir
.follow
);
962 if (data
->sendtodir
.follow
) screen_set_desktop(d
);
967 void action_desktop_down(union ActionData
*data
)
973 if (r
>= screen_desktop_layout
.rows
) {
974 if (!data
->desktopdir
.wrap
) return;
977 d
= translate_row_col(r
, c
);
978 if (d
>= screen_num_desktops
) {
979 if (!data
->desktopdir
.wrap
) return;
982 d
= translate_row_col(r
, c
);
983 if (d
< screen_num_desktops
)
984 screen_set_desktop(d
);
987 void action_send_to_desktop_down(union ActionData
*data
)
991 if (data
->sendtodir
.c
) {
994 if (r
>= screen_desktop_layout
.rows
) {
995 if (!data
->sendtodir
.wrap
) return;
998 d
= translate_row_col(r
, c
);
999 if (d
>= screen_num_desktops
) {
1000 if (!data
->sendtodir
.wrap
) return;
1003 d
= translate_row_col(r
, c
);
1004 if (d
< screen_num_desktops
) {
1005 client_set_desktop(data
->sendtodir
.c
, d
, data
->sendtodir
.follow
);
1006 if (data
->sendtodir
.follow
) screen_set_desktop(d
);
1011 void action_desktop_up(union ActionData
*data
)
1015 cur_row_col(&r
, &c
);
1017 if (r
>= screen_desktop_layout
.rows
) {
1018 if (!data
->desktopdir
.wrap
) return;
1019 r
= screen_desktop_layout
.rows
- 1;
1021 d
= translate_row_col(r
, c
);
1022 if (d
>= screen_num_desktops
) {
1023 if (!data
->desktopdir
.wrap
) return;
1026 d
= translate_row_col(r
, c
);
1027 if (d
< screen_num_desktops
)
1028 screen_set_desktop(d
);
1031 void action_send_to_desktop_up(union ActionData
*data
)
1035 if (data
->sendtodir
.c
) {
1036 cur_row_col(&r
, &c
);
1038 if (r
>= screen_desktop_layout
.rows
) {
1039 if (!data
->sendtodir
.wrap
) return;
1040 r
= screen_desktop_layout
.rows
- 1;
1042 d
= translate_row_col(r
, c
);
1043 if (d
>= screen_num_desktops
) {
1044 if (!data
->sendtodir
.wrap
) return;
1047 d
= translate_row_col(r
, c
);
1048 if (d
< screen_num_desktops
) {
1049 client_set_desktop(data
->sendtodir
.c
, d
, data
->sendtodir
.follow
);
1050 if (data
->sendtodir
.follow
) screen_set_desktop(d
);
1055 void action_toggle_decorations(union ActionData
*data
)
1057 Client
*c
= data
->client
.c
;;
1061 c
->disabled_decorations
= c
->disabled_decorations
? 0 : ~0;
1062 client_setup_decor_and_functions(c
);
1065 void action_moveresize(union ActionData
*data
)
1067 Client
*c
= data
->moveresize
.c
;
1069 if (!c
|| !client_normal(c
)) return;
1071 moveresize_start(c
, data
->moveresize
.x
, data
->moveresize
.y
,
1072 data
->moveresize
.button
, data
->moveresize
.corner
);
1075 void action_restart(union ActionData
*data
)
1077 ob_restart_path
= data
->execute
.path
;
1078 ob_shutdown
= ob_restart
= TRUE
;
1081 void action_exit(union ActionData
*data
)
1086 void action_showmenu(union ActionData
*data
)
1088 if (data
->showmenu
.name
) {
1089 menu_show(data
->showmenu
.name
, data
->showmenu
.x
, data
->showmenu
.y
,
1094 void action_cycle_windows(union ActionData
*data
)
1098 c
= focus_cycle(data
->cycle
.forward
, data
->cycle
.linear
, data
->cycle
.final
,
1099 data
->cycle
.cancel
);
1102 void action_directional_focus(union ActionData
*data
)
1106 if (!data
->diraction
.c
)
1108 if ((nf
= client_find_directional(data
->diraction
.c
,
1109 data
->diraction
.direction
)))
1110 client_activate(nf
);
1113 void action_movetoedge(union ActionData
*data
)
1116 Client
*c
= data
->diraction
.c
;
1120 x
= c
->frame
->area
.x
;
1121 y
= c
->frame
->area
.y
;
1123 h
= screen_area(c
->desktop
)->height
;
1124 w
= screen_area(c
->desktop
)->width
;
1125 switch(data
->diraction
.direction
) {
1126 case Direction_North
:
1129 case Direction_West
:
1132 case Direction_South
:
1133 y
= h
- c
->frame
->area
.height
;
1135 case Direction_East
:
1136 x
= w
- c
->frame
->area
.width
;
1139 frame_frame_gravity(c
->frame
, &x
, &y
);
1140 client_configure(c
, Corner_TopLeft
,
1141 x
, y
, c
->area
.width
, c
->area
.height
, TRUE
, TRUE
);
1145 void action_send_to_layer(union ActionData
*data
)
1148 client_set_layer(data
->layer
.c
, data
->layer
.layer
);
1151 void action_toggle_layer(union ActionData
*data
)
1153 Client
*c
= data
->layer
.c
;
1156 if (data
->layer
.layer
< 0)
1157 client_set_layer(c
, c
->below
? 0 : -1);
1158 else if (data
->layer
.layer
> 0)
1159 client_set_layer(c
, c
->above
? 0 : 1);
1163 void action_toggle_show_desktop(union ActionData
*data
)
1165 screen_show_desktop(!screen_showing_desktop
);
1168 void action_show_desktop(union ActionData
*data
)
1170 screen_show_desktop(TRUE
);
1173 void action_unshow_desktop(union ActionData
*data
)
1175 screen_show_desktop(FALSE
);