X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fwindow-system%2Ftizen-wayland%2Fecore-wl2%2Fwindow-base-ecore-wl2.cpp;h=5ae9032ef5876685ac80179e5a851e64c3db9dc7;hb=1f0b06f56e2145a70206d85a32c16e409d25907a;hp=a4306c7d70ab12c479c7c7ecddca2466ccd8fa85;hpb=c6b8a535a007fc0724e0d0b0b539646ba4c4c896;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp b/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp old mode 100644 new mode 100755 index a4306c7..5ae9032 --- a/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp +++ b/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp @@ -30,10 +30,12 @@ // EXTERNAL_HEADERS #include +#include #include #include #include #include +#include namespace Dali { @@ -605,7 +607,9 @@ WindowBaseEcoreWl2::WindowBaseEcoreWl2( Dali::PositionSize positionSize, Any sur mBrightness( 0 ), mBrightnessChangeState( 0 ), mBrightnessChangeDone( true ), - mOwnSurface( false ) + mOwnSurface( false ), + mMoveResizeSerial( 0 ), + mLastSubmittedMoveResizeSerial( 0 ) #ifdef DALI_ELDBUS_AVAILABLE , mSystemConnection( NULL ) #endif @@ -863,22 +867,25 @@ void WindowBaseEcoreWl2::OnMouseButtonDown( void* data, int type, void* event ) if( touchEvent->window == static_cast< unsigned int >( ecore_wl2_window_id_get( mEcoreWindow ) ) ) { - PointState::Type state ( PointState::DOWN ); - - // Check if the buttons field is set and ensure it's the primary touch button. - // If this event was triggered by buttons other than the primary button (used for touch), then - // just send an interrupted event to Core. - if( touchEvent->buttons && (touchEvent->buttons != PRIMARY_TOUCH_BUTTON_ID ) ) - { - state = PointState::INTERRUPTED; - } - Device::Class::Type deviceClass; Device::Subclass::Type deviceSubclass; GetDeviceClass( ecore_device_class_get( touchEvent->dev ), deviceClass ); GetDeviceSubclass( ecore_device_subclass_get( touchEvent->dev ), deviceSubclass ); + PointState::Type state ( PointState::DOWN ); + + if( deviceClass != Device::Class::Type::MOUSE ) + { + // Check if the buttons field is set and ensure it's the primary touch button. + // If this event was triggered by buttons other than the primary button (used for touch), then + // just send an interrupted event to Core. + if( touchEvent->buttons && (touchEvent->buttons != PRIMARY_TOUCH_BUTTON_ID ) ) + { + state = PointState::INTERRUPTED; + } + } + Integration::Point point; point.SetDeviceId( touchEvent->multi.device ); point.SetState( state ); @@ -888,6 +895,7 @@ void WindowBaseEcoreWl2::OnMouseButtonDown( void* data, int type, void* event ) point.SetAngle( Degree( touchEvent->multi.angle ) ); point.SetDeviceClass( deviceClass ); point.SetDeviceSubclass( deviceSubclass ); + point.SetMouseButton( static_cast< MouseButton::Type >( touchEvent->buttons) ); mTouchEventSignal.Emit( point, touchEvent->timestamp ); } @@ -914,6 +922,7 @@ void WindowBaseEcoreWl2::OnMouseButtonUp( void* data, int type, void* event ) point.SetAngle( Degree( touchEvent->multi.angle ) ); point.SetDeviceClass( deviceClass ); point.SetDeviceSubclass( deviceSubclass ); + point.SetMouseButton( static_cast< MouseButton::Type >( touchEvent->buttons) ); mTouchEventSignal.Emit( point, touchEvent->timestamp ); } @@ -1326,6 +1335,13 @@ void WindowBaseEcoreWl2::SetEglWindowTransform( int angle ) void WindowBaseEcoreWl2::ResizeEglWindow( PositionSize positionSize ) { wl_egl_window_resize( mEglWindow, positionSize.width, positionSize.height, positionSize.x, positionSize.y ); + + // Note: Both "Resize" and "MoveResize" cases can reach here, but only "MoveResize" needs to submit serial number + if( mMoveResizeSerial != mLastSubmittedMoveResizeSerial ) + { + wl_egl_window_tizen_set_window_serial( mEglWindow, mMoveResizeSerial ); + mLastSubmittedMoveResizeSerial = mMoveResizeSerial; + } } bool WindowBaseEcoreWl2::IsEglWindowRotationSupported() @@ -1342,7 +1358,7 @@ bool WindowBaseEcoreWl2::IsEglWindowRotationSupported() void WindowBaseEcoreWl2::Move( PositionSize positionSize ) { - ecore_wl2_window_geometry_set( mEcoreWindow, positionSize.x, positionSize.y, positionSize.width, positionSize.height ); + ecore_wl2_window_position_set( mEcoreWindow, positionSize.x, positionSize.y ); } void WindowBaseEcoreWl2::Resize( PositionSize positionSize ) @@ -1352,7 +1368,7 @@ void WindowBaseEcoreWl2::Resize( PositionSize positionSize ) void WindowBaseEcoreWl2::MoveResize( PositionSize positionSize ) { - ecore_wl2_window_geometry_set( mEcoreWindow, positionSize.x, positionSize.y, positionSize.width, positionSize.height ); + ecore_wl2_window_sync_geometry_set( mEcoreWindow, ++mMoveResizeSerial, positionSize.x, positionSize.y, positionSize.width, positionSize.height ); } void WindowBaseEcoreWl2::ShowIndicator( Dali::Window::IndicatorVisibleMode visibleMode, Dali::Window::IndicatorBgOpacity opacityMode ) @@ -2141,10 +2157,6 @@ void WindowBaseEcoreWl2::GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiV dpiVertical = int( yres + 0.5f ); } -void WindowBaseEcoreWl2::SetViewMode( ViewMode viewMode ) -{ -} - int WindowBaseEcoreWl2::GetScreenRotationAngle() { int transform = 0;