summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/application.cpp15
-rw-r--r--client/application.h11
-rw-r--r--client/display_channel.cpp18
3 files changed, 27 insertions, 17 deletions
diff --git a/client/application.cpp b/client/application.cpp
index 724eb338..9add9d37 100644
--- a/client/application.cpp
+++ b/client/application.cpp
@@ -79,6 +79,12 @@ void ConnectionErrorEvent::response(AbstractProcessLoop& events_loop)
#endif
}
+void VisibilityEvent::response(AbstractProcessLoop& events_loop)
+{
+ Application* app = static_cast<Application*>(events_loop.get_owner());
+ app->on_visibility_start(_screen_id);
+}
+
void MonitorsQuery::do_response(AbstractProcessLoop& events_loop)
{
Monitor* mon;
@@ -597,6 +603,15 @@ void Application::on_connected()
{
}
+void Application::on_visibility_start(int screen_id)
+{
+ if (screen_id) {
+ return;
+ }
+
+ hide_splash(0);
+}
+
void Application::on_disconnecting()
{
release_capture();
diff --git a/client/application.h b/client/application.h
index c5e0e141..757ee3a2 100644
--- a/client/application.h
+++ b/client/application.h
@@ -55,6 +55,16 @@ private:
int _error_code;
};
+class VisibilityEvent: public Event {
+public:
+ VisibilityEvent(int screen_id) : _screen_id (screen_id) {}
+
+ virtual void response(AbstractProcessLoop& events_loop);
+
+private:
+ int _screen_id;
+};
+
struct MonitorInfo {
int depth;
Point size;
@@ -143,6 +153,7 @@ public:
virtual void on_display_mode_change();
void on_connected();
void on_disconnecting();
+ void on_visibility_start(int screen_id);
bool rearrange_monitors(RedScreen& screen);
void enter_full_screen();
diff --git a/client/display_channel.cpp b/client/display_channel.cpp
index 0050a21c..9d10bc7b 100644
--- a/client/display_channel.cpp
+++ b/client/display_channel.cpp
@@ -88,22 +88,6 @@ private:
AutoRef<RedScreen> _screen;
};
-class DisplayMarkEvent: public Event {
-public:
- DisplayMarkEvent(int screen_id)
- : _screen_id (screen_id)
- {
- }
-
- virtual void response(AbstractProcessLoop& events_loop)
- {
- static_cast<Application*>(events_loop.get_owner())->hide_splash(_screen_id);
- }
-
-private:
- int _screen_id;
-};
-
#define CLIP_ARRAY_SIZE 1500
#define CLIP_ARRAY_SHIFT 500
@@ -1290,7 +1274,7 @@ void DisplayChannel::handle_mark(RedPeer::InMessage *message)
area.right = _x_res;
area.bottom = _y_res;
- AutoRef<DisplayMarkEvent> event(new DisplayMarkEvent(get_id()));
+ AutoRef<VisibilityEvent> event(new VisibilityEvent(get_id()));
get_client().push_event(*event);
set_rect_area(area);
}