Discussion:
[ros-bugs] [jira] (CORE-10679) clipbrd: add some stuff needed for scrolling support
Ricardo Hanke (JIRA)
2015-12-09 06:34:23 UTC
Permalink
Ricardo Hanke created CORE-10679:
------------------------------------

Summary: clipbrd: add some stuff needed for scrolling support
Key: CORE-10679
URL: https://jira.reactos.org/browse/CORE-10679
Project: Core ReactOS
Issue Type: Improvement
Reporter: Ricardo Hanke
Assignee: Bug Zilla
Attachments: clipbrd_scroll.patch

Add scrollutils.c/scrollutils.h, which contains some helper functions for implementing support for scrolling a bitmap in the main windows's client area.
Made some minor changes to clipbrd.c, to use these functions to update the scrollbars amd generate scroll messages from keystrokes.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
Ricardo Hanke (JIRA)
2015-12-09 06:36:23 UTC
Permalink
[ https://jira.reactos.org/browse/CORE-10679?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ricardo Hanke updated CORE-10679:
---------------------------------

Module: clipbrd
Post by Ricardo Hanke (JIRA)
clipbrd: add some stuff needed for scrolling support
----------------------------------------------------
Key: CORE-10679
URL: https://jira.reactos.org/browse/CORE-10679
Project: Core ReactOS
Issue Type: Improvement
Reporter: Ricardo Hanke
Assignee: Bug Zilla
Labels: PATCH, WIP
Attachments: clipbrd_scroll.patch
Add scrollutils.c/scrollutils.h, which contains some helper functions for implementing support for scrolling a bitmap in the main windows's client area.
Made some minor changes to clipbrd.c, to use these functions to update the scrollbars amd generate scroll messages from keystrokes.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
Ricardo Hanke (JIRA)
2015-12-10 00:01:23 UTC
Permalink
[ https://jira.reactos.org/browse/CORE-10679?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ricardo Hanke updated CORE-10679:
---------------------------------

Attachment: clipbrd_scroll_v2.patch

Add code to handle WM_HSCROLL and WM_VSCROLL messages. Remove a few unnecessary calls to UpdateWindow() and InvalidateClientRect().
Post by Ricardo Hanke (JIRA)
clipbrd: add some stuff needed for scrolling support
----------------------------------------------------
Key: CORE-10679
URL: https://jira.reactos.org/browse/CORE-10679
Project: Core ReactOS
Issue Type: Improvement
Reporter: Ricardo Hanke
Assignee: Bug Zilla
Labels: PATCH, WIP
Attachments: clipbrd_scroll.patch, clipbrd_scroll_v2.patch
Add scrollutils.c/scrollutils.h, which contains some helper functions for implementing support for scrolling a bitmap in the main windows's client area.
Made some minor changes to clipbrd.c, to use these functions to update the scrollbars amd generate scroll messages from keystrokes.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
Ricardo Hanke (JIRA)
2015-12-11 04:27:23 UTC
Permalink
[ https://jira.reactos.org/browse/CORE-10679?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ricardo Hanke updated CORE-10679:
---------------------------------

Attachment: clipbrd_scroll_v3.patch
Post by Ricardo Hanke (JIRA)
clipbrd: add some stuff needed for scrolling support
----------------------------------------------------
Key: CORE-10679
URL: https://jira.reactos.org/browse/CORE-10679
Project: Core ReactOS
Issue Type: Improvement
Reporter: Ricardo Hanke
Assignee: Bug Zilla
Labels: PATCH, WIP
Attachments: clipbrd_scroll.patch, clipbrd_scroll_v2.patch, clipbrd_scroll_v3.patch
Add scrollutils.c/scrollutils.h, which contains some helper functions for implementing support for scrolling a bitmap in the main windows's client area.
Made some minor changes to clipbrd.c, to use these functions to update the scrollbars amd generate scroll messages from keystrokes.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
HBelusca (JIRA)
2015-12-12 21:16:23 UTC
Permalink
[ https://jira.reactos.org/browse/CORE-10679?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=74995#comment-74995 ]

HBelusca commented on CORE-10679:
---------------------------------

I've committed [^clipbrd_scroll_v3.patch], but I keep this report open for your future scroll support improvements.
Post by Ricardo Hanke (JIRA)
clipbrd: add some stuff needed for scrolling support
----------------------------------------------------
Key: CORE-10679
URL: https://jira.reactos.org/browse/CORE-10679
Project: Core ReactOS
Issue Type: Improvement
Reporter: Ricardo Hanke
Assignee: Bug Zilla
Labels: PATCH, WIP
Attachments: clipbrd_scroll.patch, clipbrd_scroll_v2.patch, clipbrd_scroll_v3.patch
Add scrollutils.c/scrollutils.h, which contains some helper functions for implementing support for scrolling a bitmap in the main windows's client area.
Made some minor changes to clipbrd.c, to use these functions to update the scrollbars amd generate scroll messages from keystrokes.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
HBelusca (JIRA)
2015-12-12 21:18:23 UTC
Permalink
[ https://jira.reactos.org/browse/CORE-10679?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

HBelusca reassigned CORE-10679:
-------------------------------

Assignee: HBelusca (was: Bug Zilla)
Post by Ricardo Hanke (JIRA)
clipbrd: add some stuff needed for scrolling support
----------------------------------------------------
Key: CORE-10679
URL: https://jira.reactos.org/browse/CORE-10679
Project: Core ReactOS
Issue Type: Improvement
Reporter: Ricardo Hanke
Assignee: HBelusca
Labels: PATCH, WIP
Attachments: clipbrd_scroll.patch, clipbrd_scroll_v2.patch, clipbrd_scroll_v3.patch
Add scrollutils.c/scrollutils.h, which contains some helper functions for implementing support for scrolling a bitmap in the main windows's client area.
Made some minor changes to clipbrd.c, to use these functions to update the scrollbars amd generate scroll messages from keystrokes.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
HBelusca (JIRA)
2015-12-12 21:18:37 UTC
Permalink
[ https://jira.reactos.org/browse/CORE-10679?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

HBelusca updated CORE-10679:
----------------------------

Fix Version/s: 0.4.1
Post by Ricardo Hanke (JIRA)
clipbrd: add some stuff needed for scrolling support
----------------------------------------------------
Key: CORE-10679
URL: https://jira.reactos.org/browse/CORE-10679
Project: Core ReactOS
Issue Type: Improvement
Reporter: Ricardo Hanke
Assignee: HBelusca
Labels: PATCH, WIP
Fix For: 0.4.1
Attachments: clipbrd_scroll.patch, clipbrd_scroll_v2.patch, clipbrd_scroll_v3.patch
Add scrollutils.c/scrollutils.h, which contains some helper functions for implementing support for scrolling a bitmap in the main windows's client area.
Made some minor changes to clipbrd.c, to use these functions to update the scrollbars amd generate scroll messages from keystrokes.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
HBelusca (JIRA)
2015-12-12 21:18:33 UTC
Permalink
[ https://jira.reactos.org/browse/CORE-10679?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

HBelusca updated CORE-10679:
----------------------------

Status: Open (was: Untriaged)
Post by Ricardo Hanke (JIRA)
clipbrd: add some stuff needed for scrolling support
----------------------------------------------------
Key: CORE-10679
URL: https://jira.reactos.org/browse/CORE-10679
Project: Core ReactOS
Issue Type: Improvement
Reporter: Ricardo Hanke
Assignee: HBelusca
Labels: PATCH, WIP
Attachments: clipbrd_scroll.patch, clipbrd_scroll_v2.patch, clipbrd_scroll_v3.patch
Add scrollutils.c/scrollutils.h, which contains some helper functions for implementing support for scrolling a bitmap in the main windows's client area.
Made some minor changes to clipbrd.c, to use these functions to update the scrollbars amd generate scroll messages from keystrokes.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
Ricardo Hanke (JIRA)
2015-12-14 02:54:23 UTC
Permalink
[ https://jira.reactos.org/browse/CORE-10679?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ricardo Hanke updated CORE-10679:
---------------------------------

Attachment: clipbrd_scroll_v4.patch

Add support for scrolling with the mouse wheel.
Post by Ricardo Hanke (JIRA)
clipbrd: add some stuff needed for scrolling support
----------------------------------------------------
Key: CORE-10679
URL: https://jira.reactos.org/browse/CORE-10679
Project: Core ReactOS
Issue Type: Improvement
Reporter: Ricardo Hanke
Assignee: HBelusca
Labels: PATCH, WIP
Fix For: 0.4.1
Attachments: clipbrd_scroll.patch, clipbrd_scroll_v2.patch, clipbrd_scroll_v3.patch, clipbrd_scroll_v4.patch
Add scrollutils.c/scrollutils.h, which contains some helper functions for implementing support for scrolling a bitmap in the main windows's client area.
Made some minor changes to clipbrd.c, to use these functions to update the scrollbars amd generate scroll messages from keystrokes.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
Ricardo Hanke (JIRA)
2015-12-14 11:19:23 UTC
Permalink
[ https://jira.reactos.org/browse/CORE-10679?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ricardo Hanke updated CORE-10679:
---------------------------------

Attachment: clipbrd_scroll_v5.patch

Actually let the user scroll the displayed data (except metafiles, who are not required to store its dimensions). This should mostly complete the scrolling functionality, except for a few minor issues (rotation distance on wheel scrolls is ignored, enhanced metafile dimensions are treated as pixels instead of device units).
Post by Ricardo Hanke (JIRA)
clipbrd: add some stuff needed for scrolling support
----------------------------------------------------
Key: CORE-10679
URL: https://jira.reactos.org/browse/CORE-10679
Project: Core ReactOS
Issue Type: Improvement
Reporter: Ricardo Hanke
Assignee: HBelusca
Labels: PATCH, WIP
Fix For: 0.4.1
Attachments: clipbrd_scroll.patch, clipbrd_scroll_v2.patch, clipbrd_scroll_v3.patch, clipbrd_scroll_v4.patch, clipbrd_scroll_v5.patch
Add scrollutils.c/scrollutils.h, which contains some helper functions for implementing support for scrolling a bitmap in the main windows's client area.
Made some minor changes to clipbrd.c, to use these functions to update the scrollbars amd generate scroll messages from keystrokes.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
Ricardo Hanke (JIRA)
2015-12-14 11:26:23 UTC
Permalink
[ https://jira.reactos.org/browse/CORE-10679?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ricardo Hanke updated CORE-10679:
---------------------------------

Labels: PATCH (was: PATCH WIP)
Post by Ricardo Hanke (JIRA)
clipbrd: add some stuff needed for scrolling support
----------------------------------------------------
Key: CORE-10679
URL: https://jira.reactos.org/browse/CORE-10679
Project: Core ReactOS
Issue Type: Improvement
Reporter: Ricardo Hanke
Assignee: HBelusca
Labels: PATCH
Fix For: 0.4.1
Attachments: clipbrd_scroll.patch, clipbrd_scroll_v2.patch, clipbrd_scroll_v3.patch, clipbrd_scroll_v4.patch, clipbrd_scroll_v5.patch
Add scrollutils.c/scrollutils.h, which contains some helper functions for implementing support for scrolling a bitmap in the main windows's client area.
Made some minor changes to clipbrd.c, to use these functions to update the scrollbars amd generate scroll messages from keystrokes.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
Mark Jansen (JIRA)
2015-12-14 12:13:24 UTC
Permalink
[ https://jira.reactos.org/browse/CORE-10679?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=75049#comment-75049 ]

Mark Jansen commented on CORE-10679:
------------------------------------

Inside {{GetBitmapFromClipboardData}} there is no need to put braces around the case statements.

In {{GetUnicodeTextFromClipboardData}}: lpchText is not initialized, so you call GlobalUnlock on something that is not the result of a GlobalLock (the first goto, with hdcMem and the second goto).
In {{GetDibFromClipboard}}: same, with lpInfoHeader.


Also, my preference is to not use {{goto}}, unless there is no other way, but im not sure what the stance is of the others.
In functions like {{GetUnicodeTextFromClipboardData}} this can be done by nesting the statements.
Post by Ricardo Hanke (JIRA)
clipbrd: add some stuff needed for scrolling support
----------------------------------------------------
Key: CORE-10679
URL: https://jira.reactos.org/browse/CORE-10679
Project: Core ReactOS
Issue Type: Improvement
Reporter: Ricardo Hanke
Assignee: HBelusca
Labels: PATCH
Fix For: 0.4.1
Attachments: clipbrd_scroll.patch, clipbrd_scroll_v2.patch, clipbrd_scroll_v3.patch, clipbrd_scroll_v4.patch, clipbrd_scroll_v5.patch
Add scrollutils.c/scrollutils.h, which contains some helper functions for implementing support for scrolling a bitmap in the main windows's client area.
Made some minor changes to clipbrd.c, to use these functions to update the scrollbars amd generate scroll messages from keystrokes.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
Ricardo Hanke (JIRA)
2015-12-14 14:10:23 UTC
Permalink
[ https://jira.reactos.org/browse/CORE-10679?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=75051#comment-75051 ]

Ricardo Hanke commented on CORE-10679:
--------------------------------------

As for the braces, I find it more readable with them, but this is just my personal opinion. If this should be a problem, I can remove it.

For GlobalUnlock, on the second goto it should just do nothing, because GetClipboardData returns NULL and GlobalUnlock should just do nothing in this case.
But you are right, this should be corrected (together with the first one of course).

As for the use of goto, I had started to write this code before CORE-10657 was commited, so it had been ended in 4 levels of cascaded if-blocks, so I used the
goto construct. However, creating the dc after locking of the clipboard data block should suffice. The rest after it can then be moved into an if-block and the first
two gotos can just be replaced with returns (The if-blocks at the end are also not needed anymore then).
Post by Ricardo Hanke (JIRA)
clipbrd: add some stuff needed for scrolling support
----------------------------------------------------
Key: CORE-10679
URL: https://jira.reactos.org/browse/CORE-10679
Project: Core ReactOS
Issue Type: Improvement
Reporter: Ricardo Hanke
Assignee: HBelusca
Labels: PATCH
Fix For: 0.4.1
Attachments: clipbrd_scroll.patch, clipbrd_scroll_v2.patch, clipbrd_scroll_v3.patch, clipbrd_scroll_v4.patch, clipbrd_scroll_v5.patch
Add scrollutils.c/scrollutils.h, which contains some helper functions for implementing support for scrolling a bitmap in the main windows's client area.
Made some minor changes to clipbrd.c, to use these functions to update the scrollbars amd generate scroll messages from keystrokes.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
Thomas Faber (JIRA)
2015-12-14 16:34:23 UTC
Permalink
[ https://jira.reactos.org/browse/CORE-10679?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Faber updated CORE-10679:
--------------------------------

Fix Version/s: (was: 0.4.1)
Post by Ricardo Hanke (JIRA)
clipbrd: add some stuff needed for scrolling support
----------------------------------------------------
Key: CORE-10679
URL: https://jira.reactos.org/browse/CORE-10679
Project: Core ReactOS
Issue Type: Improvement
Reporter: Ricardo Hanke
Assignee: HBelusca
Labels: PATCH
Attachments: clipbrd_scroll.patch, clipbrd_scroll_v2.patch, clipbrd_scroll_v3.patch, clipbrd_scroll_v4.patch, clipbrd_scroll_v5.patch
Add scrollutils.c/scrollutils.h, which contains some helper functions for implementing support for scrolling a bitmap in the main windows's client area.
Made some minor changes to clipbrd.c, to use these functions to update the scrollbars amd generate scroll messages from keystrokes.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
HBelusca (JIRA)
2015-12-14 17:36:23 UTC
Permalink
[ https://jira.reactos.org/browse/CORE-10679?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=75053#comment-75053 ]

HBelusca commented on CORE-10679:
---------------------------------

The {{sizeof(ENHMETAHEADER)}} may be changed to {{sizeof(emh)}} to not have to hardcode the type of the structure at different places.

Regarding the braces for 'case', my personal policy is generally to not put braces when the case stuff in question is 1-2 lines long (especially when it's "call to helper" followed by "break/return") because it's short, but I put braces when the case block is huge (and when some local variables are needed). But if you have a "switch" inside which you have big "cases" and small ones, then I personally prefer to put braces to all the cases. This also helps when one uses line-wrapping editors: you can fold part/all of the cases. Just my two cents :)
Post by Ricardo Hanke (JIRA)
clipbrd: add some stuff needed for scrolling support
----------------------------------------------------
Key: CORE-10679
URL: https://jira.reactos.org/browse/CORE-10679
Project: Core ReactOS
Issue Type: Improvement
Reporter: Ricardo Hanke
Assignee: HBelusca
Labels: PATCH
Attachments: clipbrd_scroll.patch, clipbrd_scroll_v2.patch, clipbrd_scroll_v3.patch, clipbrd_scroll_v4.patch, clipbrd_scroll_v5.patch
Add scrollutils.c/scrollutils.h, which contains some helper functions for implementing support for scrolling a bitmap in the main windows's client area.
Made some minor changes to clipbrd.c, to use these functions to update the scrollbars amd generate scroll messages from keystrokes.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
Ricardo Hanke (JIRA)
2015-12-14 18:29:23 UTC
Permalink
[ https://jira.reactos.org/browse/CORE-10679?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ricardo Hanke updated CORE-10679:
---------------------------------

Attachment: clipbrd_scroll_v6.patch

* changed sizeof(ENHMETAHEADER) to sizeof(emh)
* removed case braces in GetBitmapFromClipboardData()
* modified the code to avoid the use of goto. This should also fix the issue with GlobalUnlock()
* Removed a redundant GlobalUnlock() from GetDibFromClipboard()
Post by Ricardo Hanke (JIRA)
clipbrd: add some stuff needed for scrolling support
----------------------------------------------------
Key: CORE-10679
URL: https://jira.reactos.org/browse/CORE-10679
Project: Core ReactOS
Issue Type: Improvement
Reporter: Ricardo Hanke
Assignee: HBelusca
Labels: PATCH
Attachments: clipbrd_scroll.patch, clipbrd_scroll_v2.patch, clipbrd_scroll_v3.patch, clipbrd_scroll_v4.patch, clipbrd_scroll_v5.patch, clipbrd_scroll_v6.patch
Add scrollutils.c/scrollutils.h, which contains some helper functions for implementing support for scrolling a bitmap in the main windows's client area.
Made some minor changes to clipbrd.c, to use these functions to update the scrollbars amd generate scroll messages from keystrokes.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
HBelusca (JIRA)
2015-12-14 23:13:23 UTC
Permalink
[ https://jira.reactos.org/browse/CORE-10679?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

HBelusca updated CORE-10679:
----------------------------

Attachment: setuplog.txt
clipbrd_scroll_v6b.patch

Ok, in [^clipbrd_scroll_v6b.patch] is what remains of the patch [^clipbrd_scroll_v6.patch] after the scroll commit r70347.
I haven't committed the v6b patch for the following reasons:
- I don't currently understand why you call PlayMetaFileFromClipboard separately in the paint handler (each time WM_PAINT is called), whereas for everything else you create a buffered bitmap only when the contents of the clipboard changes. Isn't it possible to do that for the metafile either?
- Why removing the CF_ENHMETAFILE and CF_DSPENHMETAFILE checks before calling InvalidateRect (note to /self: I notice those are both checks for meta*file*, and not meta*pict*)?
- You removed CF_NONE (empty clipboard) handling by error (I added it back).
- The idea of having a buffered bitmap with the contents of the clipboard is nice, in the sense that you don't have to repeatedly call OpenClipboard/CloseClipboard on each WM_PAINT event. However when you do that, you forget about the cases where what is stored in the clipboard is huge, e.g. kilobytes of text or megabytes of bitmap. In case such data is stored in the clipboard, the bitmap creation fails. For example, if you copy all the contents of the [^setuplog.txt] file that I've attached there into the clipboard, your clipboard viewer cannot see it, because the buffered bitmap creation fails, whereas windows' clipboard can display it without no problem. I think that for those cases you need to go to some kind of hybrid method where you would buffer a bitmap of a fixed size (approximately corresponding to the size of the viewer window), and then, reading from the clipboard content only if you resize the viewer or if you scroll...

For text: https://msdn.microsoft.com/en-us/library/windows/desktop/hh298421(v=vs.85).aspx
For bitmap: https://msdn.microsoft.com/en-us/library/windows/desktop/hh298420(v=vs.85).aspx
Post by Ricardo Hanke (JIRA)
clipbrd: add some stuff needed for scrolling support
----------------------------------------------------
Key: CORE-10679
URL: https://jira.reactos.org/browse/CORE-10679
Project: Core ReactOS
Issue Type: Improvement
Reporter: Ricardo Hanke
Assignee: HBelusca
Labels: PATCH
Attachments: clipbrd_scroll.patch, clipbrd_scroll_v2.patch, clipbrd_scroll_v3.patch, clipbrd_scroll_v4.patch, clipbrd_scroll_v5.patch, clipbrd_scroll_v6.patch, clipbrd_scroll_v6b.patch, setuplog.txt
Add scrollutils.c/scrollutils.h, which contains some helper functions for implementing support for scrolling a bitmap in the main windows's client area.
Made some minor changes to clipbrd.c, to use these functions to update the scrollbars amd generate scroll messages from keystrokes.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
Ricardo Hanke (JIRA)
2015-12-15 01:39:24 UTC
Permalink
[ https://jira.reactos.org/browse/CORE-10679?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=75060#comment-75060 ]

Ricardo Hanke commented on CORE-10679:
--------------------------------------

For metafiles it is of course possible to also create a bitmap and blit from it instead of playing the data directly from the clipboard. The problem is that, unlike enhanced metafiles, metafiles are not required to store its dimensions. Since it may lack this data (and in almost any case i've tested, it lacked it) the code
just uses the window's client area for that. If now a bitmap would be created before to display it, it has to be regenerated everytime the window's size changes.
It is of course preferable to change this behaviour at some point. But since I am currently not sure which "default" size would suffice, I have skipped it for now.

Yes, the removal of CF_NONE handling was by accident. Thanks for adding it back.

The size of the clipboard data can be indeed a problem. Since I use Windows 7 as host for development, where this problem does not occur (or just at much bigger data sizes?), I haven't noticed it.

I think it would be the best to split the remaining stuff into smaller patches. As a big amount of data can be a problem, I also think that it is the best to continue to draw the data directly from the clipboard for now (except for data that is obviously small, like palettes) and later see where it can be optimized.
Post by Ricardo Hanke (JIRA)
clipbrd: add some stuff needed for scrolling support
----------------------------------------------------
Key: CORE-10679
URL: https://jira.reactos.org/browse/CORE-10679
Project: Core ReactOS
Issue Type: Improvement
Reporter: Ricardo Hanke
Assignee: HBelusca
Labels: PATCH
Attachments: clipbrd_scroll.patch, clipbrd_scroll_v2.patch, clipbrd_scroll_v3.patch, clipbrd_scroll_v4.patch, clipbrd_scroll_v5.patch, clipbrd_scroll_v6.patch, clipbrd_scroll_v6b.patch, setuplog.txt
Add scrollutils.c/scrollutils.h, which contains some helper functions for implementing support for scrolling a bitmap in the main windows's client area.
Made some minor changes to clipbrd.c, to use these functions to update the scrollbars amd generate scroll messages from keystrokes.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
HBelusca (JIRA)
2015-12-15 02:59:23 UTC
Permalink
[ https://jira.reactos.org/browse/CORE-10679?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=75061#comment-75061 ]

HBelusca commented on CORE-10679:
---------------------------------

In revision 70349 I fix bitmap offset error that I noticed when viewing the contents of the clipboard while taking a screenshot (on windows 7, and 2k3). I also noticed that there was a bug in Windows related to the automatic conversion CF_BITMAP/CF_DIBV5 to CF_DIB : an erroneous extra offset is added in the bitmap. It is not directly visible on Windows because their clipboard viewer only works with CF_BITMAP/CF_DIBV5 bitmaps, but if you enforce the copy of a bitmap with the CF_DIB format, then if you try to change its format via the viewer, you can notice the problem.
Post by Ricardo Hanke (JIRA)
clipbrd: add some stuff needed for scrolling support
----------------------------------------------------
Key: CORE-10679
URL: https://jira.reactos.org/browse/CORE-10679
Project: Core ReactOS
Issue Type: Improvement
Reporter: Ricardo Hanke
Assignee: HBelusca
Labels: PATCH
Attachments: clipbrd_scroll.patch, clipbrd_scroll_v2.patch, clipbrd_scroll_v3.patch, clipbrd_scroll_v4.patch, clipbrd_scroll_v5.patch, clipbrd_scroll_v6.patch, clipbrd_scroll_v6b.patch, setuplog.txt
Add scrollutils.c/scrollutils.h, which contains some helper functions for implementing support for scrolling a bitmap in the main windows's client area.
Made some minor changes to clipbrd.c, to use these functions to update the scrollbars amd generate scroll messages from keystrokes.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
Ricardo Hanke (JIRA)
2015-12-15 08:34:24 UTC
Permalink
[ https://jira.reactos.org/browse/CORE-10679?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=75064#comment-75064 ]

Ricardo Hanke commented on CORE-10679:
--------------------------------------

Interesting. As I first wrote some test code for CF_DIB and CF_DIBV5, the image sometimes displayed incorrectly even though all offsets where retrieved correctly from the headers. Maybe it was related to this bug.

As for the bitmap creation failing on large data sizes, another option may be to create a DIB section if the creation of the DDB fails. But this would be probably very memory intensive.
Post by Ricardo Hanke (JIRA)
clipbrd: add some stuff needed for scrolling support
----------------------------------------------------
Key: CORE-10679
URL: https://jira.reactos.org/browse/CORE-10679
Project: Core ReactOS
Issue Type: Improvement
Reporter: Ricardo Hanke
Assignee: HBelusca
Labels: PATCH
Attachments: clipbrd_scroll.patch, clipbrd_scroll_v2.patch, clipbrd_scroll_v3.patch, clipbrd_scroll_v4.patch, clipbrd_scroll_v5.patch, clipbrd_scroll_v6.patch, clipbrd_scroll_v6b.patch, setuplog.txt
Add scrollutils.c/scrollutils.h, which contains some helper functions for implementing support for scrolling a bitmap in the main windows's client area.
Made some minor changes to clipbrd.c, to use these functions to update the scrollbars amd generate scroll messages from keystrokes.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
Ricardo Hanke (JIRA)
2015-12-16 02:21:23 UTC
Permalink
[ https://jira.reactos.org/browse/CORE-10679?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ricardo Hanke updated CORE-10679:
---------------------------------

Attachment: clipbrd_scroll_cf_bitmap.patch

Scrolling support for CF_BITMAP (Directly from the clipboard this time).
Post by Ricardo Hanke (JIRA)
clipbrd: add some stuff needed for scrolling support
----------------------------------------------------
Key: CORE-10679
URL: https://jira.reactos.org/browse/CORE-10679
Project: Core ReactOS
Issue Type: Improvement
Reporter: Ricardo Hanke
Assignee: HBelusca
Labels: PATCH
Attachments: clipbrd_scroll.patch, clipbrd_scroll_cf_bitmap.patch, clipbrd_scroll_v2.patch, clipbrd_scroll_v3.patch, clipbrd_scroll_v4.patch, clipbrd_scroll_v5.patch, clipbrd_scroll_v6.patch, clipbrd_scroll_v6b.patch, setuplog.txt
Add scrollutils.c/scrollutils.h, which contains some helper functions for implementing support for scrolling a bitmap in the main windows's client area.
Made some minor changes to clipbrd.c, to use these functions to update the scrollbars amd generate scroll messages from keystrokes.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
HBelusca (JIRA)
2016-02-13 21:24:51 UTC
Permalink
[ https://jira.reactos.org/browse/CORE-10679?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

HBelusca updated CORE-10679:
----------------------------

Component/s: Applications
Post by Ricardo Hanke (JIRA)
clipbrd: add some stuff needed for scrolling support
----------------------------------------------------
Key: CORE-10679
URL: https://jira.reactos.org/browse/CORE-10679
Project: Core ReactOS
Issue Type: Improvement
Components: Applications
Reporter: Ricardo Hanke
Assignee: HBelusca
Labels: PATCH
Attachments: clipbrd_scroll.patch, clipbrd_scroll_cf_bitmap.patch, clipbrd_scroll_v2.patch, clipbrd_scroll_v3.patch, clipbrd_scroll_v4.patch, clipbrd_scroll_v5.patch, clipbrd_scroll_v6.patch, clipbrd_scroll_v6b.patch, setuplog.txt
Add scrollutils.c/scrollutils.h, which contains some helper functions for implementing support for scrolling a bitmap in the main windows's client area.
Made some minor changes to clipbrd.c, to use these functions to update the scrollbars amd generate scroll messages from keystrokes.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
victor martinez calvo (JIRA)
2016-11-11 12:30:56 UTC
Permalink
[ https://jira.reactos.org/browse/CORE-10679?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=85881#comment-85881 ]

victor martinez calvo commented on CORE-10679:
----------------------------------------------

Which are the status of these patches?WIP?Ready to merge?
Thanks!
Post by Ricardo Hanke (JIRA)
clipbrd: add some stuff needed for scrolling support
----------------------------------------------------
Key: CORE-10679
URL: https://jira.reactos.org/browse/CORE-10679
Project: Core ReactOS
Issue Type: Improvement
Components: Applications
Reporter: Ricardo Hanke
Assignee: HBelusca
Labels: PATCH
Attachments: clipbrd_scroll.patch, clipbrd_scroll_cf_bitmap.patch, clipbrd_scroll_v2.patch, clipbrd_scroll_v3.patch, clipbrd_scroll_v4.patch, clipbrd_scroll_v5.patch, clipbrd_scroll_v6.patch, clipbrd_scroll_v6b.patch, setuplog.txt
Add scrollutils.c/scrollutils.h, which contains some helper functions for implementing support for scrolling a bitmap in the main windows's client area.
Made some minor changes to clipbrd.c, to use these functions to update the scrollbars amd generate scroll messages from keystrokes.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
HBelusca (JIRA)
2018-05-13 20:27:02 UTC
Permalink
[ https://jira.reactos.org/browse/CORE-10679?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

HBelusca resolved CORE-10679.
-----------------------------
Fix Version/s: 0.4.9
Resolution: Fixed

Bitmap and text scrolling fixed/implemented in [ebe3d52|https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ebe3d52], based on the remaining patches.
Post by Ricardo Hanke (JIRA)
clipbrd: add some stuff needed for scrolling support
----------------------------------------------------
Key: CORE-10679
URL: https://jira.reactos.org/browse/CORE-10679
Project: Core ReactOS
Issue Type: Improvement
Components: Applications
Reporter: Ricardo Hanke
Assignee: HBelusca
Labels: PATCH
Fix For: 0.4.9
Attachments: clipbrd_scroll.patch, clipbrd_scroll_cf_bitmap.patch, clipbrd_scroll_v2.patch, clipbrd_scroll_v3.patch, clipbrd_scroll_v4.patch, clipbrd_scroll_v5.patch, clipbrd_scroll_v6.patch, clipbrd_scroll_v6b.patch, setuplog.txt
Add scrollutils.c/scrollutils.h, which contains some helper functions for implementing support for scrolling a bitmap in the main windows's client area.
Made some minor changes to clipbrd.c, to use these functions to update the scrollbars amd generate scroll messages from keystrokes.
--
This message was sent by Atlassian JIRA
(v7.3.2#73013)

Loading...