summaryrefslogtreecommitdiffstats
path: root/client/screen.h
diff options
context:
space:
mode:
authorYaniv Kamay <ykamay@redhat.com>2009-12-28 00:17:42 +0200
committerYaniv Kamay <ykamay@redhat.com>2009-12-28 12:35:32 +0200
commitcced1b1cff4002e2402936ff033ce985668e59e5 (patch)
tree002c66212e423c5536080e5dd6f6d046501919df /client/screen.h
parent941ba9bf5ca9a8812e7893848943c2cec6a5e6a6 (diff)
downloadspice-cced1b1cff4002e2402936ff033ce985668e59e5.tar.gz
spice-cced1b1cff4002e2402936ff033ce985668e59e5.tar.xz
spice-cced1b1cff4002e2402936ff033ce985668e59e5.zip
client: improve screen resizing
Screen now have to modes locked and unlocked. In unlocked mode, the application can change screen size and so reduce resolution changing. The application can also choose to change window size while not in full screen mode. In locked mode the application must ewtain locker screen size setting.
Diffstat (limited to 'client/screen.h')
-rw-r--r--client/screen.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/client/screen.h b/client/screen.h
index 3321c2ff..5952fe81 100644
--- a/client/screen.h
+++ b/client/screen.h
@@ -58,7 +58,7 @@ public:
void attach_layer(ScreenLayer& layer);
void detach_layer(ScreenLayer& layer);
void on_layer_changed(ScreenLayer& layer);
- void set_mode(int width, int height, int depth);
+ void resize(int width, int height);
void set_name(const std::wstring& name);
uint64_t invalidate(const Rect& rect, bool urgent);
void invalidate(const QRegion &region);
@@ -68,6 +68,9 @@ public:
bool intercepts_sys_key() { return _key_interception;}
Point get_size() { return _size;}
bool has_monitor() { return _monitor != 0;}
+ void lock_size();
+ void unlock_size();
+ bool is_size_locked() { return _size_locked;}
void set_monitor(Monitor *monitor) { _monitor = monitor;}
Monitor* get_monitor() { return _monitor;}
RedWindow* get_window() { return &_window;}
@@ -154,7 +157,7 @@ private:
private:
Application& _owner;
int _id;
- int _refs;
+ AtomicCount _refs;
std::wstring _name;
RedWindow _window;
std::vector<ScreenLayer*> _layes;
@@ -167,6 +170,7 @@ private:
bool _periodic_update;
bool _key_interception;
bool _update_by_timer;
+ bool _size_locked;
int _forec_update_timer;
AutoRef<UpdateTimer> _update_timer;
RedDrawable* _composit_area;