Lines 938-943
Link Here
|
938 |
*/ |
938 |
*/ |
939 |
window_info.width=(unsigned int) image_list[0]->columns; |
939 |
window_info.width=(unsigned int) image_list[0]->columns; |
940 |
window_info.height=(unsigned int) image_list[0]->rows; |
940 |
window_info.height=(unsigned int) image_list[0]->rows; |
|
|
941 |
if ((image_list[0]->columns != window_info.width) || |
942 |
(image_list[0]->rows != window_info.height)) |
943 |
ThrowXWindowFatalException(XServerFatalError,"UnableToCreateXImage", |
944 |
image_list[0]->filename); |
941 |
(void) FormatMagickString(geometry,MaxTextExtent,"%ux%u+0+0>", |
945 |
(void) FormatMagickString(geometry,MaxTextExtent,"%ux%u+0+0>", |
942 |
window_attributes.width,window_attributes.height); |
946 |
window_attributes.width,window_attributes.height); |
943 |
geometry_info.width=window_info.width; |
947 |
geometry_info.width=window_info.width; |
Lines 1053-1058
Link Here
|
1053 |
window_info.matte_pixmaps[0]=window_info.pixmap; |
1057 |
window_info.matte_pixmaps[0]=window_info.pixmap; |
1054 |
for (scene=1; scene < (int) number_scenes; scene++) |
1058 |
for (scene=1; scene < (int) number_scenes; scene++) |
1055 |
{ |
1059 |
{ |
|
|
1060 |
unsigned int |
1061 |
columns, |
1062 |
rows; |
1063 |
|
1056 |
/* |
1064 |
/* |
1057 |
Create X image. |
1065 |
Create X image. |
1058 |
*/ |
1066 |
*/ |
Lines 1064-1081
Link Here
|
1064 |
if (image_list[scene]->storage_class == PseudoClass) |
1072 |
if (image_list[scene]->storage_class == PseudoClass) |
1065 |
XGetPixelPacket(display,visual_info,map_info,&resources, |
1073 |
XGetPixelPacket(display,visual_info,map_info,&resources, |
1066 |
image_list[scene],window_info.pixel_info); |
1074 |
image_list[scene],window_info.pixel_info); |
|
|
1075 |
columns=(unsigned int) image_list[scene]->columns; |
1076 |
rows=(unsigned int) image_list[scene]->rows; |
1077 |
if ((image_list[scene]->columns != columns) || |
1078 |
(image_list[scene]->rows != rows)) |
1079 |
ThrowXWindowFatalException(XServerFatalError,"UnableToCreateXImage", |
1080 |
image_list[scene]->filename); |
1067 |
status=XMakeImage(display,&resources,&window_info,image_list[scene], |
1081 |
status=XMakeImage(display,&resources,&window_info,image_list[scene], |
1068 |
(unsigned int) image_list[scene]->columns, |
1082 |
columns,rows); |
1069 |
(unsigned int) image_list[scene]->rows); |
|
|
1070 |
if (status == MagickFalse) |
1083 |
if (status == MagickFalse) |
1071 |
ThrowXWindowFatalException(XServerFatalError,"UnableToCreateXImage", |
1084 |
ThrowXWindowFatalException(XServerFatalError,"UnableToCreateXImage", |
1072 |
images->filename); |
1085 |
images->filename); |
1073 |
if (display_image->debug != MagickFalse) |
1086 |
if (display_image->debug != MagickFalse) |
1074 |
{ |
1087 |
{ |
1075 |
(void) LogMagickEvent(X11Event,GetMagickModule(), |
1088 |
(void) LogMagickEvent(X11Event,GetMagickModule(), |
1076 |
"Image: [%lu] %s %lux%lu ",image_list[scene]->scene, |
1089 |
"Image: [%lu] %s %ux%u ",image_list[scene]->scene, |
1077 |
image_list[scene]->filename,image_list[scene]->columns, |
1090 |
image_list[scene]->filename,columns,rows); |
1078 |
image_list[scene]->rows); |
|
|
1079 |
if (image_list[scene]->colors != 0) |
1091 |
if (image_list[scene]->colors != 0) |
1080 |
(void) LogMagickEvent(X11Event,GetMagickModule(),"%luc ", |
1092 |
(void) LogMagickEvent(X11Event,GetMagickModule(),"%luc ", |
1081 |
image_list[scene]->colors); |
1093 |
image_list[scene]->colors); |
Lines 1085-1103
Link Here
|
1085 |
/* |
1097 |
/* |
1086 |
Create the X pixmap. |
1098 |
Create the X pixmap. |
1087 |
*/ |
1099 |
*/ |
1088 |
window_info.pixmap=XCreatePixmap(display,window_info.id, |
1100 |
window_info.pixmap=XCreatePixmap(display,window_info.id,width,height, |
1089 |
(unsigned int) width,(unsigned int) height,window_info.depth); |
1101 |
window_info.depth); |
1090 |
if (window_info.pixmap == (Pixmap) NULL) |
1102 |
if (window_info.pixmap == (Pixmap) NULL) |
1091 |
ThrowXWindowFatalException(XServerFatalError,"UnableToCreateXPixmap", |
1103 |
ThrowXWindowFatalException(XServerFatalError,"UnableToCreateXPixmap", |
1092 |
images->filename); |
1104 |
images->filename); |
1093 |
/* |
1105 |
/* |
1094 |
Display pixmap on the window. |
1106 |
Display pixmap on the window. |
1095 |
*/ |
1107 |
*/ |
1096 |
if (((unsigned int) width > window_info.width) || |
1108 |
if ((width > window_info.width) || (height > window_info.height)) |
1097 |
((unsigned int) height > window_info.height)) |
|
|
1098 |
(void) XFillRectangle(display,window_info.pixmap, |
1109 |
(void) XFillRectangle(display,window_info.pixmap, |
1099 |
window_info.annotate_context,0,0,(unsigned int) width, |
1110 |
window_info.annotate_context,0,0,width,height); |
1100 |
(unsigned int) height); |
|
|
1101 |
(void) XPutImage(display,window_info.pixmap,window_info.annotate_context, |
1111 |
(void) XPutImage(display,window_info.pixmap,window_info.annotate_context, |
1102 |
window_info.ximage,0,0,window_info.x,window_info.y,window_info.width, |
1112 |
window_info.ximage,0,0,window_info.x,window_info.y,window_info.width, |
1103 |
window_info.height); |
1113 |
window_info.height); |
Lines 1536-1543
Link Here
|
1536 |
windows->context.id=(Window) NULL; |
1546 |
windows->context.id=(Window) NULL; |
1537 |
XGetWindowInfo(display,visual_info,map_info,pixel,font_info, |
1547 |
XGetWindowInfo(display,visual_info,map_info,pixel,font_info, |
1538 |
resource_info,&windows->context); |
1548 |
resource_info,&windows->context); |
1539 |
CloneString(&class_hints->res_name,"superclass"); |
1549 |
(void) CloneString(&class_hints->res_name,"superclass"); |
1540 |
CloneString(&class_hints->res_class,"Display"); |
1550 |
(void) CloneString(&class_hints->res_class,"Display"); |
1541 |
manager_hints->flags=InputHint | StateHint; |
1551 |
manager_hints->flags=InputHint | StateHint; |
1542 |
manager_hints->input=MagickFalse; |
1552 |
manager_hints->input=MagickFalse; |
1543 |
manager_hints->initial_state=WithdrawnState; |
1553 |
manager_hints->initial_state=WithdrawnState; |
Lines 1589-1595
Link Here
|
1589 |
windows->icon.attributes.colormap= |
1599 |
windows->icon.attributes.colormap= |
1590 |
XDefaultColormap(display,icon_visual->screen); |
1600 |
XDefaultColormap(display,icon_visual->screen); |
1591 |
windows->icon.attributes.event_mask=ExposureMask | StructureNotifyMask; |
1601 |
windows->icon.attributes.event_mask=ExposureMask | StructureNotifyMask; |
1592 |
CloneString(&class_hints->res_name,"icon"); |
1602 |
(void) CloneString(&class_hints->res_name,"icon"); |
1593 |
manager_hints->flags=InputHint | StateHint; |
1603 |
manager_hints->flags=InputHint | StateHint; |
1594 |
manager_hints->input=MagickFalse; |
1604 |
manager_hints->input=MagickFalse; |
1595 |
manager_hints->initial_state=IconicState; |
1605 |
manager_hints->initial_state=IconicState; |
Lines 1684-1690
Link Here
|
1684 |
ButtonReleaseMask; |
1694 |
ButtonReleaseMask; |
1685 |
windows->backdrop.attributes.event_mask=ButtonPressMask | KeyPressMask | |
1695 |
windows->backdrop.attributes.event_mask=ButtonPressMask | KeyPressMask | |
1686 |
StructureNotifyMask; |
1696 |
StructureNotifyMask; |
1687 |
CloneString(&class_hints->res_name,"backdrop"); |
1697 |
(void) CloneString(&class_hints->res_name,"backdrop"); |
1688 |
manager_hints->flags=IconWindowHint | InputHint | StateHint; |
1698 |
manager_hints->flags=IconWindowHint | InputHint | StateHint; |
1689 |
manager_hints->icon_window=windows->icon.id; |
1699 |
manager_hints->icon_window=windows->icon.id; |
1690 |
manager_hints->input=MagickTrue; |
1700 |
manager_hints->input=MagickTrue; |
Lines 1712-1720
Link Here
|
1712 |
(windows->image.height/2); |
1722 |
(windows->image.height/2); |
1713 |
} |
1723 |
} |
1714 |
if (resource_info->name == (char *) NULL) |
1724 |
if (resource_info->name == (char *) NULL) |
1715 |
CloneString(&class_hints->res_name,resource_info->client_name); |
1725 |
(void) CloneString(&class_hints->res_name,resource_info->client_name); |
1716 |
else |
1726 |
else |
1717 |
CloneString(&class_hints->res_name,resource_info->name); |
1727 |
(void) CloneString(&class_hints->res_name,resource_info->name); |
1718 |
manager_hints->flags=IconWindowHint | InputHint | StateHint; |
1728 |
manager_hints->flags=IconWindowHint | InputHint | StateHint; |
1719 |
manager_hints->icon_window=windows->icon.id; |
1729 |
manager_hints->icon_window=windows->icon.id; |
1720 |
manager_hints->input=MagickTrue; |
1730 |
manager_hints->input=MagickTrue; |
Lines 1755-1763
Link Here
|
1755 |
windows->info.y=2; |
1765 |
windows->info.y=2; |
1756 |
windows->info.flags|=PPosition; |
1766 |
windows->info.flags|=PPosition; |
1757 |
windows->info.attributes.win_gravity=UnmapGravity; |
1767 |
windows->info.attributes.win_gravity=UnmapGravity; |
1758 |
windows->info.attributes.event_mask= |
1768 |
windows->info.attributes.event_mask=ButtonPressMask | ExposureMask | |
1759 |
ButtonPressMask | ExposureMask | StructureNotifyMask; |
1769 |
StructureNotifyMask; |
1760 |
CloneString(&class_hints->res_name,"info"); |
1770 |
(void) CloneString(&class_hints->res_name,"info"); |
1761 |
manager_hints->flags=InputHint | StateHint | WindowGroupHint; |
1771 |
manager_hints->flags=InputHint | StateHint | WindowGroupHint; |
1762 |
manager_hints->input=MagickFalse; |
1772 |
manager_hints->input=MagickFalse; |
1763 |
manager_hints->initial_state=NormalState; |
1773 |
manager_hints->initial_state=NormalState; |
Lines 1791-1797
Link Here
|
1791 |
windows->command.attributes.event_mask=ButtonMotionMask | ButtonPressMask | |
1801 |
windows->command.attributes.event_mask=ButtonMotionMask | ButtonPressMask | |
1792 |
ButtonReleaseMask | EnterWindowMask | ExposureMask | LeaveWindowMask | |
1802 |
ButtonReleaseMask | EnterWindowMask | ExposureMask | LeaveWindowMask | |
1793 |
OwnerGrabButtonMask | StructureNotifyMask; |
1803 |
OwnerGrabButtonMask | StructureNotifyMask; |
1794 |
CloneString(&class_hints->res_name,"command"); |
1804 |
(void) CloneString(&class_hints->res_name,"command"); |
1795 |
manager_hints->flags=InputHint | StateHint | WindowGroupHint; |
1805 |
manager_hints->flags=InputHint | StateHint | WindowGroupHint; |
1796 |
manager_hints->input=MagickTrue; |
1806 |
manager_hints->input=MagickTrue; |
1797 |
manager_hints->initial_state=NormalState; |
1807 |
manager_hints->initial_state=NormalState; |
Lines 1822-1828
Link Here
|
1822 |
ButtonReleaseMask | EnterWindowMask | ExposureMask | KeyPressMask | |
1832 |
ButtonReleaseMask | EnterWindowMask | ExposureMask | KeyPressMask | |
1823 |
KeyReleaseMask | LeaveWindowMask | OwnerGrabButtonMask | |
1833 |
KeyReleaseMask | LeaveWindowMask | OwnerGrabButtonMask | |
1824 |
StructureNotifyMask; |
1834 |
StructureNotifyMask; |
1825 |
CloneString(&class_hints->res_name,"widget"); |
1835 |
(void) CloneString(&class_hints->res_name,"widget"); |
1826 |
manager_hints->flags=InputHint | StateHint | WindowGroupHint; |
1836 |
manager_hints->flags=InputHint | StateHint | WindowGroupHint; |
1827 |
manager_hints->input=MagickTrue; |
1837 |
manager_hints->input=MagickTrue; |
1828 |
manager_hints->initial_state=NormalState; |
1838 |
manager_hints->initial_state=NormalState; |
Lines 1847-1853
Link Here
|
1847 |
windows->popup.attributes.event_mask=ButtonMotionMask | ButtonPressMask | |
1857 |
windows->popup.attributes.event_mask=ButtonMotionMask | ButtonPressMask | |
1848 |
ButtonReleaseMask | EnterWindowMask | ExposureMask | KeyPressMask | |
1858 |
ButtonReleaseMask | EnterWindowMask | ExposureMask | KeyPressMask | |
1849 |
KeyReleaseMask | LeaveWindowMask | StructureNotifyMask; |
1859 |
KeyReleaseMask | LeaveWindowMask | StructureNotifyMask; |
1850 |
CloneString(&class_hints->res_name,"popup"); |
1860 |
(void) CloneString(&class_hints->res_name,"popup"); |
1851 |
manager_hints->flags=InputHint | StateHint | WindowGroupHint; |
1861 |
manager_hints->flags=InputHint | StateHint | WindowGroupHint; |
1852 |
manager_hints->input=MagickTrue; |
1862 |
manager_hints->input=MagickTrue; |
1853 |
manager_hints->initial_state=NormalState; |
1863 |
manager_hints->initial_state=NormalState; |
Lines 1903-1908
Link Here
|
1903 |
windows->image.matte_pixmaps[0]=windows->image.matte_pixmap; |
1913 |
windows->image.matte_pixmaps[0]=windows->image.matte_pixmap; |
1904 |
for (scene=1; scene < (long) number_scenes; scene++) |
1914 |
for (scene=1; scene < (long) number_scenes; scene++) |
1905 |
{ |
1915 |
{ |
|
|
1916 |
unsigned int |
1917 |
columns, |
1918 |
rows; |
1919 |
|
1906 |
/* |
1920 |
/* |
1907 |
Create X image. |
1921 |
Create X image. |
1908 |
*/ |
1922 |
*/ |
Lines 1915-1932
Link Here
|
1915 |
if (image_list[scene]->storage_class == PseudoClass) |
1929 |
if (image_list[scene]->storage_class == PseudoClass) |
1916 |
XGetPixelPacket(display,visual_info,map_info,resource_info, |
1930 |
XGetPixelPacket(display,visual_info,map_info,resource_info, |
1917 |
image_list[scene],windows->image.pixel_info); |
1931 |
image_list[scene],windows->image.pixel_info); |
|
|
1932 |
columns=(unsigned int) image_list[scene]->columns; |
1933 |
rows=(unsigned int) image_list[scene]->rows; |
1934 |
if ((image_list[scene]->columns != columns) || |
1935 |
(image_list[scene]->rows != rows)) |
1936 |
ThrowXWindowFatalException(XServerFatalError,"UnableToCreateXImage", |
1937 |
image_list[scene]->filename); |
1918 |
status=XMakeImage(display,resource_info,&windows->image,image_list[scene], |
1938 |
status=XMakeImage(display,resource_info,&windows->image,image_list[scene], |
1919 |
(unsigned int) image_list[scene]->columns, |
1939 |
columns,rows); |
1920 |
(unsigned int) image_list[scene]->rows); |
|
|
1921 |
if (status == MagickFalse) |
1940 |
if (status == MagickFalse) |
1922 |
ThrowXWindowFatalException(XServerFatalError,"UnableToCreateXImage", |
1941 |
ThrowXWindowFatalException(XServerFatalError,"UnableToCreateXImage", |
1923 |
images->filename); |
1942 |
images->filename); |
1924 |
if (image_list[scene]->debug != MagickFalse) |
1943 |
if (image_list[scene]->debug != MagickFalse) |
1925 |
{ |
1944 |
{ |
1926 |
(void) LogMagickEvent(X11Event,GetMagickModule(), |
1945 |
(void) LogMagickEvent(X11Event,GetMagickModule(), |
1927 |
"Image: [%lu] %s %lux%lu ",image_list[scene]->scene, |
1946 |
"Image: [%lu] %s %ux%u ",image_list[scene]->scene, |
1928 |
image_list[scene]->filename,image_list[scene]->columns, |
1947 |
image_list[scene]->filename,columns,rows); |
1929 |
image_list[scene]->rows); |
|
|
1930 |
if (image_list[scene]->colors != 0) |
1948 |
if (image_list[scene]->colors != 0) |
1931 |
(void) LogMagickEvent(X11Event,GetMagickModule(),"%luc ", |
1949 |
(void) LogMagickEvent(X11Event,GetMagickModule(),"%luc ", |
1932 |
image_list[scene]->colors); |
1950 |
image_list[scene]->colors); |