Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
P
phosh
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Guido Gunther
phosh
Commits
b403b6ff
Commit
b403b6ff
authored
Apr 06, 2018
by
Guido Gunther
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
phosh_shell_get_usable_area: Allow for NULL arguments
If one only needs certain values others can be passed as NULL
parent
3c9d5c63
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
6 deletions
+13
-6
src/phosh.c
src/phosh.c
+13
-6
No files found.
src/phosh.c
View file @
b403b6ff
...
...
@@ -538,6 +538,7 @@ phosh_shell_get_usable_area (PhoshShell *self, gint *x, gint *y, gint *width, gi
GdkMonitor
*
monitor
=
gdk_display_get_monitor
(
display
,
0
);
GdkRectangle
geom
;
gint
panel_height
=
0
;
gint
w
,
h
;
g_return_if_fail
(
monitor
);
gdk_monitor_get_geometry
(
monitor
,
&
geom
);
...
...
@@ -548,15 +549,21 @@ phosh_shell_get_usable_area (PhoshShell *self, gint *x, gint *y, gint *width, gi
/* GDK fails to take rotation into account
* https://bugzilla.gnome.org/show_bug.cgi?id=793618 */
if
(
priv
->
rotation
!=
90
&&
priv
->
rotation
!=
270
)
{
*
width
=
geom
.
width
;
*
height
=
geom
.
height
-
panel_height
;
w
=
geom
.
width
;
h
=
geom
.
height
-
panel_height
;
}
else
{
*
width
=
geom
.
height
;
*
height
=
geom
.
width
-
panel_height
;
w
=
geom
.
height
;
h
=
geom
.
width
-
panel_height
;
}
*
x
=
0
;
*
y
=
panel_height
;
if
(
x
)
*
x
=
0
;
if
(
y
)
*
y
=
panel_height
;
if
(
width
)
*
width
=
w
;
if
(
height
)
*
height
=
h
;
}
...
...
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