From 91ed1287c35b8ff62834a7e6e2fde60d9eba4270 Mon Sep 17 00:00:00 2001 From: Jay Taoko Date: Fri, 25 May 2012 16:49:27 -0400 Subject: * Deprecated nux-image. Files under NuxImage/ are now under NuxGraphics. * Requires nux-3.0. (bzr r2366.3.1) --- hud/HudButton.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hud') diff --git a/hud/HudButton.cpp b/hud/HudButton.cpp index efdfd1c5e..a523b8369 100644 --- a/hud/HudButton.cpp +++ b/hud/HudButton.cpp @@ -27,7 +27,7 @@ #include #include -#include +#include #include #include #include -- cgit v1.2.3 From cbcd14e7974a27335fcee9be1915e3d319862e77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Fri, 15 Jun 2012 17:51:58 +0200 Subject: HudController: hide the HUD when the spread is initiated (bzr r2364.7.11) --- hud/HudController.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'hud') diff --git a/hud/HudController.cpp b/hud/HudController.cpp index f2f05805a..7f9bc75e3 100644 --- a/hud/HudController.cpp +++ b/hud/HudController.cpp @@ -75,7 +75,9 @@ Controller::Controller(std::function const& function) launcher_width.changed.connect([&] (int new_width) { Relayout(); }); - WindowManager::Default()->compiz_screen_ungrabbed.connect(sigc::mem_fun(this, &Controller::OnScreenUngrabbed)); + auto wm = WindowManager::Default(); + wm->compiz_screen_ungrabbed.connect(sigc::mem_fun(this, &Controller::OnScreenUngrabbed)); + wm->initiate_spread.connect(sigc::bind(sigc::mem_fun(this, &Controller::HideHud), true)); hud_service_.queries_updated.connect(sigc::mem_fun(this, &Controller::OnQueriesFinished)); timeline_animator_.animation_updated.connect(sigc::mem_fun(this, &Controller::OnViewShowHideFrame)); @@ -93,10 +95,11 @@ void Controller::SetupWindow() window_->mouse_down_outside_pointer_grab_area.connect(sigc::mem_fun(this, &Controller::OnMouseDownOutsideWindow)); /* FIXME - first time we load our windows there is a race that causes the input window not to actually get input, this side steps that by causing an input window show and hide before we really need it. */ - WindowManager::Default()->saveInputFocus (); + auto wm = WindowManager::Default(); + wm->saveInputFocus (); window_->EnableInputWindow(true, "Hud", true, false); window_->EnableInputWindow(false, "Hud", true, false); - WindowManager::Default()->restoreInputFocus (); + wm->restoreInputFocus (); } void Controller::SetupHudView() -- cgit v1.2.3 From 37f555189dbb43b2989c3a095074bb84ad22e05b Mon Sep 17 00:00:00 2001 From: "timo.jyrinki@canonical.com" <> Date: Thu, 21 Jun 2012 16:40:10 +0100 Subject: Fix building on ARM without OpenGL (only EGL + OpenGL ES). A successful build also needed the -fPIC addition for arm. (bzr r2434.3.1) --- hud/CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'hud') diff --git a/hud/CMakeLists.txt b/hud/CMakeLists.txt index 294ba8a6a..fa489e45d 100644 --- a/hud/CMakeLists.txt +++ b/hud/CMakeLists.txt @@ -10,13 +10,17 @@ set (CFLAGS "-I${CMAKE_CURRENT_BINARY_DIR}" ) -if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64") +if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64" OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "armv7l") set (CFLAGS ${CFLAGS} "-fPIC") endif (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64") add_definitions (${CFLAGS}) -set (LIBS ${CACHED_UNITY_DEPS_LIBRARIES} "-lunity-core-${UNITY_API_VERSION} -lm -lGL -lGLU") +if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "armv7l") + set (LIBS ${CACHED_UNITY_DEPS_LIBRARIES} "-lunity-core-${UNITY_API_VERSION} -lm") +else() + set (LIBS ${CACHED_UNITY_DEPS_LIBRARIES} "-lunity-core-${UNITY_API_VERSION} -lm -lGL -lGLU") +endif() link_libraries (${LIBS}) set (LIB_PATHS ${CACHED_UNITY_DEPS_LIBRARY_DIRS}) -- cgit v1.2.3 From 16e9bfcdcc0a6b99e6aaa468eecbdb505271fc2b Mon Sep 17 00:00:00 2001 From: Brandon Schaefer Date: Fri, 22 Jun 2012 11:35:35 -0700 Subject: * Fixes closing the hud by clicking outside its geo when shrunk (bzr r2438.3.1) --- hud/HudController.cpp | 2 +- hud/HudView.cpp | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'hud') diff --git a/hud/HudController.cpp b/hud/HudController.cpp index 7f9bc75e3..683626a40 100644 --- a/hud/HudController.cpp +++ b/hud/HudController.cpp @@ -93,7 +93,7 @@ void Controller::SetupWindow() window_->ShowWindow(false); window_->SetOpacity(0.0f); window_->mouse_down_outside_pointer_grab_area.connect(sigc::mem_fun(this, &Controller::OnMouseDownOutsideWindow)); - + /* FIXME - first time we load our windows there is a race that causes the input window not to actually get input, this side steps that by causing an input window show and hide before we really need it. */ auto wm = WindowManager::Default(); wm->saveInputFocus (); diff --git a/hud/HudView.cpp b/hud/HudView.cpp index 6c0e02531..0a30442cc 100644 --- a/hud/HudView.cpp +++ b/hud/HudView.cpp @@ -350,7 +350,7 @@ void View::SetupViews() { dash::Style& style = dash::Style::Instance(); - nux::VLayout* super_layout = new nux::VLayout(); + nux::VLayout* super_layout = new nux::VLayout(); layout_ = new nux::HLayout(); { // fill layout with icon @@ -398,7 +398,7 @@ void View::OnSearchChanged(std::string const& search_string) { button->fake_focused = false; } - + if (!buttons_.empty()) buttons_.back()->fake_focused = true; } @@ -417,7 +417,8 @@ void View::OnKeyDown (unsigned long event_type, unsigned long keysym, void View::OnMouseButtonDown(int x, int y, unsigned long button, unsigned long key) { - if (!content_geo_.IsPointInside(x, y)) + nux::Geometry current_geo(0, 0, content_geo_.width, current_height_); + if (!current_geo.IsPointInside(x, y)) { ubus.SendMessage(UBUS_HUD_CLOSE_REQUEST); } @@ -457,7 +458,7 @@ void View::DrawContent(nux::GraphicsEngine& gfx_context, bool force_draw) x += content_width - 1; nux::GetPainter().Draw2DLine(gfx_context, x, y, x, y + height, nux::color::White * 0.13); } - + GetLayout()->ProcessDraw(gfx_context, force_draw); nux::GetPainter().PopBackgroundStack(); } @@ -495,7 +496,7 @@ void View::AddProperties(GVariantBuilder* builder) { unsigned num_buttons = buttons_.size(); variant::BuilderWrapper(builder) - .add(GetGeometry()) + .add(content_geo_) .add("selected_button", selected_button_) .add("num_buttons", num_buttons); } -- cgit v1.2.3 From 5514599819f5ed20b7235669c040f76cffda5fe8 Mon Sep 17 00:00:00 2001 From: Brandon Schaefer Date: Mon, 25 Jun 2012 09:32:30 -0700 Subject: * Copy the entire content_geo now * Fixed the ap test (bzr r2438.4.1) --- hud/HudView.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'hud') diff --git a/hud/HudView.cpp b/hud/HudView.cpp index 0a30442cc..b8dcbfc3d 100644 --- a/hud/HudView.cpp +++ b/hud/HudView.cpp @@ -417,7 +417,8 @@ void View::OnKeyDown (unsigned long event_type, unsigned long keysym, void View::OnMouseButtonDown(int x, int y, unsigned long button, unsigned long key) { - nux::Geometry current_geo(0, 0, content_geo_.width, current_height_); + nux::Geometry current_geo(content_geo_); + current_geo.height = current_height_; if (!current_geo.IsPointInside(x, y)) { ubus.SendMessage(UBUS_HUD_CLOSE_REQUEST); -- cgit v1.2.3 From b0631012eced03ac9c93b2ffb11c5683ad7ae18f Mon Sep 17 00:00:00 2001 From: Andrea Azzarone Date: Tue, 26 Jun 2012 15:07:39 +0200 Subject: Fix bug #1016239. (bzr r2439.1.1) --- hud/HudButton.cpp | 9 ++++++++- hud/HudView.cpp | 3 ++- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'hud') diff --git a/hud/HudButton.cpp b/hud/HudButton.cpp index 138407f30..9a699899a 100644 --- a/hud/HudButton.cpp +++ b/hud/HudButton.cpp @@ -131,6 +131,7 @@ long HudButton::ComputeContentSize() void HudButton::Draw(nux::GraphicsEngine& GfxContext, bool force_draw) { nux::Geometry const& geo = GetGeometry(); + GfxContext.PushClippingRectangle(geo); gPainter.PaintBackground(GfxContext, geo); // set up our texture mode @@ -170,12 +171,18 @@ void HudButton::Draw(nux::GraphicsEngine& GfxContext, bool force_draw) nux::color::White); GfxContext.GetRenderStates().SetBlend(alpha, src, dest); + + GfxContext.PopClippingRectangle(); } void HudButton::DrawContent(nux::GraphicsEngine& GfxContext, bool force_draw) { if (IsFullRedraw()) + { + GfxContext.PushClippingRectangle(GetGeometry()); hlayout_->ProcessDraw(GfxContext, force_draw); + GfxContext.PopClippingRectangle(); + } } void HudButton::SetQuery(Query::Ptr query) @@ -188,7 +195,7 @@ void HudButton::SetQuery(Query::Ptr query) hlayout_->Clear(); for (auto item : items) { - nux::StaticCairoText* text = new nux::StaticCairoText(item.first.c_str()); + nux::StaticCairoText* text = new nux::StaticCairoText(item.first); text->SetTextColor(nux::Color(1.0f, 1.0f, 1.0f, item.second ? 1.0f : 0.5f)); text->SetFont(button_font); hlayout_->AddView(text, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FULL); diff --git a/hud/HudView.cpp b/hud/HudView.cpp index 6c0e02531..373573bf4 100644 --- a/hud/HudView.cpp +++ b/hud/HudView.cpp @@ -238,6 +238,8 @@ void View::SetQueries(Hud::Queries queries) HudButton::Ptr button(new HudButton()); buttons_.push_front(button); + button->SetMinimumWidth(content_width); + button->SetMaximumWidth(content_width); button->SetQuery(query); button_views_->AddView(button.GetPointer(), 0, nux::MINOR_POSITION_LEFT); @@ -255,7 +257,6 @@ void View::SetQueries(Hud::Queries queries) query_selected.emit(dynamic_cast(area)->GetQuery()); }); - button->SetMinimumWidth(content_width); ++found_items; } -- cgit v1.2.3 From 4e802163de3e3a9a0e38b963df666b9fd9c99669 Mon Sep 17 00:00:00 2001 From: Christopher Lee Date: Wed, 27 Jun 2012 12:58:03 +1200 Subject: Added introspection for HudButtons (hud query results) (bzr r2438.5.1) --- hud/HudButton.cpp | 5 +++-- hud/HudView.cpp | 19 ++++++++++++++++--- hud/HudView.h | 5 ++++- 3 files changed, 23 insertions(+), 6 deletions(-) (limited to 'hud') diff --git a/hud/HudButton.cpp b/hud/HudButton.cpp index 138407f30..64ae06dfa 100644 --- a/hud/HudButton.cpp +++ b/hud/HudButton.cpp @@ -105,7 +105,7 @@ void HudButton::RedrawTheme(nux::Geometry const& geom, cairo_t* cr, nux::ButtonV bool HudButton::AcceptKeyNavFocus() { - // The button will not receive the keyboard focus. The keyboard focus is always to remain with the + // The button will not receive the keyboard focus. The keyboard focus is always to remain with the // text entry in the hud. return false; } @@ -209,7 +209,8 @@ std::string HudButton::GetName() const void HudButton::AddProperties(GVariantBuilder* builder) { variant::BuilderWrapper(builder) - .add("label", label()); + .add("label", label()) + .add("focused", fake_focused()); } } // namespace hud diff --git a/hud/HudView.cpp b/hud/HudView.cpp index 6c0e02531..0a809e93b 100644 --- a/hud/HudView.cpp +++ b/hud/HudView.cpp @@ -27,6 +27,8 @@ #include #include +#include "unity-shared/Introspectable.h" + #include "unity-shared/UBusMessages.h" #include "unity-shared/DashStyle.h" @@ -350,7 +352,7 @@ void View::SetupViews() { dash::Style& style = dash::Style::Instance(); - nux::VLayout* super_layout = new nux::VLayout(); + nux::VLayout* super_layout = new nux::VLayout(); layout_ = new nux::HLayout(); { // fill layout with icon @@ -398,7 +400,7 @@ void View::OnSearchChanged(std::string const& search_string) { button->fake_focused = false; } - + if (!buttons_.empty()) buttons_.back()->fake_focused = true; } @@ -457,7 +459,7 @@ void View::DrawContent(nux::GraphicsEngine& gfx_context, bool force_draw) x += content_width - 1; nux::GetPainter().Draw2DLine(gfx_context, x, y, x, y + height, nux::color::White * 0.13); } - + GetLayout()->ProcessDraw(gfx_context, force_draw); nux::GetPainter().PopBackgroundStack(); } @@ -500,6 +502,17 @@ void View::AddProperties(GVariantBuilder* builder) .add("num_buttons", num_buttons); } +debug::Introspectable::IntrospectableList const& View::GetIntrospectableChildren() +{ + introspectable_children_.clear(); + for (auto button: buttons_) + { + introspectable_children_.push_front(button.GetPointer()); + } + + return introspectable_children_; +} + bool View::InspectKeyEvent(unsigned int eventType, unsigned int key_sym, const char* character) diff --git a/hud/HudView.h b/hud/HudView.h index ca1e1a6f4..32a35a818 100644 --- a/hud/HudView.h +++ b/hud/HudView.h @@ -61,7 +61,7 @@ public: void AboutToHide(); void SetWindowGeometry(nux::Geometry const& absolute_geo, nux::Geometry const& geo); - + protected: virtual Area* FindKeyFocusArea(unsigned int event_type, unsigned long x11_key_code, @@ -71,6 +71,8 @@ protected: void OnSearchChanged(std::string const& search_string); virtual long PostLayoutManagement(long LayoutResult); + IntrospectableList introspectable_children_; + private: void OnMouseButtonDown(int x, int y, unsigned long button, unsigned long key); void OnKeyDown (unsigned long event_type, unsigned long event_keysym, @@ -87,6 +89,7 @@ private: std::string GetName() const; void AddProperties(GVariantBuilder* builder); + IntrospectableList const& GetIntrospectableChildren(); private: UBusManager ubus; -- cgit v1.2.3 From 9e84dac1cdf8e869283ab9c0e3b5ce87d65aed04 Mon Sep 17 00:00:00 2001 From: Andrea Azzarone Date: Wed, 27 Jun 2012 23:32:48 +0200 Subject: Fix bug 932531. (bzr r2447.1.1) --- hud/HudButton.cpp | 15 +++++++++++++++ hud/HudButton.h | 10 ++++++++-- hud/HudView.cpp | 5 +++++ 3 files changed, 28 insertions(+), 2 deletions(-) (limited to 'hud') diff --git a/hud/HudButton.cpp b/hud/HudButton.cpp index 3a36b045c..12d701d8b 100644 --- a/hud/HudButton.cpp +++ b/hud/HudButton.cpp @@ -52,10 +52,13 @@ namespace unity namespace hud { +NUX_IMPLEMENT_OBJECT_TYPE(HudButton); + HudButton::HudButton(NUX_FILE_LINE_DECL) : nux::Button(NUX_FILE_LINE_PARAM) , is_rounded(false) , is_focused_(false) + , skip_draw_(true) { hlayout_ = new nux::HLayout(NUX_TRACKER_LOCATION); hlayout_->SetLeftAndRightPadding(hlayout_left_padding, -1); @@ -130,6 +133,9 @@ long HudButton::ComputeContentSize() void HudButton::Draw(nux::GraphicsEngine& GfxContext, bool force_draw) { + if (skip_draw_) + return; + nux::Geometry const& geo = GetGeometry(); GfxContext.PushClippingRectangle(geo); gPainter.PaintBackground(GfxContext, geo); @@ -177,6 +183,9 @@ void HudButton::Draw(nux::GraphicsEngine& GfxContext, bool force_draw) void HudButton::DrawContent(nux::GraphicsEngine& GfxContext, bool force_draw) { + if (skip_draw_) + return; + if (IsFullRedraw()) { GfxContext.PushClippingRectangle(GetGeometry()); @@ -207,6 +216,12 @@ Query::Ptr HudButton::GetQuery() return query_; } +void HudButton::SetSkipDraw(bool skip_draw) +{ + skip_draw_ = skip_draw; +} + + // Introspectable std::string HudButton::GetName() const { diff --git a/hud/HudButton.h b/hud/HudButton.h index 555f5ab38..9ccf43d14 100644 --- a/hud/HudButton.h +++ b/hud/HudButton.h @@ -38,8 +38,8 @@ namespace hud class HudButton : public nux::Button, public unity::debug::Introspectable { - typedef nux::ObjectPtr BaseTexturePtr; - typedef std::unique_ptr NuxCairoPtr; + NUX_DECLARE_OBJECT_TYPE(HudButton, nux::Button); + public: typedef nux::ObjectPtr Ptr; @@ -48,6 +48,8 @@ public: void SetQuery(Query::Ptr query); std::shared_ptr GetQuery(); + void SetSkipDraw(bool skip_draw); + nux::Property label; nux::Property is_rounded; nux::Property fake_focused; @@ -65,9 +67,13 @@ protected: void RedrawTheme(nux::Geometry const& geom, cairo_t* cr, nux::ButtonVisualState faked_state); private: + typedef std::unique_ptr NuxCairoPtr; + Query::Ptr query_; nux::Geometry cached_geometry_; + bool is_focused_; + bool skip_draw_; NuxCairoPtr prelight_; NuxCairoPtr active_; diff --git a/hud/HudView.cpp b/hud/HudView.cpp index 150492452..725648a62 100644 --- a/hud/HudView.cpp +++ b/hud/HudView.cpp @@ -151,6 +151,11 @@ void View::ProcessGrowShrink() current_height_ = new_height; } + for (auto button : buttons_) + { + button->SetSkipDraw((button->GetAbsoluteY() + button->GetBaseHeight()) > (GetAbsoluteY() + current_height_)); + } + QueueDraw(); if (diff > grow_anim_length + pause_before_grow_length) -- cgit v1.2.3 From 0c2a54bc5303986827129a597a3531596c781b91 Mon Sep 17 00:00:00 2001 From: Thomi Richards Date: Fri, 29 Jun 2012 09:51:29 +1200 Subject: Fix hud searchbar and icon not being found. (bzr r2444.2.1) --- hud/HudView.cpp | 7 ++----- hud/HudView.h | 5 ++--- 2 files changed, 4 insertions(+), 8 deletions(-) (limited to 'hud') diff --git a/hud/HudView.cpp b/hud/HudView.cpp index 921c7713c..271e80593 100644 --- a/hud/HudView.cpp +++ b/hud/HudView.cpp @@ -118,10 +118,6 @@ View::View() View::~View() { - for (auto button = buttons_.begin(); button != buttons_.end(); button++) - { - RemoveChild((*button).GetPointer()); - } } void View::ProcessGrowShrink() @@ -504,9 +500,10 @@ void View::AddProperties(GVariantBuilder* builder) .add("num_buttons", num_buttons); } -debug::Introspectable::IntrospectableList const& View::GetIntrospectableChildren() +debug::Introspectable::IntrospectableList View::GetIntrospectableChildren() { introspectable_children_.clear(); + introspectable_children_.merge(debug::Introspectable::GetIntrospectableChildren()); for (auto button: buttons_) { introspectable_children_.push_front(button.GetPointer()); diff --git a/hud/HudView.h b/hud/HudView.h index 32a35a818..8e654b49f 100644 --- a/hud/HudView.h +++ b/hud/HudView.h @@ -71,8 +71,6 @@ protected: void OnSearchChanged(std::string const& search_string); virtual long PostLayoutManagement(long LayoutResult); - IntrospectableList introspectable_children_; - private: void OnMouseButtonDown(int x, int y, unsigned long button, unsigned long key); void OnKeyDown (unsigned long event_type, unsigned long event_keysym, @@ -89,7 +87,7 @@ private: std::string GetName() const; void AddProperties(GVariantBuilder* builder); - IntrospectableList const& GetIntrospectableChildren(); + IntrospectableList GetIntrospectableChildren(); private: UBusManager ubus; @@ -97,6 +95,7 @@ private: nux::ObjectPtr content_layout_; nux::ObjectPtr button_views_; std::list buttons_; + IntrospectableList introspectable_children_; //FIXME - replace with dash search bar once modifications to dash search bar land SearchBar::Ptr search_bar_; -- cgit v1.2.3 From dbe8d5e2d849a7b00adfa4d3cabb86eeaa48c215 Mon Sep 17 00:00:00 2001 From: Brandon Schaefer Date: Fri, 29 Jun 2012 16:17:10 -0700 Subject: * Alt+F4 closes the hud (bzr r2455.2.1) --- hud/HudView.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'hud') diff --git a/hud/HudView.cpp b/hud/HudView.cpp index 150492452..28dc3fb48 100644 --- a/hud/HudView.cpp +++ b/hud/HudView.cpp @@ -589,6 +589,12 @@ nux::Area* View::FindKeyFocusArea(unsigned int event_type, // Not sure if Enter should be a navigation key direction = nux::KEY_NAV_ENTER; break; + case NUX_VK_F4: + if (special_keys_state & NUX_STATE_ALT) + { + ubus.SendMessage(UBUS_HUD_CLOSE_REQUEST); + } + break; default: direction = nux::KEY_NAV_NONE; break; -- cgit v1.2.3 From 96abc848658f2770dbe7e98108e4249688fdd8c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Tue, 3 Jul 2012 06:19:21 +0200 Subject: IMTextEntry: updated to match the new interface of lp:~3v1n0/nux/text-entry-virtual-clipboard (bzr r2463.2.1) --- hud/HudView.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'hud') diff --git a/hud/HudView.cpp b/hud/HudView.cpp index d1f77fa2f..d45a741a0 100644 --- a/hud/HudView.cpp +++ b/hud/HudView.cpp @@ -255,7 +255,7 @@ void View::SetQueries(Hud::Queries queries) query_activated.emit(dynamic_cast(area)->GetQuery()); }); - button->key_nav_focus_change.connect([&](nux::Area* area, bool recieving, KeyNavDirection direction){ + button->key_nav_focus_change.connect([&](nux::Area* area, bool recieving, nux::KeyNavDirection direction){ if (recieving) query_selected.emit(dynamic_cast(area)->GetQuery()); }); @@ -592,7 +592,7 @@ nux::Area* View::FindKeyFocusArea(unsigned int event_type, direction = nux::KEY_NAV_ENTER; break; case NUX_VK_F4: - if (special_keys_state & NUX_STATE_ALT) + if (special_keys_state == nux::NUX_STATE_ALT) { ubus.SendMessage(UBUS_HUD_CLOSE_REQUEST); } -- cgit v1.2.3 From 0fb0151f6b77a6a5165636d23c1e0331205a178e Mon Sep 17 00:00:00 2001 From: "timo.jyrinki@canonical.com" <> Date: Fri, 6 Jul 2012 08:51:47 +0300 Subject: Use a more concise form for the ARM changes. (bzr r2434.3.2) --- hud/CMakeLists.txt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'hud') diff --git a/hud/CMakeLists.txt b/hud/CMakeLists.txt index fa489e45d..5c31a472e 100644 --- a/hud/CMakeLists.txt +++ b/hud/CMakeLists.txt @@ -17,10 +17,13 @@ endif (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64") add_definitions (${CFLAGS}) if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "armv7l") - set (LIBS ${CACHED_UNITY_DEPS_LIBRARIES} "-lunity-core-${UNITY_API_VERSION} -lm") -else() - set (LIBS ${CACHED_UNITY_DEPS_LIBRARIES} "-lunity-core-${UNITY_API_VERSION} -lm -lGL -lGLU") -endif() + set (UNITY_STANDALONE_LADD "-lunity-core-${UNITY_API_VERSION} -lm") +else () + set (UNITY_STANDALONE_LADD "-lunity-core-${UNITY_API_VERSION} -lm -lGL -lGLU") +endif () + +set (LIBS ${CACHED_UNITY_DEPS_LIBRARIES} ${UNITY_STANDALONE_LADD}) + link_libraries (${LIBS}) set (LIB_PATHS ${CACHED_UNITY_DEPS_LIBRARY_DIRS}) -- cgit v1.2.3 From 49a15ce3b79313c7a183006152f07d5b7d7e1db3 Mon Sep 17 00:00:00 2001 From: "timo.jyrinki@canonical.com" <> Date: Fri, 6 Jul 2012 13:20:29 +0300 Subject: Move the check to the top-level CMakeLists.txt (bzr r2434.3.4) --- hud/CMakeLists.txt | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'hud') diff --git a/hud/CMakeLists.txt b/hud/CMakeLists.txt index 5c31a472e..4da89417c 100644 --- a/hud/CMakeLists.txt +++ b/hud/CMakeLists.txt @@ -12,16 +12,10 @@ set (CFLAGS if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64" OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "armv7l") set (CFLAGS ${CFLAGS} "-fPIC") -endif (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64") +endif (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64" OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "armv7l") add_definitions (${CFLAGS}) -if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "armv7l") - set (UNITY_STANDALONE_LADD "-lunity-core-${UNITY_API_VERSION} -lm") -else () - set (UNITY_STANDALONE_LADD "-lunity-core-${UNITY_API_VERSION} -lm -lGL -lGLU") -endif () - set (LIBS ${CACHED_UNITY_DEPS_LIBRARIES} ${UNITY_STANDALONE_LADD}) link_libraries (${LIBS}) -- cgit v1.2.3 From ade51316aeb07dd68434b2c5e35330170a679ca4 Mon Sep 17 00:00:00 2001 From: Thomi Richards Date: Tue, 10 Jul 2012 15:25:09 +1200 Subject: Hud test passes. (bzr r2480.1.3) --- hud/HudView.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'hud') diff --git a/hud/HudView.cpp b/hud/HudView.cpp index d45a741a0..56b854309 100644 --- a/hud/HudView.cpp +++ b/hud/HudView.cpp @@ -565,6 +565,10 @@ nux::Area* View::FindKeyFocusArea(unsigned int event_type, unsigned long x11_key_code, unsigned long special_keys_state) { + // Only care about states of Alt, Ctrl, Super, Shift, not the lock keys + special_keys_state &= (nux::NUX_STATE_ALT | nux::NUX_STATE_CTRL | + nux::NUX_STATE_SUPER | nux::NUX_STATE_SHIFT); + nux::KeyNavDirection direction = nux::KEY_NAV_NONE; switch (x11_key_code) { -- cgit v1.2.3 From fa061c196eabd88536d6629634c84e084f2516cc Mon Sep 17 00:00:00 2001 From: Thomi Richards Date: Tue, 10 Jul 2012 15:27:49 +1200 Subject: Dash test passes now too. (bzr r2480.1.4) --- hud/HudView.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hud') diff --git a/hud/HudView.cpp b/hud/HudView.cpp index 56b854309..54e77f1f5 100644 --- a/hud/HudView.cpp +++ b/hud/HudView.cpp @@ -565,7 +565,7 @@ nux::Area* View::FindKeyFocusArea(unsigned int event_type, unsigned long x11_key_code, unsigned long special_keys_state) { - // Only care about states of Alt, Ctrl, Super, Shift, not the lock keys + // Only care about states of Alt, Ctrl, Super, Shift, not the lock keys special_keys_state &= (nux::NUX_STATE_ALT | nux::NUX_STATE_CTRL | nux::NUX_STATE_SUPER | nux::NUX_STATE_SHIFT); -- cgit v1.2.3