Merge pull request #3809 from xzfc/3606-floating-xterm
Fix regression: floating xterm created partially off screen
This commit is contained in:
commit
d22f0342b2
|
@ -371,6 +371,7 @@ void floating_enable(Con *con, bool automatic) {
|
||||||
if (nc->rect.x == 0 && nc->rect.y == 0) {
|
if (nc->rect.x == 0 && nc->rect.y == 0) {
|
||||||
Con *leader;
|
Con *leader;
|
||||||
if (con->window && con->window->leader != XCB_NONE &&
|
if (con->window && con->window->leader != XCB_NONE &&
|
||||||
|
con->window->id != con->window->leader &&
|
||||||
(leader = con_by_window_id(con->window->leader)) != NULL) {
|
(leader = con_by_window_id(con->window->leader)) != NULL) {
|
||||||
DLOG("Centering above leader\n");
|
DLOG("Centering above leader\n");
|
||||||
floating_center(nc, leader->rect);
|
floating_center(nc, leader->rect);
|
||||||
|
|
Loading…
Reference in New Issue