Figured out what's going on... it's a smspillaz's question.
So, you know unity is removing the titlebar on maximize, but after restoring the titlebar is added "after" the configure-event, so event->x and event->y of the configure event connected to the scrollbar lack of the pixels of the titlebar (and the scrollbars are higher of the amount of pixels of the titlebar)
Figured out what's going on... it's a smspillaz's question.
So, you know unity is removing the titlebar on maximize, but after restoring the titlebar is added "after" the configure-event, so event->x and event->y of the configure event connected to the scrollbar lack of the pixels of the titlebar (and the scrollbars are higher of the amount of pixels of the titlebar)