Page 4 of 6 FirstFirst ... 23456 LastLast
Results 31 to 40 of 53

Thread: HOW-TO: Build Unity with 'Dodge Windows' and minimize/unminimize behavior

  1. #31
    Join Date
    Apr 2007
    Location
    Texas, USA
    Beans
    809
    Distro
    Kubuntu 12.10 Quantal Quetzal

    Re: HOW-TO: Build Unity with 'Dodge Windows' and minimize/unminimize behavior

    Quote Originally Posted by nilarimogard View Post
    Like jsevi83 said above, it seems there's a bug with minimize when there's more than one window for the same application (but minimize with a single window works fine for me). This is how it's supposed to work:

    1. If there is no opened window for that app
    1.a. Open a new window
    2. If there is only one opened window for that app
    2.a. Focus the window, if not focused
    2.b. Minimize the window
    2.c. Restore the window
    2.d. Goto 2.a
    3. If there is more than one opened window for that app
    3.a. Focus the latest used window, if not focused
    3.b. Open spread view
    3.c. Close spread view and minimize all windows of that app
    3.d. Restore the latest used window
    3.e. Goto 3.a

    But step 3.c doesn't... it just opens the spread view but doesn't minimize the app.
    I've fixed the behavior to act like you described. While it works, the bug discussed earlier in this thread (blank after unminimizing) is very noticeable.

    However, the behavior now works like this:

    Multiple windows are opened -> Spread occurs on-click -> All windows are minimized on-click -> Last windows in focus will appear individually on-click.

    For now, until the 'blank window issue' is fixed upstream, I'll leave the current behavior as is. However, I'll push the changes to my Github so you can pull them if you want.
    Laptop: [AMD Vision A4-3300M | 8GB RAM | ATI Radeon 6480G | Ubuntu 12.04 64-bit]

    Studio Box: [AMD Athlon 64 X2 5000+ | 4GB RAM | Nvidia 210 | M-Audio FastTrackPro | KXStudio 11.04 64-bit | 2.6.31-rt14-custom | KDE 4.6.5]

  2. #32
    Join Date
    Jun 2007
    Beans
    12,909

    Re: HOW-TO: Build Unity with 'Dodge Windows' and minimize/unminimize behavior

    Filed the other day on the blank windows, actually many ways to cause
    https://bugs.launchpad.net/ubuntu/+s...ty/+bug/990867

    Edit: I noticed in BamfLauncherIcon.cpp you changed windows to windowList in 2(?) places, wondering why?
    Last edited by mc4man; May 1st, 2012 at 03:42 AM.

  3. #33
    Join Date
    Nov 2008
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: HOW-TO: Build Unity with 'Dodge Windows' and minimize/unminimize behavior

    The spread windows behaviour and minimize on click is not working when there is only one workspace set in compiz preferences. When two or more worspaces are set it works perfectly. I don't know if that is a bug or if there is a reason why it happens.

  4. #34
    Join Date
    Apr 2007
    Location
    Texas, USA
    Beans
    809
    Distro
    Kubuntu 12.10 Quantal Quetzal

    Re: HOW-TO: Build Unity with 'Dodge Windows' and minimize/unminimize behavior

    Quote Originally Posted by mc4man View Post
    Filed the other day on the blank windows, actually many ways to cause
    https://bugs.launchpad.net/ubuntu/+s...ty/+bug/990867

    Edit: I noticed in BamfLauncherIcon.cpp you changed windows to windowList in 2(?) places, wondering why?
    I'll admit, I'm not the strongest C++ programmer. Where should I put the windowList variable? Is there something wrong with the way I'm using the vector?

    FWIW, I basically just went along with what ojno did for the original patch.
    Last edited by isaacj87; May 1st, 2012 at 05:45 AM.
    Laptop: [AMD Vision A4-3300M | 8GB RAM | ATI Radeon 6480G | Ubuntu 12.04 64-bit]

    Studio Box: [AMD Athlon 64 X2 5000+ | 4GB RAM | Nvidia 210 | M-Audio FastTrackPro | KXStudio 11.04 64-bit | 2.6.31-rt14-custom | KDE 4.6.5]

  5. #35
    Join Date
    Apr 2009
    Beans
    862

    Re: HOW-TO: Build Unity with 'Dodge Windows' and minimize/unminimize behavior

    Just wondering if you would be willing to implement the patch/hack submitted in this mailing list discussion? https://lists.launchpad.net/unity-design/msg09055.html

    If it wouldn't create more headaches, of course

    And this is the patch itself:
    Code:
    === modified file 'plugins/unityshell/src/PanelMenuView.cpp'
    --- plugins/unityshell/src/PanelMenuView.cpp	2012-04-11 00:37:25 +0000
    +++ plugins/unityshell/src/PanelMenuView.cpp	2012-04-15 14:43:24 +0000
    @@ -352,6 +352,7 @@
     
     bool PanelMenuView::DrawWindowButtons() const
     {
    +
       auto wm = WindowManager::Default();
       bool screen_grabbed = (wm->IsExpoActive() || wm->IsScaleActive());
     
    @@ -361,10 +362,7 @@
       if (_we_control_active && _is_maximized && !screen_grabbed &&
           !_launcher_keynav && !_switcher_showing)
       {
    -    if (_is_inside || _show_now_activated || _new_application)
    -    {
    -      return true;
    -    }
    +    return true;
       }
     
       return false;
    @@ -528,8 +526,7 @@
         {
           double title_opacity = 0.0f;
     
    -      if (_we_control_active && _window_buttons->GetOpacity() == 0.0 &&
    -          (!has_menu || (has_menu && GetOpacity() == 0.0)))
    +      if (_we_control_active && (!has_menu || (has_menu && GetOpacity() == 0.0)))
           {
             title_opacity = 1.0f;
           }
    @@ -538,11 +535,11 @@
             title_opacity = 1.0f;
     
             if (has_menu)
    -          title_opacity -= MAX(GetOpacity(), _window_buttons->GetOpacity());
    +          title_opacity -= MAX(GetOpacity(), GetOpacity());
             else
    -          title_opacity -= _window_buttons->GetOpacity();
    +          title_opacity -= GetOpacity();
     
    -        if (!draw_window_buttons && !draw_menus)
    +        if (!draw_menus)
             {
               // If we're fading-out the buttons/menus, let's fade-in quickly the title
               title_opacity = CLAMP(title_opacity + 0.1f, 0.0f, 1.0f);
    @@ -720,6 +717,9 @@
       int x = MAIN_LEFT_PADDING + TITLE_PADDING + geo.x;
       int y = geo.y;
     
    +  if (DrawWindowButtons())
    +    x += _window_buttons->GetContentWidth();
    +
       int text_width = 0;
       int text_height = 0;
       int text_space = 0;
    It makes the close buttons visible on the menubar always with the window title so only the menu itself is hidden til mouseover.
    Last edited by x-shaney-x; May 1st, 2012 at 10:20 AM.

  6. #36
    Join Date
    Apr 2007
    Location
    Texas, USA
    Beans
    809
    Distro
    Kubuntu 12.10 Quantal Quetzal

    Re: HOW-TO: Build Unity with 'Dodge Windows' and minimize/unminimize behavior

    Quote Originally Posted by x-shaney-x View Post
    Just wondering if you would be willing to implement the patch/hack submitted in this mailing list discussion? https://lists.launchpad.net/unity-design/msg09055.html

    If it wouldn't create more headaches, of course

    It makes the close buttons visible on the menubar always with the window title so only the menu itself is hidden til mouseover.
    I like it, and for the most part, it works pretty well. Unfortunately, the patch seems to have an overlapping issue. Check out the attached screenshot.
    Attached Images Attached Images
    Laptop: [AMD Vision A4-3300M | 8GB RAM | ATI Radeon 6480G | Ubuntu 12.04 64-bit]

    Studio Box: [AMD Athlon 64 X2 5000+ | 4GB RAM | Nvidia 210 | M-Audio FastTrackPro | KXStudio 11.04 64-bit | 2.6.31-rt14-custom | KDE 4.6.5]

  7. #37
    Join Date
    Apr 2009
    Beans
    862

    Re: HOW-TO: Build Unity with 'Dodge Windows' and minimize/unminimize behavior

    Aw that's a shame. Maybe something changed in unity since the patch was submitted?

  8. #38
    Join Date
    Apr 2007
    Location
    Texas, USA
    Beans
    809
    Distro
    Kubuntu 12.10 Quantal Quetzal

    Re: HOW-TO: Build Unity with 'Dodge Windows' and minimize/unminimize behavior

    Quote Originally Posted by x-shaney-x View Post
    Aw that's a shame. Maybe something changed in unity since the patch was submitted?
    From what I can tell, it looks like the dodge window behavior seems to screw it up. It's something about launcher position that tells where the window controls should be at any given time.

    With the "official" launcher hide behavior (never and auto-hide), the patch probably works just fine.
    Laptop: [AMD Vision A4-3300M | 8GB RAM | ATI Radeon 6480G | Ubuntu 12.04 64-bit]

    Studio Box: [AMD Athlon 64 X2 5000+ | 4GB RAM | Nvidia 210 | M-Audio FastTrackPro | KXStudio 11.04 64-bit | 2.6.31-rt14-custom | KDE 4.6.5]

  9. #39
    Join Date
    Apr 2009
    Beans
    862

    Re: HOW-TO: Build Unity with 'Dodge Windows' and minimize/unminimize behavior

    Yes, that does make sense.
    I may have a poke around with it when I get some time and experiment.
    See if I can find the bit that deals with placement and see if I can alter it to keep a constant position.

  10. #40
    Join Date
    May 2012
    Beans
    2

    Re: HOW-TO: Build Unity with 'Dodge Windows' and minimize/unminimize behavior

    This is really great! It brought back my interest in life

    But what will happen when Unity team will release an update or a new version?
    And what will happen if only patch is installed from GIT?

Page 4 of 6 FirstFirst ... 23456 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •