diff --git a/settings-dialogs/xfwm4-dialog.glade b/settings-dialogs/xfwm4-dialog.glade index d506222..1e8b9dd 100644 --- a/settings-dialogs/xfwm4-dialog.glade +++ b/settings-dialogs/xfwm4-dialog.glade @@ -305,6 +305,25 @@ + + True + True + True + Above + + + True + xfce-wm-above + + + + + False + False + 3 + + + True True @@ -320,7 +339,7 @@ False False - 3 + 4 @@ -339,7 +358,7 @@ False False - 4 + 5 @@ -358,7 +377,7 @@ False False - 5 + 6 diff --git a/src/client.c b/src/client.c index 4e86808..a45e404 100644 --- a/src/client.c +++ b/src/client.c @@ -3795,6 +3795,9 @@ clientButtonPress (Client *c, Window w, XButtonEvent * bev) case STICK_BUTTON: clientToggleSticky (c, TRUE); break; + case ABOVE_BUTTON: + clientToggleLayerAbove (c); + break; default: break; } @@ -3842,6 +3845,14 @@ clientGetButtonPixmap (Client *c, int button, int state) } return &screen_info->buttons[MAXIMIZE_BUTTON][state]; break; + case ABOVE_BUTTON: + if (FLAG_TEST (c->flags, CLIENT_FLAG_ABOVE) + && (!xfwmPixmapNone(&screen_info->buttons[ABOVE_BUTTON][state + STATE_TOGGLED]))) + { + return &screen_info->buttons[ABOVE_BUTTON][state + STATE_TOGGLED]; + } + return &screen_info->buttons[ABOVE_BUTTON][state]; + break; default: break; } diff --git a/src/display.h b/src/display.h index 8797237..436a46c 100644 --- a/src/display.h +++ b/src/display.h @@ -124,6 +124,7 @@ enum HIDE_BUTTON, MAXIMIZE_BUTTON, CLOSE_BUTTON, + ABOVE_BUTTON, TITLE_SEPARATOR, BUTTON_STRING_COUNT }; diff --git a/src/events.c b/src/events.c index 4b49171..df70c4e 100644 --- a/src/events.c +++ b/src/events.c @@ -73,7 +73,8 @@ (win == MYWINDOW_XWINDOW(c->buttons[CLOSE_BUTTON])) || \ (win == MYWINDOW_XWINDOW(c->buttons[MAXIMIZE_BUTTON])) || \ (win == MYWINDOW_XWINDOW(c->buttons[SHADE_BUTTON])) || \ - (win == MYWINDOW_XWINDOW(c->buttons[STICK_BUTTON]))) + (win == MYWINDOW_XWINDOW(c->buttons[STICK_BUTTON])) || \ + (win == MYWINDOW_XWINDOW(c->buttons[ABOVE_BUTTON]))) #define DOUBLE_CLICK_GRAB (ButtonMotionMask | \ PointerMotionMask | \ @@ -376,6 +377,7 @@ handleKeyPress (DisplayInfo *display_info, XKeyEvent * ev) break; case KEY_TOGGLE_ABOVE: clientToggleLayerAbove (c); + frameQueueDraw (c, FALSE); break; case KEY_TOGGLE_FULLSCREEN: clientToggleFullscreen (c); @@ -2426,9 +2428,11 @@ menu_callback (Menu * menu, MenuOp op, Window xid, gpointer menu_data, gpointer break; case MENU_OP_ABOVE: clientToggleLayerAbove (c); + frameQueueDraw (c, FALSE); break; case MENU_OP_NORMAL: clientSetLayerNormal (c); + frameQueueDraw (c, FALSE); break; case MENU_OP_BELOW: clientToggleLayerBelow (c); diff --git a/src/frame.c b/src/frame.c index 7f4cbd3..ec241f9 100644 --- a/src/frame.c +++ b/src/frame.c @@ -530,6 +530,13 @@ getButtonFromLetter (char chr, Client * c) b = MENU_BUTTON; } break; + case 'A': + if ((c->type & WINDOW_REGULAR_FOCUSABLE) && + !clientIsTransientOrModal (c)) + { + b = ABOVE_BUTTON; + } + break; case '|': b = TITLE_SEPARATOR; break; @@ -582,6 +589,13 @@ getLetterFromButton (int i, Client * c) chr = 'O'; } break; + case ABOVE_BUTTON: + if ((c->type & WINDOW_REGULAR_FOCUSABLE) && + !clientIsTransientOrModal (c)) + { + chr = 'A'; + } + break; default: chr = 0; } diff --git a/src/settings.c b/src/settings.c index 607bb7b..c52b8b2 100644 --- a/src/settings.c +++ b/src/settings.c @@ -325,7 +325,8 @@ loadTheme (ScreenInfo *screen_info, Settings *rc) "shade", "hide", "maximize", - "close" + "close", + "above" }; static const char *button_state_names[] = { diff --git a/themes/default/Makefile.am b/themes/default/Makefile.am index 3519467..aae1435 100644 --- a/themes/default/Makefile.am +++ b/themes/default/Makefile.am @@ -1,6 +1,14 @@ themedir = $(datadir)/themes/Default/xfwm4 PNG_FILES = \ + above-active.png \ + above-inactive.png \ + above-prelight.png \ + above-pressed.png \ + above-toggled-active.png \ + above-toggled-inactive.png \ + above-toggled-prelight.png \ + above-toggled-pressed.png \ bottom-active.png \ bottom-inactive.png \ bottom-left-active.png \ @@ -63,6 +71,14 @@ PNG_FILES = \ top-right-inactive.png SVG_FILES = \ + above-active.svg \ + above-inactive.svg \ + above-prelight.svg \ + above-pressed.svg \ + above-toggled-active.svg \ + above-toggled-inactive.svg \ + above-toggled-prelight.svg \ + above-toggled-pressed.svg \ bottom-active.svg \ bottom-inactive.svg \ bottom-left-active.svg \ @@ -125,6 +141,14 @@ SVG_FILES = \ top-right-inactive.svg XPM_FILES = \ + above-active.xpm \ + above-inactive.xpm \ + above-prelight.xpm \ + above-pressed.xpm \ + above-toggled-active.xpm \ + above-toggled-inactive.xpm \ + above-toggled-prelight.xpm \ + above-toggled-pressed.xpm \ bottom-active.xpm \ bottom-inactive.xpm \ bottom-left-active.xpm \ @@ -207,5 +231,5 @@ vacuum-defs: update-png: for svg_file in $(SVG_FILES); do \ image=$${svg_file%.svg}; \ - rsvg -f png $$svg_file $$image.png; \ + rsvg-convert -f png $$svg_file > $$image.png; \ done diff --git a/themes/default/above-active.png b/themes/default/above-active.png index e69de29..68473b4 100644 Binary files a/themes/default/above-active.png and b/themes/default/above-active.png differ diff --git a/themes/default/above-active.svg b/themes/default/above-active.svg index e69de29..48b155e 100644 --- a/themes/default/above-active.svg +++ b/themes/default/above-active.svg @@ -0,0 +1,214 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + Title + + + Olivier Fourdan + + + + + + + + + + + + + + + + + + + + + + + diff --git a/themes/default/above-active.xpm b/themes/default/above-active.xpm index e69de29..8fa8947 100644 --- a/themes/default/above-active.xpm +++ b/themes/default/above-active.xpm @@ -0,0 +1,27 @@ +/* XPM */ +static char * above_active_xpm[] = { +"18 22 2 1", +" c None", +"@ c #C0C0FF s active_color_1", +" ", +" ", +" ", +" ", +" @@@@@@@@@@@@@@@@ ", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +" @@@@@@@@@@@@@@@@ ", +" ", +" "}; diff --git a/themes/default/above-inactive.png b/themes/default/above-inactive.png index e69de29..6845ba5 100644 Binary files a/themes/default/above-inactive.png and b/themes/default/above-inactive.png differ diff --git a/themes/default/above-inactive.svg b/themes/default/above-inactive.svg index e69de29..bf5dc08 100644 --- a/themes/default/above-inactive.svg +++ b/themes/default/above-inactive.svg @@ -0,0 +1,207 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + Title + + + Olivier Fourdan + + + + + + + + + + + + + + + + + + + + + + diff --git a/themes/default/above-inactive.xpm b/themes/default/above-inactive.xpm index e69de29..32c3294 100644 --- a/themes/default/above-inactive.xpm +++ b/themes/default/above-inactive.xpm @@ -0,0 +1,27 @@ +/* XPM */ +static char * above_inactive_xpm[] = { +"18 22 2 1", +" c None", +"@ c #C0C0FF s inactive_color_1", +" ", +" ", +" ", +" ", +" @@@@@@@@@@@@@@@@ ", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +" @@@@@@@@@@@@@@@@ ", +" ", +" "}; diff --git a/themes/default/above-prelight.png b/themes/default/above-prelight.png index e69de29..d03cfc7 100644 Binary files a/themes/default/above-prelight.png and b/themes/default/above-prelight.png differ diff --git a/themes/default/above-prelight.svg b/themes/default/above-prelight.svg index e69de29..aac1254 100644 --- a/themes/default/above-prelight.svg +++ b/themes/default/above-prelight.svg @@ -0,0 +1,228 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + Title + + + Olivier Fourdan + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/themes/default/above-prelight.xpm b/themes/default/above-prelight.xpm index e69de29..8fa8947 100644 --- a/themes/default/above-prelight.xpm +++ b/themes/default/above-prelight.xpm @@ -0,0 +1,27 @@ +/* XPM */ +static char * above_active_xpm[] = { +"18 22 2 1", +" c None", +"@ c #C0C0FF s active_color_1", +" ", +" ", +" ", +" ", +" @@@@@@@@@@@@@@@@ ", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +" @@@@@@@@@@@@@@@@ ", +" ", +" "}; diff --git a/themes/default/above-pressed.png b/themes/default/above-pressed.png index e69de29..808b510 100644 Binary files a/themes/default/above-pressed.png and b/themes/default/above-pressed.png differ diff --git a/themes/default/above-pressed.svg b/themes/default/above-pressed.svg index e69de29..9f8eba2 100644 --- a/themes/default/above-pressed.svg +++ b/themes/default/above-pressed.svg @@ -0,0 +1,228 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + Title + + + Olivier Fourdan + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/themes/default/above-pressed.xpm b/themes/default/above-pressed.xpm index e69de29..8fa8947 100644 --- a/themes/default/above-pressed.xpm +++ b/themes/default/above-pressed.xpm @@ -0,0 +1,27 @@ +/* XPM */ +static char * above_active_xpm[] = { +"18 22 2 1", +" c None", +"@ c #C0C0FF s active_color_1", +" ", +" ", +" ", +" ", +" @@@@@@@@@@@@@@@@ ", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +" @@@@@@@@@@@@@@@@ ", +" ", +" "}; diff --git a/themes/default/above-toggled-active.png b/themes/default/above-toggled-active.png index e69de29..e3a455e 100644 Binary files a/themes/default/above-toggled-active.png and b/themes/default/above-toggled-active.png differ diff --git a/themes/default/above-toggled-active.svg b/themes/default/above-toggled-active.svg index e69de29..c41cc18 100644 --- a/themes/default/above-toggled-active.svg +++ b/themes/default/above-toggled-active.svg @@ -0,0 +1,221 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + Title + + + Olivier Fourdan + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/themes/default/above-toggled-active.xpm b/themes/default/above-toggled-active.xpm index e69de29..04434cd 100644 --- a/themes/default/above-toggled-active.xpm +++ b/themes/default/above-toggled-active.xpm @@ -0,0 +1,27 @@ +/* XPM */ +static char * above_toggled_active_xpm[] = { +"18 22 2 1", +" c None", +"@ c #C0C0FF s active_color_1", +" ", +" ", +" ", +" ", +" @@@@@@@@@@@@@@@@ ", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +" @@@@@@@@@@@@@@@@ ", +" ", +" "}; diff --git a/themes/default/above-toggled-inactive.png b/themes/default/above-toggled-inactive.png index e69de29..290b584 100644 Binary files a/themes/default/above-toggled-inactive.png and b/themes/default/above-toggled-inactive.png differ diff --git a/themes/default/above-toggled-inactive.svg b/themes/default/above-toggled-inactive.svg index e69de29..fb13641 100644 --- a/themes/default/above-toggled-inactive.svg +++ b/themes/default/above-toggled-inactive.svg @@ -0,0 +1,224 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + Title + + + Olivier Fourdan + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/themes/default/above-toggled-inactive.xpm b/themes/default/above-toggled-inactive.xpm index e69de29..9c94d64 100644 --- a/themes/default/above-toggled-inactive.xpm +++ b/themes/default/above-toggled-inactive.xpm @@ -0,0 +1,27 @@ +/* XPM */ +static char * above_toggled_inactive_xpm[] = { +"18 22 2 1", +" c None", +"@ c #C0C0FF s inactive_color_1", +" ", +" ", +" ", +" ", +" @@@@@@@@@@@@@@@@ ", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +" @@@@@@@@@@@@@@@@ ", +" ", +" "}; diff --git a/themes/default/above-toggled-prelight.png b/themes/default/above-toggled-prelight.png index e69de29..eea38a7 100644 Binary files a/themes/default/above-toggled-prelight.png and b/themes/default/above-toggled-prelight.png differ diff --git a/themes/default/above-toggled-prelight.svg b/themes/default/above-toggled-prelight.svg index e69de29..6ddfd9c 100644 --- a/themes/default/above-toggled-prelight.svg +++ b/themes/default/above-toggled-prelight.svg @@ -0,0 +1,235 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + Title + + + Olivier Fourdan + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/themes/default/above-toggled-prelight.xpm b/themes/default/above-toggled-prelight.xpm index e69de29..04434cd 100644 --- a/themes/default/above-toggled-prelight.xpm +++ b/themes/default/above-toggled-prelight.xpm @@ -0,0 +1,27 @@ +/* XPM */ +static char * above_toggled_active_xpm[] = { +"18 22 2 1", +" c None", +"@ c #C0C0FF s active_color_1", +" ", +" ", +" ", +" ", +" @@@@@@@@@@@@@@@@ ", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +" @@@@@@@@@@@@@@@@ ", +" ", +" "}; diff --git a/themes/default/above-toggled-pressed.png b/themes/default/above-toggled-pressed.png index e69de29..2ea6fb4 100644 Binary files a/themes/default/above-toggled-pressed.png and b/themes/default/above-toggled-pressed.png differ diff --git a/themes/default/above-toggled-pressed.svg b/themes/default/above-toggled-pressed.svg index e69de29..b8e393b 100644 --- a/themes/default/above-toggled-pressed.svg +++ b/themes/default/above-toggled-pressed.svg @@ -0,0 +1,235 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + Title + + + Olivier Fourdan + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/themes/default/above-toggled-pressed.xpm b/themes/default/above-toggled-pressed.xpm index e69de29..04434cd 100644 --- a/themes/default/above-toggled-pressed.xpm +++ b/themes/default/above-toggled-pressed.xpm @@ -0,0 +1,27 @@ +/* XPM */ +static char * above_toggled_active_xpm[] = { +"18 22 2 1", +" c None", +"@ c #C0C0FF s active_color_1", +" ", +" ", +" ", +" ", +" @@@@@@@@@@@@@@@@ ", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@", +" @@@@@@@@@@@@@@@@ ", +" ", +" "};