git.ucc.asn.au
/
tpg
/
acess2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
8b16265
)
Usermode/AxWin4 - Fix broken map impl causing pixel->window mapping to fail
author
John Hodge (sonata)
<
[email protected]
>
Fri, 7 Nov 2014 09:14:40 +0000
(17:14 +0800)
committer
John Hodge (sonata)
<
[email protected]
>
Fri, 7 Nov 2014 09:14:40 +0000
(17:14 +0800)
Usermode/Applications/axwin4_src/Server/CClient.cpp
patch
|
blob
|
history
Usermode/Applications/axwin4_src/Server/compositor.cpp
patch
|
blob
|
history
Usermode/Applications/axwin4_src/Server/ipc.cpp
patch
|
blob
|
history
Usermode/Libraries/libc++.so_src/include_exp/map
patch
|
blob
|
history
diff --git
a/Usermode/Applications/axwin4_src/Server/CClient.cpp
b/Usermode/Applications/axwin4_src/Server/CClient.cpp
index
8640bf3
..
70c4cf8
100644
(file)
--- a/
Usermode/Applications/axwin4_src/Server/CClient.cpp
+++ b/
Usermode/Applications/axwin4_src/Server/CClient.cpp
@@
-35,7
+35,7
@@
CWindow* CClient::GetWindow(int ID)
void CClient::SetWindow(int ID, CWindow* window)
{
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);
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);
diff --git
a/Usermode/Applications/axwin4_src/Server/compositor.cpp
b/Usermode/Applications/axwin4_src/Server/compositor.cpp
index
42bb8b9
..
da924e8
100644
(file)
--- a/
Usermode/Applications/axwin4_src/Server/compositor.cpp
+++ b/
Usermode/Applications/axwin4_src/Server/compositor.cpp
@@
-107,7
+107,7
@@
void CCompositor::BlitFromSurface(const CSurface& dest, const CRect& src_rect)
void CCompositor::MouseMove(unsigned int Cursor, unsigned int X, unsigned int Y, int dX, int dY)
{
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 )
m_video.SetCursorPos(X+dX, Y+dY);
CWindow *dstwin = getWindowForCoord(X, Y);
if( dstwin )
@@
-120,6
+120,7
@@
void CCompositor::MouseButton(unsigned int Cursor, unsigned int X, unsigned int
{
_SysDebug("MouseButton(%i, %i,%i, %i=%i)", Cursor, X, Y, Button, Press);
CWindow *dstwin = getWindowForCoord(X, Y);
{
_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
if( dstwin )
{
// 1. Give focus and bring to front
@@
-150,7
+151,12
@@
void CWindowIDBuffer::set(unsigned int X, unsigned int Y, unsigned int W, unsign
.Client = win->client().id(),
.Window = win->id(),
};
.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)
{
}
CWindow* CWindowIDBuffer::get(unsigned int X, unsigned int Y)
{
@@
-160,9
+166,12
@@
CWindow* CWindowIDBuffer::get(unsigned int X, unsigned int Y)
if( pos >= m_buf.size() )
return nullptr;
auto id = m_buf[pos];
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);
auto client = ::AxWin::IPC::GetClientByID(id.Client);
- if( client == nullptr )
+ if( client == nullptr ) {
+ //_SysDebug("CWindowIDBuffer::get client=%p", client);
return nullptr;
return nullptr;
+ }
return client->GetWindow(id.Window);
}
return client->GetWindow(id.Window);
}
diff --git
a/Usermode/Applications/axwin4_src/Server/ipc.cpp
b/Usermode/Applications/axwin4_src/Server/ipc.cpp
index
c507285
..
1c5ba99
100644
(file)
--- a/
Usermode/Applications/axwin4_src/Server/ipc.cpp
+++ b/
Usermode/Applications/axwin4_src/Server/ipc.cpp
@@
-65,6
+65,7
@@
void HandleSelect(const fd_set& rfds)
void RegisterClient(CClient& client)
{
void RegisterClient(CClient& client)
{
+ _SysDebug("RegisterClient(&client=%p)", &client);
// allocate a client ID, and save
for( int i = 0; i < 100; i ++ )
{
// allocate a client ID, and save
for( int i = 0; i < 100; i ++ )
{
@@
-84,7
+85,14
@@
void RegisterClient(CClient& client)
CClient* GetClientByID(uint16_t id)
{
auto it = glClients.find(id);
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)
}
void DeregisterClient(CClient& client)
diff --git
a/Usermode/Libraries/libc++.so_src/include_exp/map
b/Usermode/Libraries/libc++.so_src/include_exp/map
index
455af71
..
2f9031b
100644
(file)
--- a/
Usermode/Libraries/libc++.so_src/include_exp/map
+++ b/
Usermode/Libraries/libc++.so_src/include_exp/map
@@
-198,7
+198,7
@@
public:
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
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, val
ue_type(k,mapped_type())
);
+ insert_at(it.m_index, val);
return pair<iterator,bool>(it, true);
}
else {
return pair<iterator,bool>(it, true);
}
else {
UCC
git Repository :: git.ucc.asn.au