[Xfce4-commits] <xfwm4:master> Double-click on edges trigger window fill in any given direction
Olivier Fourdan
noreply at xfce.org
Wed Dec 15 19:04:02 CET 2010
Updating branch refs/heads/master
to 2d318ca398f68e87fae9cbed951d53a18e87746a (commit)
from a4a698d0884cda912962292a809b972d41e694e4 (commit)
commit 2d318ca398f68e87fae9cbed951d53a18e87746a
Author: Olivier Fourdan <fourdan at xfce.org>
Date: Sat Dec 11 17:36:30 2010 +0100
Double-click on edges trigger window fill in any given direction
src/events.c | 26 +++++++++++++++++++++++---
themes/default/bottom-active.xpm | 2 +-
themes/default/bottom-inactive.xpm | 2 +-
themes/default/bottom-left-active.xpm | 2 +-
themes/default/bottom-left-inactive.xpm | 2 +-
themes/default/bottom-right-active.xpm | 2 +-
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 bd34d13..7bd63ec 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 2c8592d..bc12e65 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 c8304d0..6066037 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 d89ae55..f5a0bf1 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 9fc1155..9c468d1 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 7098069..90b41d4 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 4caf408..7edfc35 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[] = {
" @",
"###############@",
"###############@",
-"@@@@@@@@@@@@@@@@",
+"###############@",
"@@@@@@@@@@@@@@@ "};
More information about the Xfce4-commits
mailing list