Bug 25113 - XCopyArea() does not work in Xinerama
Summary: XCopyArea() does not work in Xinerama
Status: RESOLVED MOVED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: git
Hardware: All All
: high normal
Assignee: Arvind Umrao
QA Contact: Xorg Project Team
URL:
Whiteboard: 2011BRB_Reviewed
Keywords: patch
Depends on:
Blocks:
 
Reported: 2009-11-16 02:31 UTC by Arvind Umrao
Modified: 2018-12-13 22:21 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
To compile the test sample cc -lX11 test.c (1015 bytes, application/zip)
2009-11-16 02:31 UTC, Arvind Umrao
no flags Details
patch for bug 25113 (14.84 KB, application/octet-stream)
2009-11-16 03:42 UTC, Arvind Umrao
no flags Details
xorg.conf file for setting up Xinerama (2.43 KB, application/octet-stream)
2011-10-14 09:14 UTC, Arvind Umrao
no flags Details
Patch fix (11.46 KB, patch)
2011-10-14 09:16 UTC, Arvind Umrao
no flags Details | Splinter Review

Description Arvind Umrao 2009-11-16 02:31:53 UTC
Created attachment 31225 [details]
 To compile the test sample cc -lX11 test.c 

XCopyArea() does not copy areas of the screen between physical displays.

See attached test program, it creates a rectangle on screen 1 and copies that area to anywhere where the mouse is pressed. It only works on screen 1. Also if I move the drawing to screen 2 and do it from there it only works on screen 2.

To compile the test sample cc -lX11 test.c
Comment 1 Arvind Umrao 2009-11-16 03:42:02 UTC
Created attachment 31226 [details]
patch for bug 25113

Description of the change:
This bug was first reported for Xsun. Two months back I have fixed Xsun,in Nevada. Xserver team in SUN reviewed my code changes.

Xcopy does not work, when we xcopy image from one screen to other in Xinerama mode. The solution to the problem is use internal xcopy  instead of regular xcopy. Lines of code I have added is to detect if copied image( destination coordinate) not lies in same  screen of source image, then call internal xcopy instead of regular xcopy.
*1) Internal Xcopy*
In Internal Xcopy  temporary buffer is allocated and Xineramadata is copied .  Size of temporary buffer is same as drawing object(stuff). GetImage reads the image(Xineramadata) from all intersection boxes. When image overlaps between two or more screens, we can visualize portion of image in intersection boxes.

*2) Regular xcopy*
*Regular xcopy calls the regular copyimage. Regular copyimage will be much faster, because it does not call  getimage or putimage.* 


My code changes are well commented


Testing 
a)I have tested my fixes using two XVR2500 frame buffer on SPARC Ultra 45 with Xinerama on.
b)Also I have tested my fixes on Sunray with Xinerama on.
Comment 2 Arvind Umrao 2009-11-16 03:44:14 UTC
XCopyArea() does not work in Xinerama mode. XCopyArea() does not copy areas of the screen between physical displays.

Description of the change:
This bug was first reported for Xsun. Two months back I have fixed Xsun,in Nevada. Xserver team in SUN reviewed my code changes.

Xcopy does not work, when we xcopy image from one screen to other in Xinerama mode. The solution to the problem is use internal xcopy  instead of regular xcopy. Lines of code I have added is to detect if copied image( destination coordinate) not lies in same  screen of source image, then call internal xcopy instead of regular xcopy.
*1) Internal Xcopy*
In Internal Xcopy  temporary buffer is allocated and Xineramadata is copied .  Size of temporary buffer is same as drawing object(stuff). GetImage reads the image(Xineramadata) from all intersection boxes. When image overlaps between two or more screens, we can visualize portion of image in intersection boxes.

*2) Regular xcopy*
*Regular xcopy calls the regular copyimage. Regular copyimage will be much faster, because it does not call  getimage or putimage.* 


My code changes are well commented


Testing 
a)I have tested my fixes using two XVR2500 frame buffer on SPARC Ultra 45 with Xinerama on.
b)Also I have tested my fixes on Sunray with Xinerama on.
Comment 3 Jeremy Huddleston Sequoia 2011-10-05 21:20:13 UTC
Please send your patch to xorg-devel for review.
Comment 4 Arvind Umrao 2011-10-14 09:14:51 UTC
Created attachment 52343 [details]
xorg.conf file for setting up Xinerama
Comment 5 Arvind Umrao 2011-10-14 09:16:58 UTC
Created attachment 52344 [details] [review]
Patch fix
Comment 6 Adam Jackson 2018-07-30 15:46:40 UTC
Whatever these bugs are, they are probably not libXext's fault.
Comment 7 GitLab Migration User 2018-12-13 22:21:47 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/xserver/issues/385.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.