[hackers] [wmii] Make fullscreen remember what mode the client came from.

From: sqweek <sqweek_AT_gmail.com>
Date: Sat Sep 29 10:53:19 2007

changeset: 2209:b28f243b2d7e
user: sqweek <sqweek_AT_gmail.com>
date: Sat Sep 29 02:45:11 2007 +0800
summary: Make fullscreen remember what mode the client came from.

diff -r c5d16dc9b2b6 -r b28f243b2d7e cmd/wmii/client.c
--- a/cmd/wmii/client.c Sat Sep 29 01:08:57 2007 +0800
+++ b/cmd/wmii/client.c Sat Sep 29 02:45:11 2007 +0800
@@ -447,6 +447,10 @@ fullscreen(Client *c, int fullscreen) {
 
         if((f = c->sel)) {
                 if(fullscreen) {
+ /* we lose information here if the client was just moved to
+ * the floating area, but it's worth it */
+ c->revert = f->area;
+
                         if(f->area->floating)
                                 f->revert = f->r;
                         else {
@@ -454,8 +458,13 @@ fullscreen(Client *c, int fullscreen) {
                                 send_to_area(f->view->area, f);
                         }
                         focus_client(c);
- }else
+ }else {
                         resize_frame(f, f->revert);
+ if (c->revert) {
+ send_to_area(c->revert, f);
+ c->revert = nil;
+ }
+ }
                 if(f->view == screen->sel)
                         focus_view(screen, f->view);
         }
Received on Sat Sep 29 2007 - 10:53:19 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:58:22 UTC