void CClient::SetWindow(int ID, CWindow* window)
{
- _SysDebug("SetWindow(ID=%i,window=%p)", ID, window);
+ //_SysDebug("SetWindow(ID=%i,window=%p)", ID, window);
auto it = m_windows.find(ID);
if( it != m_windows.end() ) {
_SysDebug("CLIENT BUG: Window ID %i is already used by %p", ID, it->second);
void CCompositor::MouseMove(unsigned int Cursor, unsigned int X, unsigned int Y, int dX, int dY)
{
- _SysDebug("MouseButton(%i, %i,%i, %+i,%+i)", Cursor, X, Y, dX, dY);
+ //_SysDebug("MouseButton(%i, %i,%i, %+i,%+i)", Cursor, X, Y, dX, dY);
m_video.SetCursorPos(X+dX, Y+dY);
CWindow *dstwin = getWindowForCoord(X, Y);
if( dstwin )
{
_SysDebug("MouseButton(%i, %i,%i, %i=%i)", Cursor, X, Y, Button, Press);
CWindow *dstwin = getWindowForCoord(X, Y);
+ _SysDebug("- dstwin = %p", dstwin);
if( dstwin )
{
// 1. Give focus and bring to front
.Client = win->client().id(),
.Window = win->id(),
};
-
+ for( unsigned int row = 0; row < H; row ++ )
+ {
+ TWindowID* dst = &m_buf[ (Y+row) * m_w ];
+ for( unsigned int col = 0; col < W; col ++ )
+ dst[col] = ent;
+ }
}
CWindow* CWindowIDBuffer::get(unsigned int X, unsigned int Y)
{
if( pos >= m_buf.size() )
return nullptr;
auto id = m_buf[pos];
+ //_SysDebug("CWindowIDBuffer::get id = {%i,%i}", id.Client, id.Window);
auto client = ::AxWin::IPC::GetClientByID(id.Client);
- if( client == nullptr )
+ if( client == nullptr ) {
+ //_SysDebug("CWindowIDBuffer::get client=%p", client);
return nullptr;
+ }
return client->GetWindow(id.Window);
}
void RegisterClient(CClient& client)
{
+ _SysDebug("RegisterClient(&client=%p)", &client);
// allocate a client ID, and save
for( int i = 0; i < 100; i ++ )
{
CClient* GetClientByID(uint16_t id)
{
auto it = glClients.find(id);
- return (it == glClients.end() ? nullptr : it->second);
+ if(it == glClients.end()) {
+ //_SysDebug("Client %i not registered", id);
+ return nullptr;
+ }
+ else {
+ //_SysDebug("Client %i %i = %p", id, it->first, it->second);
+ return it->second;
+ }
}
void DeregisterClient(CClient& client)
const key_type& k = val.first;
iterator it = upper_bound(k);
if( it == end() || m_comp(k, it->first) ) { // if k < it->first, no match
- insert_at(it.m_index, value_type(k,mapped_type()) );
+ insert_at(it.m_index, val);
return pair<iterator,bool>(it, true);
}
else {