mirror of
https://github.com/debauchee/barrier.git
synced 2026-02-09 05:13:36 +08:00
Applied a number of patches.
* HP-UX fixes (Bernd Noll) * Now handling accept() taking an int 3rd arg * Now casting sizeof() to socklen_t where necessary * BSD ports fix (Kristen Glynn) * Now defining NULL via stddef.h * Crash on X11 using clipboard (Daniel Gollub) * CXWindowsClipboard::pushReplies() increments iterator better * Solaris/HP-UX compile errors * Now #ifdef out sets of key syms if first key sym undefined * Fix assertion on bad mouse position (ubiquitous_q) * Validate mouse position from client and fix if necessary
This commit is contained in:
@@ -401,12 +401,16 @@ CClientProxy1_0::recvInfo()
|
||||
&x, &y, &w, &h, &dummy1, &mx, &my)) {
|
||||
return false;
|
||||
}
|
||||
LOG((CLOG_DEBUG "received client \"%s\" info shape=%d,%d %dx%d", getName().c_str(), x, y, w, h));
|
||||
LOG((CLOG_DEBUG "received client \"%s\" info shape=%d,%d %dx%d at %d,%d", getName().c_str(), x, y, w, h, mx, my));
|
||||
|
||||
// validate
|
||||
if (w <= 0 || h <= 0) {
|
||||
return false;
|
||||
}
|
||||
if (mx < x || mx >= x + w || my < y || my >= y + h) {
|
||||
mx = x + w / 2;
|
||||
my = y + h / 2;
|
||||
}
|
||||
|
||||
// save
|
||||
m_info.m_x = x;
|
||||
|
||||
Reference in New Issue
Block a user