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 [email protected].