aboutsummaryrefslogtreecommitdiff
path: root/src/Window.cc
AgeCommit message (Collapse)AuthorFilesLines
2017-11-19Support 'vertical' Workspace warpingMark Murawski1-15/+51
'Vertical' Workspace warping is a variant of the existing Workspace warping feature: When a user drags a window to the edge of the Screen, the window is warped to the next / previous workspace. 'Vertical' Workspace warping detects a drag towards the upper / lower border of the screen and warps the current workspace about an 'offset'. Example given, lets say the user has 9 workspaces and considers them to form a 3x3 grid: +-+-+-+ |1|2|3| +-+-+-+ |4|5|6| +-+-+-+ |7|8|9| +-+-+-+ An 'offset' of 3 warps from workspaces 2 to workspace 5 (or 8), when a window is dragged to the bottom / top border. New configuration ressources: session.screenN.workspacewarpingvertical: true session.screenN.workspacewarpingverticaloffset: X
2016-11-20delay repositioning of labelsThomas Lübking1-0/+9
The iconbuttons delay their update to cover multiple changes, so if the labels are repositioned early, they'll operate on dated titles BUG: 1155 On the run, centralize the delay value in IconButton::updateLaziness()
2016-09-22"the least oversight", part #2Thomas Lübking1-0/+2
playing with the side borders I figured that clicking them (after ading them ;-) would freeze the pointer. In addition harden the menu-triggering paths for slit and toolbar. The menu will implicitly grba/release stuff, but in case it fails to show up .... better safe than sorry.
2016-09-21show tooltips for tabsThomas Lübking1-4/+12
on the run (yes sucks, sorry) fixes a bug where windows were not activated on hovering the tab (for focus-follows-mouse policies) REQUEST: 95 The iconbar already shows tooltips and I doubt the claim that (untabbed) titlebars are "often" too short for the window title.
2016-09-21allow to drag tabs to other workspacesThomas Lübking1-32/+16
We simply re-use the move code. The major pitfall is that we must not unmap the dragged window, since it holds a pointer grab (which will break by unmapping it, so we fail to continue or finish the tab drag) Instead, the window is always send to the current workspace and if detached, all other clients in the group are send back to their original desktop. REQUEST: 234
2016-09-03hide menus when clicking title or toolbarThomas Lübking1-1/+3
BUG: 1149
2016-09-03allow 4px deadzone for clicksThomas Lübking1-2/+11
For the shaky ones. Since this introduces a visible gap between trigger and move event, we temporarily manipulate the coordinates in the global last event what covers the outdated patch #134 REQUEST: 178
2016-09-01do not confine transients to desktop layerThomas Lübking1-2/+4
Originally patch #170 by gregor_b Desktop stype windows will typically have their config dialogs as transients. If those are confined to the desktop layer, they're stashed behind everything else, so we don't force them there. If the transient already is in the desktop layer otherwise it's a(nother) desktop, not a dialog, and belongs to that layer, there's no need to artificially raise it. It's entirely sufficient to leave these windows untouched.
2016-09-01delay mouse driven tab focus by autoraise intervalThomas Lübking1-1/+9
REQUEST: 190
2016-08-31re-use position sanitization for modal placementThomas Lübking1-5/+9
2016-08-30Relative aligmment when changing window headThomas Lübking1-2/+15
So far, altering the head would potentially move the window out of the workspace area (by moving a far right/bottom window from a HUUUUUGE to a small screen) This preserves edge alignments (w/ topleft preference), otherwise moves the window to it's relative topleft position on the new head (ie. if it was 10% left and 3% top into the screen, it will still be)
2016-08-27fix titlebar ClickN handlingThomas Lübking1-5/+9
the tabcontainer is usually true and the releases were only handled for the WINDOW context. This relies on the patch to control OnTitlebar ./. OnWindow ! BUG: 1073
2016-08-27Control OnTitlebar ./. OnWindowThomas Lübking1-6/+10
On concurrent shortcuts OnTitlebar implies OnWindow and was so far resolved to OnWindow while OnTitlebar is the more precise condition. This also requires to exclude buttons from the titlebar context, ie. pass the position to the getContext function on press events BUG: 1035 The patch depends on the patch to correctly resolve the tab under the mouse since we're now passing the actual subwindows around
2016-08-27handle oversized windowsThomas Lübking1-0/+19
Clients can still be stupid (feh constrains itself to the root window ...) or lazy (llpp uses the last size - if that was in pivot mode ...) and create windows which exceed the workspace dimensions, resulting in both opposing edges being off-screen (for all tested placements) This applies partial maximization instead and resizes the (restored) window to soem sane size (size constraints applied) CCBUG: 688 CCBUG: 984
2016-08-26XAllowEvent's for CurrentTimeThomas Lübking1-1/+1
ML confirms that be.time seems to be dated or junk and causes permanent freezes. Seen such myself but couldn't sufficiently reproduce to pin a culprit.
2016-08-26Improve stretching (RELATIVE) toolbar itemsThomas Lübking1-0/+1
The available space is distributed reg. the preferred width of items (spacers and the iconbar ;-) instead of evenly. The preferred width of the iconbar is calculated from its buttons. This allows to align the iconbar using spacers and makes better use of the available space
2016-07-30fix transient dialog placementThomas Lübking1-2/+2
dialogs can be bigger than the mainwindow and the unsigned dimensions then overflow in the subtraction (the window would still be moved into screen bounds but appear on ugly 0,0)
2016-07-30hide window before restoring the client on unmapsThomas Lübking1-0/+2
otherwise compositors will update the texture and operate on (fade) the frame instead of the client. Didn't test why this only happens on ARGBs, but could be the colormap installation. BUG: 1110
2016-07-03smart handling of NotifyUngrab crossing eventsThomas Lübking1-2/+11
closing a keyboard driven popup had the sideeffect to return the focus where the pointer is, regardless of whether that window had the focus before (due to a NotifyUngrab crossing event), bug #597 This was resolved by simply ignoring NotifyUngrab mode crossings, but that had the unfortunate sideeffects to break focus passing when the mouse was actually moved (in a DnD operation, 730) or the focus shall be passed on for strict mouse focus and a mouse triggered lower action (1012) So instead we record the window that was last entered by a *real* crossing and only ignore the NotifyUngrab event if this window didn't change. BUG: 1012 BUG: 730 CCBUG: 597
2016-07-01fix tabbing of unfocusable clientsThomas Lübking1-1/+4
this affects all java clients, because java uses the retarded WM_TAKE_FOCUS protocol, but also very important clients like xeyes ;-) BUG: 1055
2016-07-01do not leave stale oplock behindThomas Lübking1-1/+3
deiconify'ing a client on a different workspace left an oplock by a shortcut return, turning the client semi- to inaccessible BUG: 1010
2016-07-01do not move unfocused windows to the desktop layerThomas Lübking1-1/+2
While usually™ the window is just reset to its original layer, ensuring to show the active window is certainly a good idea, but it's not required to lower the fullscreen window to the desktop layer, the other windows layer + an extra raise is entirely sufficient and it's rather odd to see conky when activating a utility window to a video player ;-) CCBUG: 894
2016-07-01fix tab selection by mousepressThomas Lübking1-0/+16
Tabs outside the titlebar are not selectable by mouseclicks (ie. the feature does not work) The patch clones the enterNotifyEvent code and ignores (for now) the actual button (no idea whether it makes any sense to restrict it the left button?) BUG: 1103
2016-06-26merge remember focusnew into focusprotectionThomas Lübking1-6/+13
The FocusNewWindow key is still read, but not written and OVERRIDDEN in case of conflict with the FocusProtection key
2016-06-26Add FocusProtection featuresThomas Lübking1-1/+12
The apps file gets a new key FocusProtection supporting a comma separated list. * None : regular behavior * Lock : If this window has the focus, no other may claim it * Deny : This window is not allowed to focus itself I addition there's preparation for a follow-up patch to incorporate and substitute the present FocusNewWindow feature: * Gain : Pass focus to new window * Refuse : Do not pass focus to new window rationale: clients stealing the focus sucks badly and while there's an input driven timeout, that only protects actual typing flow, but if eg. vlc proceeds on the playlist, you'll suddenly control vlc instead of your browser (ie. typing ctrl+w doesn't close the tab, but the playlist ...)
2016-06-26fix tracking of MWM hints in case of removalThomas Lübking1-4/+8
2016-06-26prevent clients from positioning out of workspaceThomas Lübking1-6/+35
Still enough stupid ones around which ask for 0,0 (despite there's a panel ...) or restore a position on a VGA screen which they stored while being on a 4k screen. Otoh, do not forcefully position the window just because the topleft position is outside any head, this can still be desired and isn't a problem. Actually, the corner could be covered by the close button and if *only* it is onscreen the window can hardly by used or seen.
2016-04-06place transient centered on its parentThomas Lübking1-6/+9
so far, transients are simply unplaced, resulting in a static 0,0 position.
2016-01-04Add Resize SnapNephiel1-17/+109
Make windows snap to edges when resizing them, as well as when moving. From http://darkshed.net/files/patches/fluxbox/fluxbox-resize-snap-try2.diff
2015-02-07Create buttons for titlebar with proper sizesMathias Gumz1-147/+118
Instead of creating the titlebar buttons with a size of 10x10 pixels and rely on resizing later on we now pick the correct dimensions right on. This fixes also bug #1125 ("Detaching a window from a tab-group renders app-icon to 1/2"); the problem also occurred on restart. I took the chance to refactor a little bit.
2015-02-01CosmeticMathias Gumz1-10/+15
2015-01-22CosmeticMathias Gumz1-16/+4
2015-01-03Remove various unused variablesMathias Gumz1-6/+5
Clang and Gcc-4.9 complaint about some unused variables here and there. And who are we to not make a compiler happy :)
2014-09-29treat windows having WM_CLASS == "DockApp" like DockAppsMathias Gumz1-1/+4
this commit implements feature-request #317: "Add support for GTK dockapps.": "Back in 2010, WindowMaker implemented a system where windows with WM_CLASS res_class = DockApp would be treated as if they had initial_state = WithdrawnState, since GTK refuses to allow this."
2014-04-11merge Sami Kerola's new build-systemMathias Gumz1-8/+0
2014-02-19make sure that result of division is signed intAmadeusz Sławiński1-4/+6
there is problem that x/y ended with unsigned int value due to width()/height() and negative result of division ended up being big it causes Focus to move window due to screen boundary checks fixes annoying behaviour of window moving few pixels with Mod4 KP_8 :MacroCmd {ResizeTo 100% 50%} {MoveTo 0 0 Top} {Raise} {Focus}
2013-05-26build-sys: use AC_USE_SYSTEM_EXTENSIONSSami Kerola1-5/+0
The earlier _GNU_SOURCE definitions possibly did not take effect everywhere where it was intended.
2013-05-26build-sys: include config.h to all files using automakeSami Kerola1-3/+0
Do not try to be too smart which compilations need config.h, as most of them will simply because of the config.h has information about system capabilities.
2013-05-23more compact codeMathias Gumz1-19/+12
2013-05-23Use shared code, minor code simplificationMathias Gumz1-7/+5
2013-05-23fix initial window placement to allow proper head detection and window ↵Peter Hercek1-14/+21
placement based on apps file * a reasonable initial placement is important for later movements to different heads and correct head detection (required by apps file) * it did not work well in case when (0,0) was not near any head
2013-05-16Fix regression in rendering the Window-Motion-OutlineMathias Gumz1-4/+6
Commit 79fe2fca1de5140f538e68f6981b27cf7f917e7a checks for pending motion events and drops out of the FluxboxWindow::motionNotifyEvent() function early if so. When the user does not use the opaque window movement method an outline will be drawn to the screen. That outline was not cleaned correctly with commit 79..
2013-02-06Feature #3602124: 'LHalf' and 'RHalf' buttons to the titlebarMathias Gumz1-0/+27
First draft of feature request of #3602124: Having 2 buttons in the titlebar which allow quick positioning of a Window into the left or right half of the current monitor.
2013-01-26Calculates timeouts of ClockTool based upon System ClockMathias Gumz1-4/+4
Users expect time switches to happen upon system clock times. Calculating the timeout for the next refresh of the shown time via the monotonic clock is wrong: The monotonic clock yields values based upon some arbitrary point in time which might be off a little bit to the system clock, a 'full' minute of the monotonic clock might be in the midst of a system clock minute.
2013-01-10Reduced lagging begind of windows on slower displaysAymeric Vincent1-1/+7
In certain situations a speedy mouse might generate more move-events than fluxbox can handle: The event queue will fill up faster than the repositioning of the window is finished. The user will experience a window which lags behind the mouse cursor, aka the window-dance. We now check the next event in the queue and postpone the move a little bit so the queue does not fill up that fast.
2012-11-07Adds the OnTab keyword for the keys fileJulien Viard de Galbert1-53/+5
Adding the following lines to the keys file restore the old behaviour to use Mouse2 on tabs to start tabbing, and keep OnTitlebar Mouse2 to lower the window. OnTab Mouse2 :StartTabbing OnTab Move1 :StartMoving Note: Internal tabs are triggering both OnTab and OnTitlebar events.
2012-10-04minor cosmeticMathias Gumz1-8/+8
2012-10-04Add support for nearest corner or edge resizingMichael Abbott1-20/+46
2012-08-28changed timing functions to use a monotonic increasing clockMathias Gumz1-23/+11
gettimeofday() is subject to be changed on daylight-saving or to ntp-related (think leap-seconds). even worse, it is subject to be changed BACK in time. this is hard to fix correctly (see commit 45726d3016e and bug #3560509). it is irrelevant for timers to know the nano-seconds since the epoch anyways.
2012-08-22fix sanity check for transient and explicitly placed windowsPeter Hercek1-5/+9
When a screen has more heads and some part of the screen is not on any head and some window is placed into this invisible area then the window is invisible which sucks. This patch repositions such windows so that they are visible. Example: * head 1 is at (0,120) (size 640x480) * head 2 is at (480,0) (size 800x600) * whole screen virtual size is 1440x600 * that means rectangle from (0,0) to (640,120) is not visible on any head and any windows placed there would not be visible; for example wireshark likes to place dialog boxes at (0,0)