Merge pull request #3809 from xzfc/3606-floating-xterm

Fix regression: floating xterm created partially off screen
next
Orestis 2019-10-02 10:52:40 +03:00 committed by GitHub
commit d22f0342b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -371,6 +371,7 @@ void floating_enable(Con *con, bool automatic) {
if (nc->rect.x == 0 && nc->rect.y == 0) {
Con *leader;
if (con->window && con->window->leader != XCB_NONE &&
con->window->id != con->window->leader &&
(leader = con_by_window_id(con->window->leader)) != NULL) {
DLOG("Centering above leader\n");
floating_center(nc, leader->rect);