-static void cur_row_col(guint *r, guint *c)
-{
- switch (screen_desktop_layout.orientation) {
- case OB_ORIENTATION_HORZ:
- switch (screen_desktop_layout.start_corner) {
- case OB_CORNER_TOPLEFT:
- *r = screen_desktop / screen_desktop_layout.columns;
- *c = screen_desktop % screen_desktop_layout.columns;
- break;
- case OB_CORNER_BOTTOMLEFT:
- *r = screen_desktop_layout.rows - 1 -
- screen_desktop / screen_desktop_layout.columns;
- *c = screen_desktop % screen_desktop_layout.columns;
- break;
- case OB_CORNER_TOPRIGHT:
- *r = screen_desktop / screen_desktop_layout.columns;
- *c = screen_desktop_layout.columns - 1 -
- screen_desktop % screen_desktop_layout.columns;
- break;
- case OB_CORNER_BOTTOMRIGHT:
- *r = screen_desktop_layout.rows - 1 -
- screen_desktop / screen_desktop_layout.columns;
- *c = screen_desktop_layout.columns - 1 -
- screen_desktop % screen_desktop_layout.columns;
- break;
- }
- break;
- case OB_ORIENTATION_VERT:
- switch (screen_desktop_layout.start_corner) {
- case OB_CORNER_TOPLEFT:
- *r = screen_desktop % screen_desktop_layout.rows;
- *c = screen_desktop / screen_desktop_layout.rows;
- break;
- case OB_CORNER_BOTTOMLEFT:
- *r = screen_desktop_layout.rows - 1 -
- screen_desktop % screen_desktop_layout.rows;
- *c = screen_desktop / screen_desktop_layout.rows;
- break;
- case OB_CORNER_TOPRIGHT:
- *r = screen_desktop % screen_desktop_layout.rows;
- *c = screen_desktop_layout.columns - 1 -
- screen_desktop / screen_desktop_layout.rows;
- break;
- case OB_CORNER_BOTTOMRIGHT:
- *r = screen_desktop_layout.rows - 1 -
- screen_desktop % screen_desktop_layout.rows;
- *c = screen_desktop_layout.columns - 1 -
- screen_desktop / screen_desktop_layout.rows;
- break;
- }
- break;
- }
-}
-
-static guint translate_row_col(guint r, guint c)
-{
- switch (screen_desktop_layout.orientation) {
- case OB_ORIENTATION_HORZ:
- switch (screen_desktop_layout.start_corner) {
- case OB_CORNER_TOPLEFT:
- return r % screen_desktop_layout.rows *
- screen_desktop_layout.columns +
- c % screen_desktop_layout.columns;
- case OB_CORNER_BOTTOMLEFT:
- return (screen_desktop_layout.rows - 1 -
- r % screen_desktop_layout.rows) *
- screen_desktop_layout.columns +
- c % screen_desktop_layout.columns;
- case OB_CORNER_TOPRIGHT:
- return r % screen_desktop_layout.rows *
- screen_desktop_layout.columns +
- (screen_desktop_layout.columns - 1 -
- c % screen_desktop_layout.columns);
- case OB_CORNER_BOTTOMRIGHT:
- return (screen_desktop_layout.rows - 1 -
- r % screen_desktop_layout.rows) *
- screen_desktop_layout.columns +
- (screen_desktop_layout.columns - 1 -
- c % screen_desktop_layout.columns);
- }
- case OB_ORIENTATION_VERT:
- switch (screen_desktop_layout.start_corner) {
- case OB_CORNER_TOPLEFT:
- return c % screen_desktop_layout.columns *
- screen_desktop_layout.rows +
- r % screen_desktop_layout.rows;
- case OB_CORNER_BOTTOMLEFT:
- return c % screen_desktop_layout.columns *
- screen_desktop_layout.rows +
- (screen_desktop_layout.rows - 1 -
- r % screen_desktop_layout.rows);
- case OB_CORNER_TOPRIGHT:
- return (screen_desktop_layout.columns - 1 -
- c % screen_desktop_layout.columns) *
- screen_desktop_layout.rows +
- r % screen_desktop_layout.rows;
- case OB_CORNER_BOTTOMRIGHT:
- return (screen_desktop_layout.columns - 1 -
- c % screen_desktop_layout.columns) *
- screen_desktop_layout.rows +
- (screen_desktop_layout.rows - 1 -
- r % screen_desktop_layout.rows);
- }
- }
- g_assert_not_reached();
- return 0;
-}
-
-void action_desktop_right(union ActionData *data)