mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-03-01 01:40:19 -05:00
opt: optimize x11 popup focus ignore
This commit is contained in:
parent
5bbe6c5c1a
commit
df46194b5f
5 changed files with 21 additions and 29 deletions
|
|
@ -28,8 +28,7 @@ void grid(Monitor *m) {
|
|||
? 0
|
||||
: borderpx;
|
||||
if (VISIBLEON(c, m) && !c->isunglobal &&
|
||||
((m->isoverview && !client_should_ignore_focus_open(c)) ||
|
||||
ISTILED(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;
|
||||
c->geom.x = m->w.x + (m->w.width - cw) / 2;
|
||||
|
|
@ -55,8 +54,7 @@ void grid(Monitor *m) {
|
|||
? 0
|
||||
: borderpx;
|
||||
if (VISIBLEON(c, m) && !c->isunglobal &&
|
||||
((m->isoverview && !client_should_ignore_focus_open(c)) ||
|
||||
ISTILED(c))) {
|
||||
((m->isoverview && !client_is_x11_popup(c)) || ISTILED(c))) {
|
||||
if (i == 0) {
|
||||
c->geom.x = m->w.x + target_gappo;
|
||||
c->geom.y = m->w.y + (m->w.height - ch) / 2 + target_gappo;
|
||||
|
|
@ -106,8 +104,7 @@ void grid(Monitor *m) {
|
|||
? 0
|
||||
: borderpx;
|
||||
if (VISIBLEON(c, m) && !c->isunglobal &&
|
||||
((m->isoverview && !client_should_ignore_focus_open(c)) ||
|
||||
ISTILED(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);
|
||||
if (overcols && i >= n - overcols) {
|
||||
|
|
|
|||
|
|
@ -310,8 +310,7 @@ void vertical_grid(Monitor *m) {
|
|||
? 0
|
||||
: borderpx;
|
||||
if (VISIBLEON(c, m) && !c->isunglobal &&
|
||||
((m->isoverview && !client_should_ignore_focus_open(c)) ||
|
||||
ISTILED(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;
|
||||
c->geom.x = m->w.x + (m->w.width - cw) / 2;
|
||||
|
|
@ -338,8 +337,7 @@ void vertical_grid(Monitor *m) {
|
|||
? 0
|
||||
: borderpx;
|
||||
if (VISIBLEON(c, m) && !c->isunglobal &&
|
||||
((m->isoverview && !client_should_ignore_focus_open(c)) ||
|
||||
ISTILED(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;
|
||||
c->geom.y = m->w.y + target_gappo;
|
||||
|
|
@ -385,8 +383,7 @@ void vertical_grid(Monitor *m) {
|
|||
? 0
|
||||
: borderpx;
|
||||
if (VISIBLEON(c, m) && !c->isunglobal &&
|
||||
((m->isoverview && !client_should_ignore_focus_open(c)) ||
|
||||
ISTILED(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);
|
||||
if (overrows && i >= n - overrows) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue