Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
xfce4-screenshooter
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Apps
xfce4-screenshooter
Commits
01243927
Commit
01243927
authored
16 years ago
by
Jerome Guelfucci
Browse files
Options
Downloads
Patches
Plain Diff
Try to improve a bit the grabbing of borders
(Old svn revision: 6262)
parent
361f5e49
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/screenshooter-utils.c
+11
-13
11 additions, 13 deletions
lib/screenshooter-utils.c
with
11 additions
and
13 deletions
lib/screenshooter-utils.c
+
11
−
13
View file @
01243927
...
...
@@ -92,8 +92,8 @@ static GdkWindow
}
else
{
window2
=
gdk_window_
foreign_new
(
find
_toplevel
_
window
(
GDK_WINDOW_XID
(
window
)));
window2
=
gdk_window_
get
_toplevel
(
window
);
g_object_unref
(
window
);
window
=
window2
;
...
...
@@ -107,27 +107,25 @@ static GdkWindow
static
GdkPixbuf
*
get_window_screenshot
(
GdkWindow
*
window
)
{
gint
x_real_orig
,
y_real_orig
,
x_orig
,
y_orig
;
gint
width
,
real_width
,
height
,
real_
height
;
gint
x_orig
,
y_orig
;
gint
width
,
height
;
GdkPixbuf
*
screenshot
;
GdkWindow
*
root
;
GdkRectangle
*
rectangle
=
g_new0
(
GdkRectangle
,
1
);
/* Get the root window */
root
=
gdk_get_default_root_window
();
/* Based on gnome-screenshot code */
gdk_window_get_frame_extents
(
window
,
rectangle
);
/* Get the size and the origin of the part of the screen we want to
* screenshot. */
gdk_drawable_get_size
(
window
,
&
real_width
,
&
real_height
);
gdk_window_get_origin
(
window
,
&
x_real_orig
,
&
y_real_orig
);
/* Don't grab thing offscreen. */
x_orig
=
x_real_orig
;
y_orig
=
y_real_orig
;
width
=
re
al_
width
;
height
=
re
al_
height
;
x_orig
=
rectangle
->
x
;
y_orig
=
rectangle
->
y
;
width
=
re
ctangle
->
width
;
height
=
re
ctangle
->
height
;
if
(
x_orig
<
0
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment