layout: Fix input to non-active window in column
Browse files at this commit18e29d002845f2df8dae7dd03e3688c427f7d303Parent: 934183e1 changed file +6 -5
- src/layout.rs +6 -5
src/layout.rsmodified+6 -5
| @@ -1584,9 +1584,9 @@ impl<W: LayoutElement> Workspace<W> { | |||
| 1584 | let mut y = PADDING; | 1584 | let mut y = PADDING; |
| 1585 | 1585 | ||
| 1586 | for win in &col.windows { | 1586 | for win in &col.windows { |
| 1587 | - if win != active_win { | 1587 | + let geom = win.geometry(); |
| 1588 | - let geom = win.geometry(); | ||
| 1589 | 1588 | ||
| 1589 | + if win != active_win { | ||
| 1590 | // x, y point at the top-left of the window geometry. | 1590 | // x, y point at the top-left of the window geometry. |
| 1591 | let mut win_pos = Point::from((x, y)) - geom.loc; | 1591 | let mut win_pos = Point::from((x, y)) - geom.loc; |
| 1592 | if col.is_fullscreen { | 1592 | if col.is_fullscreen { |
| @@ -1718,9 +1718,9 @@ impl Workspace<Window> { | |||
| 1718 | let mut y = PADDING; | 1718 | let mut y = PADDING; |
| 1719 | 1719 | ||
| 1720 | for win in &col.windows { | 1720 | for win in &col.windows { |
| 1721 | - if win != active_win { | 1721 | + let geom = win.geometry(); |
| 1722 | - let geom = win.geometry(); | ||
| 1723 | 1722 | ||
| 1723 | + if win != active_win { | ||
| 1724 | let mut win_pos = Point::from((x - view_pos, y)) - geom.loc; | 1724 | let mut win_pos = Point::from((x - view_pos, y)) - geom.loc; |
| 1725 | if col.is_fullscreen { | 1725 | if col.is_fullscreen { |
| 1726 | // FIXME: fullscreen windows are missing left padding | 1726 | // FIXME: fullscreen windows are missing left padding |
| @@ -1735,7 +1735,8 @@ impl Workspace<Window> { | |||
| 1735 | 1., | 1735 | 1., |
| 1736 | )); | 1736 | )); |
| 1737 | } | 1737 | } |
| 1738 | - y += win.geometry().size.h + PADDING; | 1738 | + |
| 1739 | + y += geom.size.h + PADDING; | ||
| 1739 | } | 1740 | } |
| 1740 | 1741 | ||
| 1741 | x += col.size().w + PADDING; | 1742 | x += col.size().w + PADDING; |