forked from enlightenment/enlightenment
Check netwm type when we want to check if a window is a dialog. Fetch netwm
window type if a window has a transient. If the app hasn't set window type it will set it to dialog. Maybe check if some apps set wrong netwm window type? SVN revision: 16880
This commit is contained in:
parent
d22fe46e46
commit
2c2f9e3f5d
|
@ -332,7 +332,10 @@ e_border_new(E_Container *con, Ecore_X_Window win, int first_map)
|
||||||
else if (atoms[i] == ECORE_X_ATOM_MOTIF_WM_HINTS)
|
else if (atoms[i] == ECORE_X_ATOM_MOTIF_WM_HINTS)
|
||||||
bd->client.mwm.fetch.hints = 1;
|
bd->client.mwm.fetch.hints = 1;
|
||||||
else if (atoms[i] == ECORE_X_ATOM_WM_TRANSIENT_FOR)
|
else if (atoms[i] == ECORE_X_ATOM_WM_TRANSIENT_FOR)
|
||||||
bd->client.icccm.fetch.transient_for = 1;
|
{
|
||||||
|
bd->client.icccm.fetch.transient_for = 1;
|
||||||
|
bd->client.netwm.fetch.type = 1;
|
||||||
|
}
|
||||||
else if (atoms[i] == ECORE_X_ATOM_WM_CLIENT_LEADER)
|
else if (atoms[i] == ECORE_X_ATOM_WM_CLIENT_LEADER)
|
||||||
bd->client.icccm.fetch.client_leader = 1;
|
bd->client.icccm.fetch.client_leader = 1;
|
||||||
else if (atoms[i] == ECORE_X_ATOM_WM_WINDOW_ROLE)
|
else if (atoms[i] == ECORE_X_ATOM_WM_WINDOW_ROLE)
|
||||||
|
@ -5291,7 +5294,7 @@ _e_border_eval(E_Border *bd)
|
||||||
ecore_x_window_show(bd->win);
|
ecore_x_window_show(bd->win);
|
||||||
if ((!bd->re_manage) &&
|
if ((!bd->re_manage) &&
|
||||||
(e_config->window_placement_policy == E_WINDOW_PLACEMENT_MANUAL) &&
|
(e_config->window_placement_policy == E_WINDOW_PLACEMENT_MANUAL) &&
|
||||||
(!bd->client.icccm.transient_for) &&
|
(bd->client.netwm.type != ECORE_X_WINDOW_TYPE_DIALOG) &&
|
||||||
(!move) && (!resize))
|
(!move) && (!resize))
|
||||||
{
|
{
|
||||||
/* Set this window into moving state */
|
/* Set this window into moving state */
|
||||||
|
@ -5350,10 +5353,9 @@ _e_border_eval(E_Border *bd)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (bd->client.icccm.transient_for != 0)
|
if (bd->client.netwm.type == ECORE_X_WINDOW_TYPE_DIALOG)
|
||||||
{
|
{
|
||||||
if ((e_config->focus_setting == E_FOCUS_NEW_DIALOG) ||
|
if ((e_config->focus_setting == E_FOCUS_NEW_DIALOG) ||
|
||||||
|
|
||||||
((e_config->focus_setting == E_FOCUS_NEW_DIALOG_IF_OWNER_FOCUSED) &&
|
((e_config->focus_setting == E_FOCUS_NEW_DIALOG_IF_OWNER_FOCUSED) &&
|
||||||
(e_border_find_by_client_window(bd->client.icccm.transient_for) ==
|
(e_border_find_by_client_window(bd->client.icccm.transient_for) ==
|
||||||
e_border_focused_get())))
|
e_border_focused_get())))
|
||||||
|
|
|
@ -47,7 +47,7 @@ e_dialog_new(E_Container *con)
|
||||||
free(dia);
|
free(dia);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
ecore_x_icccm_transient_for_set(dia->win->evas_win, con->win);
|
ecore_x_netwm_window_type_set(dia->win->evas_win, ECORE_X_WINDOW_TYPE_DIALOG);
|
||||||
e_win_delete_callback_set(dia->win, _e_dialog_cb_delete);
|
e_win_delete_callback_set(dia->win, _e_dialog_cb_delete);
|
||||||
dia->win->data = dia;
|
dia->win->data = dia;
|
||||||
e_win_name_class_set(dia->win, "E", "_dialog");
|
e_win_name_class_set(dia->win, "E", "_dialog");
|
||||||
|
|
Loading…
Reference in New Issue