diff options
author | Olivier Fourdan <fourdan@xfce.org> | 2010-12-11 17:36:30 +0100 |
---|---|---|
committer | Olivier Fourdan <fourdan@xfce.org> | 2010-12-15 14:57:18 +0100 |
commit | 2d318ca398f68e87fae9cbed951d53a18e87746a (patch) | |
tree | 596704e08b7f609086ea4733abec7100dd4d9477 | |
parent | a4a698d0884cda912962292a809b972d41e694e4 (diff) | |
download | xfwm4-2d318ca398f68e87fae9cbed951d53a18e87746a.tar.gz |
Double-click on edges trigger window fill in any given direction
-rw-r--r-- | src/events.c | 26 | ||||
-rw-r--r-- | themes/default/bottom-active.xpm | 2 | ||||
-rw-r--r-- | themes/default/bottom-inactive.xpm | 2 | ||||
-rw-r--r-- | themes/default/bottom-left-active.xpm | 2 | ||||
-rw-r--r-- | themes/default/bottom-left-inactive.xpm | 2 | ||||
-rw-r--r-- | themes/default/bottom-right-active.xpm | 2 | ||||
-rw-r--r-- | themes/default/bottom-right-inactive.xpm | 2 |
7 files changed, 29 insertions, 9 deletions
diff --git a/src/events.c b/src/events.c index bd34d138e..7bd63ece2 100644 --- a/src/events.c +++ b/src/events.c @@ -542,6 +542,7 @@ static void edgeButton (Client * c, int part, XButtonEvent * ev) { ScreenInfo *screen_info; + XfwmButtonClickType tclick; guint state; screen_info = c->screen_info; @@ -549,8 +550,6 @@ edgeButton (Client * c, int part, XButtonEvent * ev) if (ev->button == Button2) { - XfwmButtonClickType tclick; - tclick = typeOfClick (screen_info, c->window, (XEvent *) ev, FALSE); if (tclick == XFWM_BUTTON_CLICK) { @@ -572,7 +571,28 @@ edgeButton (Client * c, int part, XButtonEvent * ev) } clientRaise (c, None); } - clientResize (c, part, (XEvent *) ev); + tclick = typeOfClick (screen_info, c->window, (XEvent *) ev, TRUE); + if (tclick == XFWM_BUTTON_DOUBLE_CLICK) + { + switch (part) + { + case CORNER_COUNT + SIDE_LEFT: + case CORNER_COUNT + SIDE_RIGHT: + clientFill(c, CLIENT_FILL_HORIZ); + break; + case CORNER_COUNT + SIDE_TOP: + case CORNER_COUNT + SIDE_BOTTOM: + clientFill(c, CLIENT_FILL_VERT); + break; + default: + clientFill(c, CLIENT_FILL); + break; + } + } + else if (tclick != XFWM_BUTTON_UNDEFINED) + { + clientResize (c, part, (XEvent *) ev); + } } } diff --git a/themes/default/bottom-active.xpm b/themes/default/bottom-active.xpm index 2c8592dc8..bc12e652c 100644 --- a/themes/default/bottom-active.xpm +++ b/themes/default/bottom-active.xpm @@ -6,5 +6,5 @@ static char * bottom_active_xpm[] = { "@ c #C0C0FF s active_color_1", "########################", "########################", -"@@@@@@@@@@@@@@@@@@@@@@@@", +"########################", "@@@@@@@@@@@@@@@@@@@@@@@@"}; diff --git a/themes/default/bottom-inactive.xpm b/themes/default/bottom-inactive.xpm index c8304d03c..60660379f 100644 --- a/themes/default/bottom-inactive.xpm +++ b/themes/default/bottom-inactive.xpm @@ -6,5 +6,5 @@ static char * bottom_inactive_xpm[] = { "@ c #C0C0FF s inactive_color_1", "########################", "########################", -"@@@@@@@@@@@@@@@@@@@@@@@@", +"########################", "@@@@@@@@@@@@@@@@@@@@@@@@"}; diff --git a/themes/default/bottom-left-active.xpm b/themes/default/bottom-left-active.xpm index d89ae55a7..f5a0bf1a8 100644 --- a/themes/default/bottom-left-active.xpm +++ b/themes/default/bottom-left-active.xpm @@ -18,5 +18,5 @@ static char * bottom_left_active_xpm[] = { "@ ", "@###############", "@###############", -"@@@@@@@@@@@@@@@@", +"@###############", " @@@@@@@@@@@@@@@"}; diff --git a/themes/default/bottom-left-inactive.xpm b/themes/default/bottom-left-inactive.xpm index 9fc115547..9c468d141 100644 --- a/themes/default/bottom-left-inactive.xpm +++ b/themes/default/bottom-left-inactive.xpm @@ -18,5 +18,5 @@ static char * bottom_left_inactive_xpm[] = { "@ ", "@###############", "@###############", -"@@@@@@@@@@@@@@@@", +"@###############", " @@@@@@@@@@@@@@@"}; diff --git a/themes/default/bottom-right-active.xpm b/themes/default/bottom-right-active.xpm index 7098069ff..90b41d47a 100644 --- a/themes/default/bottom-right-active.xpm +++ b/themes/default/bottom-right-active.xpm @@ -18,5 +18,5 @@ static char * bottom_right_active_xpm[] = { " @", "###############@", "###############@", -"@@@@@@@@@@@@@@@@", +"###############@", "@@@@@@@@@@@@@@@ "}; diff --git a/themes/default/bottom-right-inactive.xpm b/themes/default/bottom-right-inactive.xpm index 4caf40834..7edfc3559 100644 --- a/themes/default/bottom-right-inactive.xpm +++ b/themes/default/bottom-right-inactive.xpm @@ -18,5 +18,5 @@ static char * bottom_right_inactive_xpm[] = { " @", "###############@", "###############@", -"@@@@@@@@@@@@@@@@", +"###############@", "@@@@@@@@@@@@@@@ "}; |