mirror of
https://github.com/vale981/spectrwm
synced 2025-03-04 17:31:40 -05:00
There are no words to describe how completly retarded java is...
Treat it short-bus-special.
This commit is contained in:
parent
c27947b0e2
commit
bb734b7ce7
1 changed files with 16 additions and 1 deletions
17
scrotwm.c
17
scrotwm.c
|
@ -240,6 +240,7 @@ struct ws_win {
|
|||
int font_steps;
|
||||
int last_inc;
|
||||
int can_delete;
|
||||
int java;
|
||||
unsigned long quirks;
|
||||
struct workspace *ws; /* always valid */
|
||||
struct swm_screen *s; /* always valid, never changes */
|
||||
|
@ -940,6 +941,8 @@ set_win_state(struct ws_win *win, long state)
|
|||
|
||||
DNPRINTF(SWM_D_EVENT, "set_win_state: window: %lu\n", win->id);
|
||||
|
||||
if (win == NULL)
|
||||
return;
|
||||
/* make sure we drain everything */
|
||||
XSync(display, True);
|
||||
|
||||
|
@ -1089,7 +1092,10 @@ unmap_window(struct ws_win *win)
|
|||
if (wa.map_state == IsUnmapped && getstate(win->id) == IconicState)
|
||||
return;
|
||||
|
||||
set_win_state(win, IconicState);
|
||||
/* java shits itself when windows are set to iconic state */
|
||||
if (win->java == 0)
|
||||
set_win_state(win, IconicState);
|
||||
|
||||
XUnmapWindow(display, win->id);
|
||||
|
||||
/* make sure we wait for XUnmapWindow completion */
|
||||
|
@ -3411,6 +3417,11 @@ manage_window(Window id)
|
|||
if (XGetClassHint(display, win->id, &win->ch)) {
|
||||
DNPRINTF(SWM_D_CLASS, "class: %s name: %s\n",
|
||||
win->ch.res_class, win->ch.res_name);
|
||||
|
||||
/* java is retarded so treat it special */
|
||||
if (strstr(win->ch.res_name, "sun-awt"))
|
||||
win->java = 1;
|
||||
|
||||
for (i = 0; i < quirks_length; i++){
|
||||
if (!strcmp(win->ch.res_class, quirks[i].class) &&
|
||||
!strcmp(win->ch.res_name, quirks[i].name)) {
|
||||
|
@ -3815,6 +3826,10 @@ unmapnotify(XEvent *e)
|
|||
if (win == NULL)
|
||||
return;
|
||||
|
||||
/* java can not deal with this heuristic */
|
||||
if (win->java)
|
||||
return;
|
||||
|
||||
if (getstate(e->xunmap.window) == NormalState) {
|
||||
/*
|
||||
* this window does not have a destroy event but but it is no
|
||||
|
|
Loading…
Add table
Reference in a new issue