Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Geithner, Thomas
desk-control
Commits
12d3ff2a
Commit
12d3ff2a
authored
Oct 11, 2017
by
Mall, Anon
Browse files
maxheight minheight now taken in account when changing height
parent
f28f9d40
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/desk-controller.cpp
View file @
12d3ff2a
...
...
@@ -156,8 +156,10 @@ LinakDesk::setHeight(int height)
cout
<<
__func__
<<
": "
<<
height
<<
endl
;
unique_lock
<
mutex
>
lck
(
m_cmdMutex
);
height
-=
m_offset
;
m_targetHeight
=
height
>
MAX_HEIGHT
?
MAX_HEIGHT
:
height
;
m_targetHeight
=
m_targetHeight
<
MIN_HEIGHT
?
MIN_HEIGHT
:
m_targetHeight
;
int
maxHeight
=
m_maxHeight
-
m_offset
;
int
minHeight
=
m_minHeight
-
m_offset
;
m_targetHeight
=
height
>
maxHeight
?
maxHeight
:
height
;
m_targetHeight
=
m_targetHeight
<
minHeight
?
minHeight
:
m_targetHeight
;
lck
.
unlock
();
cout
<<
__func__
<<
" set height: "
<<
m_targetHeight
<<
endl
;
m_queue
.
addMessage
(
m_targetHeight
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment