Skip to content
This repository has been archived by the owner on Aug 20, 2020. It is now read-only.

Inputpointer #9

Merged
merged 11 commits into from
Aug 19, 2013
Merged

Inputpointer #9

merged 11 commits into from
Aug 19, 2013

Conversation

kalyankondapally
Copy link
Contributor

No description provided.

We currently have too many places where display is flushed for various reasons.
The patch does the following changes:
1)Make all code related to flushing display internal to WaylandDisplay.
2)Avoid need to flush in WaylandWindow.
3)In certain cases we need to flush display only if any pending WaylandTasks have been handled else we dont have to.
Currently, WaylandDisplay initializes cursors and inputdevice
updates it as needed. There are certain dependencies on inputdevice
for the cursor to create its surface buffer. This has led to un-necessary
apis in inputdevice. The patch changes so that all the functionality
of Cursor is encapsulated in WaylandCursor class and it is owned by
input device. After this change WaylandDisplay knows nothing about
cursor and how it's updated. With this change we also move all
global declarations to wayland_global
In SetParentWindow, we check for shell before calling
setType. In SetType we already have a check for valid
shell surface. This patch removes un-necessary check in
SetParentWindow.
doing it for every instance but rather load it once and share.
WaylandDisplay connection and termination is now responsibility of
surface_factory_wayland. Any other user should call GetDisplay to get
pointer to the current instance.
WaylandSurface is a simple class which acts as a wrapper
for wl_surface. Now each wl_surface can be identified
with a unique handle. Changes are made in wayland_cursor
and wayland_window to take this class into use.
We are using sizeof(pointer) as size of the buffer. This is wrong as size of pointer
is not equal to size of array it points to. Size of pointer is usually
4 bytes on 32 bit system or size of the address register on the particular
machine controls the size of the pointer. In this case we already know the
size as we are allocating the char array on heap. This patch makes necessary
changes in this direction. The patch also fixes memory leak as the allocated
buffer was not deleted after being used.
This patch fixes all issues causing crashes during
shut down. Primary issue: we are trying to unregister
in event_factory_wayland when MessageLoop was already
destroyed.
@tiagovignatti
Copy link
Contributor

Kalyan, please give some idiomatic description whenever you open an issue.

@kalyankondapally
Copy link
Contributor Author

Opps, I was expecting GitHub would show the first commit message. Seems it just takes the branch name by default.

@kalyankondapally
Copy link
Contributor Author

Ya will be careful about this.

@tiagovignatti
Copy link
Contributor

great work Kalyan. Next time let's try to separate in several branches, given a proper name and description for each work.

tiagovignatti added a commit that referenced this pull request Aug 19, 2013
event handling fixes, input pointer clean up and content_shell quit segfault addresed
@tiagovignatti tiagovignatti merged commit a25e19c into master Aug 19, 2013
@tiagovignatti tiagovignatti deleted the inputpointer branch August 19, 2013 10:14
@xiangzhai xiangzhai mentioned this pull request Apr 1, 2014
tiagovignatti added a commit that referenced this pull request May 28, 2014
[17567:17567:0528/100616:ERROR:display.cc(227)] Not implemented reached in virtual void ozonewayland::WaylandDisplay::SetWidgetState(unsigned int, ui::WidgetState, unsigned int, unsigned int) SHOW 1
[17567:17606:0528/100616:WARNING:server_connection_manager.cc(296)] ServerConnectionManager forcing SYNC_AUTH_ERROR
[17567:17606:0528/100616:WARNING:syncer_proto_util.cc(277)] Error posting from syncer: Response Code (bogus on error): -1 Content-Length (bogus on error): -1 Server Status: SYNC_AUTH_ERROR
[17567:17606:0528/100616:ERROR:get_updates_processor.cc(240)] PostClientToServerMessage() failed during GetUpdates
[17567:17584:0528/100617:WARNING:backend_impl.cc(1780)] Destroying invalid entry.
[17567:17567:0528/100616:FATAL:input_device.cc(216)] Check failed: input_pointer_.
 #0 0x7f9f01fd0a99 base::debug::StackTrace::StackTrace()
 #1 0x7f9f02022a33 logging::LogMessage::~LogMessage()
 #2 0x7f9f03337610 ozonewayland::WaylandInputDevice::SetCursorType()
 #3 0x7f9f0332f9c8 ozonewayland::WaylandDisplay::SetWidgetCursor()
 #4 0x7f9f06f07869 views::DesktopWindowTreeHostWayland::SetCursorNative()
 #5 0x7f9f033238ad aura::WindowTreeHost::SetCursor()
 #6 0x7f9f06f1da8d views::DesktopNativeCursorManager::SetCursor()
 #7 0x7f9f06dcdf5c wm::CursorManager::SetCursor()
 #8 0x7f9f06dc94d8 wm::CompoundEventFilter::UpdateCursor()
 #9 0x7f9f06dc99bf wm::CompoundEventFilter::OnMouseEvent()
 #10 0x7f9f086c0093 ui::EventHandler::OnEvent()
 #11 0x7f9f086bdcf1 ui::EventDispatcher::DispatchEvent()
 #12 0x7f9f086bdab7 ui::EventDispatcher::DispatchEventToEventHandlers()
 #13 0x7f9f086bd79d ui::EventDispatcher::ProcessEvent()
 #14 0x7f9f086bd476 ui::EventDispatcherDelegate::DispatchEventToTarget()
 #15 0x7f9f086bd33d ui::EventDispatcherDelegate::DispatchEvent()
 #16 0x7f9f0331bcbf aura::WindowEventDispatcher::DispatchMouseEnterOrExit()
 #17 0x7f9f0331dde1 aura::WindowEventDispatcher::PreDispatchMouseEvent()
 #18 0x7f9f0331c5c1 aura::WindowEventDispatcher::PreDispatchEvent()
 #19 0x7f9f086bd2dd ui::EventDispatcherDelegate::DispatchEvent()
 #20 0x7f9f086c15e7 ui::EventProcessor::OnEventFromSource()
 #21 0x7f9f0331d845 aura::WindowEventDispatcher::SynthesizeMouseMoveEvent()
 #22 0x7f9f0331fe00 base::internal::RunnableAdapter<>::Run()
 #23 0x7f9f0331fc87 base::internal::InvokeHelper<>::MakeItSo()
 #24 0x7f9f0331fab8 base::internal::Invoker<>::Run()
 #25 0x7f9f00e1beb9 base::Callback<>::Run()
 #26 0x7f9f02033288 base::MessageLoop::RunTask()
 #27 0x7f9f020333ac base::MessageLoop::DeferOrRunPendingTask()
 #28 0x7f9f020338d3 base::MessageLoop::DoWork()
 #29 0x7f9f01fb45ef base::MessagePumpLibevent::Run()
 #30 0x7f9f02032dd7 base::MessageLoop::RunHandler()
 #31 0x7f9f0207300a base::RunLoop::Run()
 #32 0x7f9f01678366 ChromeBrowserMainParts::MainMessageLoopRun()
 #33 0x7f9f05851634 content::BrowserMainLoop::RunMainMessageLoopParts()
 #34 0x7f9f058589dc content::BrowserMainRunnerImpl::Run()
 #35 0x7f9f0584dba8 content::BrowserMain()
 #36 0x7f9f01f73f75 content::RunNamedProcessTypeMain()
 #37 0x7f9f01f74fa1 content::ContentMainRunnerImpl::Run()
 #38 0x7f9f01f73439 content::ContentMain()
 #39 0x7f9f00d75344 ChromeMain
 #40 0x7f9f00d752ea main
 #41 0x7f9efcbc876d __libc_start_main
 #42 0x7f9f00d751f9 <unknown>
rakuco pushed a commit to rakuco/ozone-wayland that referenced this pull request Jun 19, 2014
[17567:17567:0528/100616:ERROR:display.cc(227)] Not implemented reached in virtual void ozonewayland::WaylandDisplay::SetWidgetState(unsigned int, ui::WidgetState, unsigned int, unsigned int) SHOW 1
[17567:17606:0528/100616:WARNING:server_connection_manager.cc(296)] ServerConnectionManager forcing SYNC_AUTH_ERROR
[17567:17606:0528/100616:WARNING:syncer_proto_util.cc(277)] Error posting from syncer: Response Code (bogus on error): -1 Content-Length (bogus on error): -1 Server Status: SYNC_AUTH_ERROR
[17567:17606:0528/100616:ERROR:get_updates_processor.cc(240)] PostClientToServerMessage() failed during GetUpdates
[17567:17584:0528/100617:WARNING:backend_impl.cc(1780)] Destroying invalid entry.
[17567:17567:0528/100616:FATAL:input_device.cc(216)] Check failed: input_pointer_.
 #0 0x7f9f01fd0a99 base::debug::StackTrace::StackTrace()
 intel#1 0x7f9f02022a33 logging::LogMessage::~LogMessage()
 intel#2 0x7f9f03337610 ozonewayland::WaylandInputDevice::SetCursorType()
 intel#3 0x7f9f0332f9c8 ozonewayland::WaylandDisplay::SetWidgetCursor()
 intel#4 0x7f9f06f07869 views::DesktopWindowTreeHostWayland::SetCursorNative()
 intel#5 0x7f9f033238ad aura::WindowTreeHost::SetCursor()
 intel#6 0x7f9f06f1da8d views::DesktopNativeCursorManager::SetCursor()
 intel#7 0x7f9f06dcdf5c wm::CursorManager::SetCursor()
 intel#8 0x7f9f06dc94d8 wm::CompoundEventFilter::UpdateCursor()
 intel#9 0x7f9f06dc99bf wm::CompoundEventFilter::OnMouseEvent()
 intel#10 0x7f9f086c0093 ui::EventHandler::OnEvent()
 intel#11 0x7f9f086bdcf1 ui::EventDispatcher::DispatchEvent()
 intel#12 0x7f9f086bdab7 ui::EventDispatcher::DispatchEventToEventHandlers()
 intel#13 0x7f9f086bd79d ui::EventDispatcher::ProcessEvent()
 intel#14 0x7f9f086bd476 ui::EventDispatcherDelegate::DispatchEventToTarget()
 intel#15 0x7f9f086bd33d ui::EventDispatcherDelegate::DispatchEvent()
 intel#16 0x7f9f0331bcbf aura::WindowEventDispatcher::DispatchMouseEnterOrExit()
 intel#17 0x7f9f0331dde1 aura::WindowEventDispatcher::PreDispatchMouseEvent()
 intel#18 0x7f9f0331c5c1 aura::WindowEventDispatcher::PreDispatchEvent()
 intel#19 0x7f9f086bd2dd ui::EventDispatcherDelegate::DispatchEvent()
 intel#20 0x7f9f086c15e7 ui::EventProcessor::OnEventFromSource()
 intel#21 0x7f9f0331d845 aura::WindowEventDispatcher::SynthesizeMouseMoveEvent()
 intel#22 0x7f9f0331fe00 base::internal::RunnableAdapter<>::Run()
 intel#23 0x7f9f0331fc87 base::internal::InvokeHelper<>::MakeItSo()
 intel#24 0x7f9f0331fab8 base::internal::Invoker<>::Run()
 intel#25 0x7f9f00e1beb9 base::Callback<>::Run()
 intel#26 0x7f9f02033288 base::MessageLoop::RunTask()
 intel#27 0x7f9f020333ac base::MessageLoop::DeferOrRunPendingTask()
 intel#28 0x7f9f020338d3 base::MessageLoop::DoWork()
 intel#29 0x7f9f01fb45ef base::MessagePumpLibevent::Run()
 intel#30 0x7f9f02032dd7 base::MessageLoop::RunHandler()
 intel#31 0x7f9f0207300a base::RunLoop::Run()
 intel#32 0x7f9f01678366 ChromeBrowserMainParts::MainMessageLoopRun()
 intel#33 0x7f9f05851634 content::BrowserMainLoop::RunMainMessageLoopParts()
 intel#34 0x7f9f058589dc content::BrowserMainRunnerImpl::Run()
 intel#35 0x7f9f0584dba8 content::BrowserMain()
 intel#36 0x7f9f01f73f75 content::RunNamedProcessTypeMain()
 intel#37 0x7f9f01f74fa1 content::ContentMainRunnerImpl::Run()
 intel#38 0x7f9f01f73439 content::ContentMain()
 intel#39 0x7f9f00d75344 ChromeMain
 intel#40 0x7f9f00d752ea main
 intel#41 0x7f9efcbc876d __libc_start_main
 intel#42 0x7f9f00d751f9 <unknown>

(cherry picked from commit 374e95a)
@JunghanKim JunghanKim mentioned this pull request Oct 15, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants