Issue #7 resolved
Anonymous created an issue

when i drag the maximized windows it stops dragging. I have to click and hold again to drag. It would be good if you fix this.

Comments (9)

  1. Amy Chan repo owner

    This is because dragging on a maximised window is meant to unmaximise it.

    When it gets unmaximised then the extension will redecorate it, which causes it to lose focus.

    I will have a look but I don't think it is possible to fix this - when the window manager redecorates the window it loses focus by definition because gnome-shell surrounds the decoration in an invisible window of its own.

  2. Petko Bordjukov


    The reason I am currently using the gnome3.4 branch is that it does not have this issue. It uses a different method (native to gnome 3.4) to hide the titlebar.

    If you are using Gnome >= 3.4 and a theme that is able to accommodate titlebar hiding (such as the default Adwaita) there should be no problems to use this branch instead of the default.

    Also, I would like to provide positive feedback regarding the 3.4 branch -- I've been using it for several months and it works flawlessly. I can only hope that its functionality will be merged into the main branch.

    Also, thank you @Amy Chan, for making my desktop make sense again :)

  3. Amy Chan repo owner

    Oh, you mean the version with `setHideTitlebar`? Be careful about updating your clone of the repo, I have probably dirtied up the `gnome3.4` branch and removed that (because some common themes like the Ubuntu ones Ambiance & Radiance don't support it, though Adwaita does, and also because people wanted the ability to undecorate half-maximized windows, which this wouldn't cover). That version is definitely the most stable though.

    Perhaps I should separate out that version into its own branch so that I don't accidentally overwrite it, in case people want to use it.

    Thanks for the feedback :)

  4. Evan Coury

    Unfortunately, using the set_hide_titlebar branch doesn't seem to resolve this for me as it did for Petko on gnome-shell 3.4.1 (Fedora 17).

    I wonder if there could be a work-around. For example, if there was a property available indicating that a "drag" was in process (or mouse button is down) at the moment the windows is un-maximized, perhaps it could (per a setting) wait to restore the window decoration until after the drag is complete, or something along those lines. Unfortunately I haven't had a chance to read up on the gnome-shell JS API's available to see if something like this is possible.

    I use alt+click to move windows around -- the loss of focus when moving a maximized window really interrupts my work-flow. :-(

  5. Petko Bordjukov

    Hello Evan,

    You need to checkout the set_hide_titlebar branch and apply the patch below. So far it's been working fine for me (on arch w/Gnome 3.6.2), except for an intermittent weirdness when I activate undecoration of half-maximized windows. I may or may not fork the extension and add an option for choosing which method of undecoration to use.. Kind of short on time though :)

    diff -r 8e28f621d251
    --- a/    Fri Jul 13 13:47:51 2012 +1000
    +++ b/    Thu Nov 29 14:09:17 2012 +0200
    @@ -285,12 +285,13 @@
         if( max != (Meta.MaximizeFlags.HORIZONTAL | Meta.MaximizeFlags.VERTICAL)) {
             // if we want decorations for partial maximization
             if (!undecorateHalfMaximised) {
    -            decorate(win);
    +            setHideTitlebar(win, true);
    +            /* decorate(win); */
    -    undecorate(win);
    +    setHideTitlebar(win, true);
    +    /* undecorate(win); */
     function onUnmaximise(shellwm, actor) {
    @@ -300,7 +301,8 @@
         if (!win._maximusDecoratedOriginal) {
    -    decorate(win);
    +    setHideTitlebar(win, false);
    +    /* decorate(win); */
  6. Amy Chan repo owner

    @Evan Coury that just might be possible in GNOME 3.4+ (wait until the end of dragging the window before redecorating) - gnome-shell has a 'grab-op-end' signal for this that I might be able to use.

    Perhaps I should take another look at the set_hide_titlebar branch and bring it up to speed rather than leaving it as a dead stub.

  7. Evan Coury

    Thanks Petko, that patch fixed it for me!

    @Amy Chan Perhaps even a simple checkbox setting labelled "Use 'hide titlebar' method" or something could work if you explain in the dialog that it may help resolve window dragging issues for those using the Adwaita theme, but is known not to work for users of Ubuntu's Ambiance and Radiance themes. It could be made even more user-friendly if the name of the active theme is available for a conditional check.

    Anyway, with the set_hide_titlebar branch and Petko's patch, I'm happy now. :-)

  8. Amy Chan repo owner

    Fixed in the default/3.4 branch (for all but GNOME 3.2 with the "non-alternate" method): windows now remain undecorated until the user "drops" the window.

    This prevents the redecoration from breaking the drag, causing the window to fall mid-drag.

  9. Log in to comment