franglais125 / no-title-bar

Integrates maximized windows with the top panel
https://extensions.gnome.org/extension/1267/no-title-bar/
GNU General Public License v2.0
279 stars 40 forks source link

Can only drag window using gnomes top bar if window is active #26

Open Deus-Rex opened 6 years ago

Deus-Rex commented 6 years ago

My setup has multiple monitors, so rearranging maximised windows is quite frequent. An issue I have come across with this extension, is that I can't drag a window using the Gnome top bar, unless the window in question is active.

franglais125 commented 6 years ago

Yeah, this is something I have experienced first hand. I'll try to look into it!

franglais125 commented 6 years ago

Could you give this branch a try? While it seems to be working for me, I'd love to get some more feedback before including this in master.

https://github.com/franglais125/no-title-bar/tree/dragOnPanel

Deus-Rex commented 6 years ago

It works perfect if the window that has focus isn't maximised. So for single screen workspaces, I believe this patch is successful and worth merging.

However, if you have two screens, and your focused window is maximised on second screen, then you try to drag the primary monitors maximised application using the topbar, then it will not work.

I also tested having two applications taking half of the screen each on a single monitor. Dragging the inactive window doesn't work with this scenario. This is never something I'd do nor care much for or need, just bringing it to attention. I'd guess that this would be tricky to have a solution for, though I'm not aware of what Gnome exposes, or what tricks you could do. A hacky method could be to detect split windows then capture mouse position? Mouse position being at either half of the screen will indicate which window is being selected, I reckon.

Overall, this is great and I thank you for this. While it doesn't completely fulfil my needs, I am sure it is still perfect for many that will appreciate it also. It works well otherwise.

franglais125 commented 6 years ago

However, if you have two screens, and your focused window is maximised on second screen, then you try to drag the primary monitors maximised application using the topbar, then it will not work.

Ah, good point! Thanks for pointing this out :). This is the very reason I need testers, I'll see what i can do.

I also tested having two applications taking half of the screen each on a single monitor. Dragging the inactive window doesn't work with this scenario. This is never something I'd do nor care much for or need, just bringing it to attention. I'd guess that this would be tricky to have a solution for, though I'm not aware of what Gnome exposes, or what tricks you could do. A hacky method could be to detect split windows then capture mouse position? Mouse position being at either half of the screen will indicate which window is being selected, I reckon.

This is something that I did consider, but it would be rather messy to have, as you guessed. I'd rather have the inconvenience of being able to drag only the (snapped) focused window, than introduce a convoluted logic that will inevitably end up introducing bugs.

Anyway, thanks a lot for the attention to detail. I'll try to improve on this! If someone comes up with patches, that's for sure welcomed.