Also set DIALOG, UTILITY and SPLASH windows floating automatically

This commit is contained in:
Michael Stapelberg
2009-06-19 12:05:55 +02:00
parent a2a8cd85d6
commit a6d7f5451d
5 changed files with 16 additions and 4 deletions

View File

@ -924,7 +924,7 @@ void parse_command(xcb_connection_t *conn, const char *command) {
}
if (last_focused == NULL) {
LOG("Not performing (null) \n");
LOG("Not performing (no window found)\n");
return;
}

View File

@ -161,6 +161,9 @@ int main(int argc, char *argv[], char *env[]) {
REQUEST_ATOM(_NET_WM_DESKTOP);
REQUEST_ATOM(_NET_WM_WINDOW_TYPE_DOCK);
REQUEST_ATOM(_NET_WM_WINDOW_TYPE_DIALOG);
REQUEST_ATOM(_NET_WM_WINDOW_TYPE_UTILITY);
REQUEST_ATOM(_NET_WM_WINDOW_TYPE_TOOLBAR);
REQUEST_ATOM(_NET_WM_WINDOW_TYPE_SPLASH);
REQUEST_ATOM(_NET_WM_STRUT_PARTIAL);
REQUEST_ATOM(WM_PROTOCOLS);
REQUEST_ATOM(WM_DELETE_WINDOW);
@ -265,6 +268,9 @@ int main(int argc, char *argv[], char *env[]) {
GET_ATOM(_NET_WM_DESKTOP);
GET_ATOM(_NET_WM_WINDOW_TYPE_DOCK);
GET_ATOM(_NET_WM_WINDOW_TYPE_DIALOG);
GET_ATOM(_NET_WM_WINDOW_TYPE_UTILITY);
GET_ATOM(_NET_WM_WINDOW_TYPE_TOOLBAR);
GET_ATOM(_NET_WM_WINDOW_TYPE_SPLASH);
GET_ATOM(_NET_WM_STRUT_PARTIAL);
GET_ATOM(WM_PROTOCOLS);
GET_ATOM(WM_DELETE_WINDOW);

View File

@ -259,7 +259,10 @@ void reparent_window(xcb_connection_t *conn, xcb_window_t child,
SLIST_INSERT_HEAD(&(c_ws->screen->dock_clients), new, dock_clients);
/* If its a dock we cant make it float, so we break */
break;
} else if (atom[i] == atoms[_NET_WM_WINDOW_TYPE_DIALOG]) {
} else if (atom[i] == atoms[_NET_WM_WINDOW_TYPE_DIALOG] ||
atom[i] == atoms[_NET_WM_WINDOW_TYPE_UTILITY] ||
atom[i] == atoms[_NET_WM_WINDOW_TYPE_TOOLBAR] ||
atom[i] == atoms[_NET_WM_WINDOW_TYPE_SPLASH]) {
/* Set the dialog window to automatically floating, will be used below */
new->floating = FLOATING_AUTO_ON;
LOG("dialog window, automatically floating\n");