Bugfix: Don’t crash when a dock client starts up with nonsense coordinates (Thanks dothebart)

This fixes ticket #229
This commit is contained in:
Michael Stapelberg 2010-06-16 19:15:14 +02:00
parent c024a23142
commit 2c305b5429
1 changed files with 2 additions and 0 deletions

View File

@ -273,6 +273,8 @@ void reparent_window(xcb_connection_t *conn, xcb_window_t child,
if (atom[i] == atoms[_NET_WM_WINDOW_TYPE_DOCK]) { if (atom[i] == atoms[_NET_WM_WINDOW_TYPE_DOCK]) {
DLOG("Window is a dock.\n"); DLOG("Window is a dock.\n");
Output *t_out = get_output_containing(x, y); Output *t_out = get_output_containing(x, y);
if (t_out == NULL)
t_out = c_ws->output;
if (t_out != c_ws->output) { if (t_out != c_ws->output) {
DLOG("Dock client requested to be on output %s by geometry (%d, %d)\n", DLOG("Dock client requested to be on output %s by geometry (%d, %d)\n",
t_out->name, x, y); t_out->name, x, y);