Commit c2e98900 authored by JP Dinger's avatar JP Dinger

Skins2: Cosmetics and make better use of a test that's done anyway.

parent 1bb2388c
...@@ -120,18 +120,11 @@ void X11DragDrop::dndPosition( ldata_t data ) ...@@ -120,18 +120,11 @@ void X11DragDrop::dndPosition( ldata_t data )
event.xclient.message_type = typeAtom; event.xclient.message_type = typeAtom;
event.xclient.format = 32; event.xclient.format = 32;
event.xclient.data.l[0] = m_wnd; event.xclient.data.l[0] = m_wnd;
if( m_target != None ) // Accept the drop (1), or not (0).
{ event.xclient.data.l[1] = m_target != None ? 1 : 0;
// Accept the drop OSFactory *pOsFactory = X11Factory::instance( getIntf() );
event.xclient.data.l[1] = 1; int w = pOsFactory->getScreenWidth();
} int h = pOsFactory->getScreenHeight();
else
{
// Do not accept the drop
event.xclient.data.l[1] = 0;
}
int w = X11Factory::instance( getIntf() )->getScreenWidth();
int h = X11Factory::instance( getIntf() )->getScreenHeight();
event.xclient.data.l[2] = 0; event.xclient.data.l[2] = 0;
event.xclient.data.l[3] = (w << 16) | h; event.xclient.data.l[3] = (w << 16) | h;
event.xclient.data.l[4] = actionAtom; event.xclient.data.l[4] = actionAtom;
...@@ -174,8 +167,8 @@ void X11DragDrop::dndDrop( ldata_t data ) ...@@ -174,8 +167,8 @@ void X11DragDrop::dndDrop( ldata_t data )
if( buffer != NULL ) if( buffer != NULL )
{ {
selection = buffer; selection = buffer;
XFree( buffer );
} }
XFree( buffer );
if( selection != "" ) if( selection != "" )
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment