fix issue that cursor of place splitter
the cursor doesn't change when it leaves place splitter for a nested_form
This commit is contained in:
		
							parent
							
								
									f1a746ad4a
								
							
						
					
					
						commit
						ef8b66341a
					
				@ -1,7 +1,7 @@
 | 
				
			|||||||
/**
 | 
					/**
 | 
				
			||||||
 *	A Basic Window Widget Definition
 | 
					 *	A Basic Window Widget Definition
 | 
				
			||||||
 *	Nana C++ Library(http://www.nanapro.org)
 | 
					 *	Nana C++ Library(http://www.nanapro.org)
 | 
				
			||||||
 *	Copyright(C) 2003-2016 Jinhao(cnjinhao@hotmail.com)
 | 
					 *	Copyright(C) 2003-2017 Jinhao(cnjinhao@hotmail.com)
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *	Distributed under the Boost Software License, Version 1.0. 
 | 
					 *	Distributed under the Boost Software License, Version 1.0. 
 | 
				
			||||||
 *	(See accompanying file LICENSE_1_0.txt or copy at 
 | 
					 *	(See accompanying file LICENSE_1_0.txt or copy at 
 | 
				
			||||||
@ -220,9 +220,6 @@ namespace detail
 | 
				
			|||||||
				basic_window*	focus{nullptr};
 | 
									basic_window*	focus{nullptr};
 | 
				
			||||||
				basic_window*	menubar{nullptr};
 | 
									basic_window*	menubar{nullptr};
 | 
				
			||||||
				bool			ime_enabled{false};
 | 
									bool			ime_enabled{false};
 | 
				
			||||||
#if defined(NANA_WINDOWS)
 | 
					 | 
				
			||||||
				cursor			running_cursor{ nana::cursor::arrow };
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
				cursor			state_cursor{nana::cursor::arrow};
 | 
									cursor			state_cursor{nana::cursor::arrow};
 | 
				
			||||||
				basic_window*	state_cursor_window{ nullptr };
 | 
									basic_window*	state_cursor_window{ nullptr };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -1,7 +1,7 @@
 | 
				
			|||||||
/**
 | 
					/**
 | 
				
			||||||
 *	A Bedrock Implementation
 | 
					 *	A Bedrock Implementation
 | 
				
			||||||
 *	Nana C++ Library(http://www.nanapro.org)
 | 
					 *	Nana C++ Library(http://www.nanapro.org)
 | 
				
			||||||
 *	Copyright(C) 2003-2016 Jinhao(cnjinhao@hotmail.com)
 | 
					 *	Copyright(C) 2003-2017 Jinhao(cnjinhao@hotmail.com)
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *	Distributed under the Boost Software License, Version 1.0.
 | 
					 *	Distributed under the Boost Software License, Version 1.0.
 | 
				
			||||||
 *	(See accompanying file LICENSE_1_0.txt or copy at
 | 
					 *	(See accompanying file LICENSE_1_0.txt or copy at
 | 
				
			||||||
@ -784,7 +784,7 @@ namespace detail
 | 
				
			|||||||
		static auto& brock = bedrock::instance();
 | 
							static auto& brock = bedrock::instance();
 | 
				
			||||||
		static restrict::TRACKMOUSEEVENT track = {sizeof track, 0x00000002};
 | 
							static restrict::TRACKMOUSEEVENT track = {sizeof track, 0x00000002};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		auto native_window = reinterpret_cast<native_window_type>(root_window);
 | 
							auto const native_window = reinterpret_cast<native_window_type>(root_window);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		auto & wd_manager = brock.wd_manager();
 | 
							auto & wd_manager = brock.wd_manager();
 | 
				
			||||||
		auto* root_runtime = wd_manager.root_runtime(native_window);
 | 
							auto* root_runtime = wd_manager.root_runtime(native_window);
 | 
				
			||||||
@ -1720,9 +1720,16 @@ namespace detail
 | 
				
			|||||||
			thrd->cursor.handle = ::LoadCursor(nullptr, translate(cur));
 | 
								thrd->cursor.handle = ::LoadCursor(nullptr, translate(cur));
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if (wd->root_widget->other.attribute.root->running_cursor != cur)
 | 
							auto this_cur = reinterpret_cast<HCURSOR>(
 | 
				
			||||||
 | 
					#ifdef _WIN64
 | 
				
			||||||
 | 
								::GetClassLongPtr(reinterpret_cast<HWND>(wd->root), GCLP_HCURSOR)
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
								::GetClassLong(reinterpret_cast<HWND>(wd->root), GCL_HCURSOR)
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
								);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							if(this_cur != thrd->cursor.handle)
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			wd->root_widget->other.attribute.root->running_cursor = cur;
 | 
					 | 
				
			||||||
#ifdef _WIN64
 | 
					#ifdef _WIN64
 | 
				
			||||||
			::SetClassLongPtr(reinterpret_cast<HWND>(wd->root), GCLP_HCURSOR,
 | 
								::SetClassLongPtr(reinterpret_cast<HWND>(wd->root), GCLP_HCURSOR,
 | 
				
			||||||
				reinterpret_cast<LONG_PTR>(thrd->cursor.handle));
 | 
									reinterpret_cast<LONG_PTR>(thrd->cursor.handle));
 | 
				
			||||||
@ -1731,6 +1738,7 @@ namespace detail
 | 
				
			|||||||
				static_cast<unsigned long>(reinterpret_cast<size_t>(thrd->cursor.handle)));
 | 
									static_cast<unsigned long>(reinterpret_cast<size_t>(thrd->cursor.handle)));
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if (cursor::arrow == thrd->cursor.predef_cursor)
 | 
							if (cursor::arrow == thrd->cursor.predef_cursor)
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			thrd->cursor.window = nullptr;
 | 
								thrd->cursor.window = nullptr;
 | 
				
			||||||
@ -1804,10 +1812,7 @@ namespace detail
 | 
				
			|||||||
				undefine_state_cursor(wd, thrd);
 | 
									undefine_state_cursor(wd, thrd);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			if(wd == thrd->cursor.window)
 | 
								if(wd == thrd->cursor.window)
 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
				set_cursor(wd, cursor::arrow, thrd);
 | 
									set_cursor(wd, cursor::arrow, thrd);
 | 
				
			||||||
				wd->root_widget->other.attribute.root->running_cursor = cursor::arrow;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
			break;
 | 
								break;
 | 
				
			||||||
        default:
 | 
					        default:
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user