opt: optimize x11 popup focus ignore

This commit is contained in:
DreamMaoMao 2025-11-07 11:34:12 +08:00
parent 3ea37ddb52
commit 98ad9b5cac
5 changed files with 17 additions and 17 deletions

View file

@ -28,7 +28,7 @@ void grid(Monitor *m) {
? 0
: borderpx;
if (VISIBLEON(c, m) && !c->isunglobal &&
((m->isoverview && !client_should_ignore_focus_open(c)) ||
((m->isoverview && !client_is_x11_popup(c)) ||
ISTILED(c))) {
cw = (m->w.width - 2 * target_gappo) * single_width_ratio;
ch = (m->w.height - 2 * target_gappo) * single_height_ratio;
@ -55,7 +55,7 @@ void grid(Monitor *m) {
? 0
: borderpx;
if (VISIBLEON(c, m) && !c->isunglobal &&
((m->isoverview && !client_should_ignore_focus_open(c)) ||
((m->isoverview && !client_is_x11_popup(c)) ||
ISTILED(c))) {
if (i == 0) {
c->geom.x = m->w.x + target_gappo;
@ -106,7 +106,7 @@ void grid(Monitor *m) {
? 0
: borderpx;
if (VISIBLEON(c, m) && !c->isunglobal &&
((m->isoverview && !client_should_ignore_focus_open(c)) ||
((m->isoverview && !client_is_x11_popup(c)) ||
ISTILED(c))) {
cx = m->w.x + (i % cols) * (cw + target_gappi);
cy = m->w.y + (i / cols) * (ch + target_gappi);

View file

@ -310,7 +310,7 @@ void vertical_grid(Monitor *m) {
? 0
: borderpx;
if (VISIBLEON(c, m) && !c->isunglobal &&
((m->isoverview && !client_should_ignore_focus_open(c)) ||
((m->isoverview && !client_is_x11_popup(c)) ||
ISTILED(c))) {
ch = (m->w.height - 2 * target_gappo) * single_height_ratio;
cw = (m->w.width - 2 * target_gappo) * single_width_ratio;
@ -338,7 +338,7 @@ void vertical_grid(Monitor *m) {
? 0
: borderpx;
if (VISIBLEON(c, m) && !c->isunglobal &&
((m->isoverview && !client_should_ignore_focus_open(c)) ||
((m->isoverview && !client_is_x11_popup(c)) ||
ISTILED(c))) {
if (i == 0) {
c->geom.x = m->w.x + (m->w.width - cw) / 2 + target_gappo;
@ -385,7 +385,7 @@ void vertical_grid(Monitor *m) {
? 0
: borderpx;
if (VISIBLEON(c, m) && !c->isunglobal &&
((m->isoverview && !client_should_ignore_focus_open(c)) ||
((m->isoverview && !client_is_x11_popup(c)) ||
ISTILED(c))) {
cx = m->w.x + (i / rows) * (cw + target_gappi);
cy = m->w.y + (i % rows) * (ch + target_gappi);