[repo.or.cz] wmaker-crm.git branch next updated: wmaker-0.94.0-crm-305-ga750fe0

2011-03-30 Thread crmafra
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project wmaker-crm.git.

The branch, next has been updated
   via  a750fe03f424cf47e4f7aa462fd24e9b38c4d196 (commit)
  from  8fd4821155e19f5e659b05a756ac308fc052b323 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
http://repo.or.cz/w/wmaker-crm.git/commit/a750fe03f424cf47e4f7aa462fd24e9b38c4d196

commit a750fe03f424cf47e4f7aa462fd24e9b38c4d196
Author: Ambrus Szabo 
Date:   Wed Mar 30 00:06:18 2011 +0200

opaque resize

WPrefs:
 WindowHandling page: Mouse opaque resize
 Expert page: Opaque move and resize with keyboard

diff --git a/WPrefs.app/Expert.c b/WPrefs.app/Expert.c
index 5ef14a9..e86480d 100644
--- a/WPrefs.app/Expert.c
+++ b/WPrefs.app/Expert.c
@@ -31,7 +31,7 @@ typedef struct _Panel {
 
WMWidget *parent;
 
-   WMButton *swi[12];
+   WMButton *swi[13];
 
 } _Panel;
 
@@ -53,6 +53,7 @@ static void showData(_Panel * panel)
WMSetButtonSelected(panel->swi[9], GetBoolForKey("ShowClipTitle"));
WMSetButtonSelected(panel->swi[10], 
GetBoolForKey("BounceAppIconsWhenUrgent"));
WMSetButtonSelected(panel->swi[11], 
GetBoolForKey("RaiseAppIconsWhenBouncing"));
+   WMSetButtonSelected(panel->swi[12], 
GetBoolForKey("OpaqueMoveResizeKeyboard"));
 }
 
 static void createPanel(Panel * p)
@@ -95,6 +96,7 @@ static void createPanel(Panel * p)
WMSetButtonText(panel->swi[9], _("Show workspace title on Clip."));
WMSetButtonText(panel->swi[10], _("Bounce AppIcons when the application 
wants attention."));
WMSetButtonText(panel->swi[11], _("Raise AppIcons when bouncing."));
+   WMSetButtonText(panel->swi[12], _("Opaque Move,Resize with keyboard."));
 
/* If the item is default true, enable the button here */
WMSetButtonEnabled(panel->swi[6], True);
@@ -126,6 +128,7 @@ static void storeDefaults(_Panel * panel)
SetBoolForKey(WMGetButtonSelected(panel->swi[9]), "ShowClipTitle");
SetBoolForKey(WMGetButtonSelected(panel->swi[10]), 
"BounceAppIconsWhenUrgent");
SetBoolForKey(WMGetButtonSelected(panel->swi[11]), 
"RaiseAppIconsWhenBouncing");
+   SetBoolForKey(WMGetButtonSelected(panel->swi[12]), 
"OpaqueMoveResizeKeyboard");
 }
 
 Panel *InitExpert(WMScreen * scr, WMWidget * parent)
diff --git a/WPrefs.app/WindowHandling.c b/WPrefs.app/WindowHandling.c
index 39d2b7d..88b5fef 100644
--- a/WPrefs.app/WindowHandling.c
+++ b/WPrefs.app/WindowHandling.c
@@ -59,6 +59,8 @@ typedef struct _Panel {
WMFrame *opaqF;
WMButton *opaqB;
 
+   WMButton *opaqresizeB;
+
WMFrame *tranF;
WMButton *tranB;
 } _Panel;
@@ -69,6 +71,10 @@ typedef struct _Panel {
 
 #define NON_OPAQUE_MOVE_PIXMAP "nonopaque"
 
+#define OPAQUE_RESIZE_PIXMAP "opaqueresize"
+
+#define NON_OPAQUE_RESIZE_PIXMAP "noopaqueresize"
+
 #define THUMB_SIZE 16
 
 static char *placements[] = {
@@ -190,6 +196,8 @@ static void showData(_Panel * panel)
 
WMSetButtonSelected(panel->opaqB, GetBoolForKey("OpaqueMove"));
 
+   WMSetButtonSelected(panel->opaqresizeB, GetBoolForKey("OpaqueResize"));
+
WMSetButtonSelected(panel->miconB, GetBoolForKey("NoWindowOverIcons"));
 
WMSetButtonSelected(panel->mdockB, GetBoolForKey("NoWindowOverDock"));
@@ -208,6 +216,7 @@ static void storeData(_Panel * panel)
SetBoolForKey(WMGetButtonSelected(panel->miconB), "NoWindowOverIcons");
SetBoolForKey(WMGetButtonSelected(panel->mdockB), "NoWindowOverDock");
SetBoolForKey(WMGetButtonSelected(panel->opaqB), "OpaqueMove");
+   SetBoolForKey(WMGetButtonSelected(panel->opaqresizeB), "OpaqueResize");
SetBoolForKey(WMGetButtonSelected(panel->tranB), 
"OpenTransientOnOwnerWorkspace");
SetStringForKey(placements[WMGetPopUpButtonSelectedItem(panel->placP)], 
"WindowPlacement");
sprintf(x, "%i", WMGetSliderValue(panel->hsli));
@@ -317,19 +326,19 @@ static void createPanel(Panel * p)
 
WMMapSubwidgets(panel->placF);
 
-/** Opaque Move ***/
+/** Opaque Move, Resize ***/
panel->opaqF = WMCreateFrame(hbox);
WMMapWidget(panel->opaqF);
-   WMAddBoxSubview(hbox, WMWidgetView(panel->opaqF), False, True, 110, 0, 
0);
+   WMAddBoxSubview(hbox, WMWidgetView(panel->opaqF), False, True, 122, 0, 
0);
 
-   WMSetFrameTitle(panel->opaqF, _("Opaque Move"));
-   WMSetBalloonTextForView(_("Whether the window contents should be movedn"
- "when dragging windows aroung or if only an"
- "frame should be displayed.n"), 
WMWidgetView(panel->opaqF));
+   WMSetFrameTitle(panel->opaqF, _("Opaque

Re: [PATCH] opaque resize

2011-03-30 Thread Carlos R. Mafra
On Wed, 30 Mar 2011 at  0:20:32 +0200, Ambrus Szabo wrote:
> Subject: [PATCH] opaque resize
> 
> WPrefs:
>  WindowHandling page: Mouse opaque resize
>  Expert page: Opaque move and resize with keyboard
> ---
>  WPrefs.app/Expert.c |5 +-
>  WPrefs.app/WindowHandling.c |   54 +++-
>  WPrefs.app/tiff/Makefile.am |2 +
>  WPrefs.app/tiff/noopaqueresize.tiff |  Bin 0 -> 9522 bytes
>  WPrefs.app/tiff/opaqueresize.tiff   |  Bin 0 -> 9519 bytes
>  WPrefs.app/xpm/Makefile.am  |2 +
>  WPrefs.app/xpm/noopaqueresize.xpm   |  553 
> +++
>  WPrefs.app/xpm/opaqueresize.xpm |  549 ++
>  src/WindowMaker.h   |2 +
>  src/defaults.c  |4 +
>  src/moveres.c   |  136 ++---
>  11 files changed, 1254 insertions(+), 53 deletions(-)
>  create mode 100644 WPrefs.app/tiff/noopaqueresize.tiff
>  create mode 100644 WPrefs.app/tiff/opaqueresize.tiff
>  create mode 100644 WPrefs.app/xpm/noopaqueresize.xpm
>  create mode 100644 WPrefs.app/xpm/opaqueresize.xpm


Thanks a lot Ambrus! You even made some icons, nice!

I tested here and it looks like it's working as it
should.

I've just folded the small diff below and I'm going to
push the result to #next.


diff --git a/WPrefs.app/WindowHandling.c b/WPrefs.app/WindowHandling.c
index 027211d..88b5fef 100644
--- a/WPrefs.app/WindowHandling.c
+++ b/WPrefs.app/WindowHandling.c
@@ -332,9 +332,9 @@ static void createPanel(Panel * p)
WMAddBoxSubview(hbox, WMWidgetView(panel->opaqF), False, True, 122, 0, 
0);
 
WMSetFrameTitle(panel->opaqF, _("Opaque Move/Resize"));
-   WMSetBalloonTextForView(_("Whether the window contents should be 
moved/resize\n"
- "when dragging windows aroung or if only a\n"
- "frame should be displayed.\n"), 
WMWidgetView(panel->opaqF));
+   WMSetBalloonTextForView(_("Whether the window contents or only a frame 
should\n"
+ "be displayed during a move or resize.\n"),
+   WMWidgetView(panel->opaqF));
 
panel->opaqB = WMCreateButton(panel->opaqF, WBTToggle);
WMResizeWidget(panel->opaqB, 48,48);
diff --git a/src/moveres.c b/src/moveres.c
index 1b52522..c84deab 100644
--- a/src/moveres.c
+++ b/src/moveres.c
@@ -1464,13 +1464,9 @@ int wKeyboardMoveResizeWindow(WWindow * wwin)
showPosition(wwin, src_x + off_x, src_y + off_y);
 
if (opaqueMoveResize) {
-
XUngrabServer(dpy);
-
wwin->flags.user_changed_width = 1;
-
wWindowConfigure(wwin, src_x + off_x, 
src_y + off_y, ww, wh - vert_border);
-
};
 
if (done) {
@@ -2044,13 +2040,9 @@ void wMouseResizeWindow(WWindow * wwin, XEvent * ev)
showGeometry(wwin, fx, fy, fx + fw, fy 
+ fh, res);
}
if (opaqueResize) {
-
XUngrabServer(dpy);
-
wwin->flags.user_changed_width = 1;
-
moveGeometryDisplayCentered(scr, fx + 
fw / 2, fy + fh / 2);
-
wWindowConfigure(wwin, fx, fy, fw, fh - 
vert_border);
showGeometry(wwin, fx, fy, fx + fw, fy 
+ fh, res);
};


-- 
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.