discomfitor pushed a commit to branch master.

commit d236e2acece07d7dc611cc7ef1f52e77ceaac922
Author: Mike Blumenkrantz <[email protected]>
Date:   Fri Jul 26 12:50:28 2013 +0100

    bugfix: fileman double click auto-resizing now accounts for toolbar/sidebar 
and accounts for maximized state
    
    T208
---
 ChangeLog                    |  4 ++++
 NEWS                         |  1 +
 src/modules/fileman/e_fwin.c | 10 ++++++++--
 3 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index ce5f52e..b8a07e7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2013-07-26 Mike Blumenkrantz
+
+        * fixed bug where double clicking filemanager windows would not 
correctly autosize
+
 2013-06-20 Mike Blumenkrantz
 
         * udisks2 support
diff --git a/NEWS b/NEWS
index 8e51d7e..259e921 100644
--- a/NEWS
+++ b/NEWS
@@ -226,3 +226,4 @@ Fixes:
     * fixed bug where e widgets would not unset focus
     * fixed bug with filemanager setting path with too many spaces when opened 
from menu
     * fixed crash when multiple windows shared a remember
+    * fixed bug where double clicking filemanager windows would not correctly 
autosize
diff --git a/src/modules/fileman/e_fwin.c b/src/modules/fileman/e_fwin.c
index c823810..438ef0d 100644
--- a/src/modules/fileman/e_fwin.c
+++ b/src/modules/fileman/e_fwin.c
@@ -624,15 +624,21 @@ e_fwin_zone_find(E_Zone *zone)
 static void
 _e_fwin_bg_mouse_down(E_Fwin *fwin, Evas_Object *obj __UNUSED__, void *event 
__UNUSED__)
 {
-   int x, y, w, h, zx, zy, zw, zh;
+   int x, y, w, h, zx, zy, zw, zh, cx, cy, cw, ch;
+
+   if (fwin->win->border->maximized) e_border_unmaximize(fwin->win->border, 
fwin->win->border->maximized);
+   if (fwin->win->border->fullscreen) e_border_unfullscreen(fwin->win->border);
    e_zone_useful_geometry_get(fwin->win->border->zone, &zx, &zy, &zw, &zh);
    x = fwin->win->border->x, y = fwin->win->border->y;
    if (!e_fm2_optimal_size_calc(fwin->cur_page->fm_obj, zw - x, zh - y, &w, 
&h)) return;
+   evas_object_geometry_get(fwin->cur_page->fm_obj, &cx, &cy, &cw, &ch);
    if (x + w > zx + zw)
      w = zx + zw - x;
    if (y + x > zy + zh)
      h = zy + zh - y;
-   e_win_resize(fwin->win, w, h);
+   w = w + cx;
+   h = h + cx;
+   e_win_resize(fwin->win, MAX(w, 360), MAX(h, 250));
 }
 
 static E_Fwin *

-- 

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk

Reply via email to