Skip to content

Commit

Permalink
merge trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
fvogelnew1 committed Dec 2, 2023
2 parents 7c60a43 + dadf50a commit 2e2802d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 5 additions & 2 deletions generic/tkCanvas.c
Original file line number Diff line number Diff line change
Expand Up @@ -2516,8 +2516,11 @@ DecomposeMaskToShiftAndBits(
#define OVERDRAW_PIXELS 32 /* How much larger we make the pixmap
* that the canvas objects are drawn into */

/* From stackoverflow.com/questions/2100331/c-macro-definition-to-determine-big-endian-or-little-endian-machine */
#define IS_BIG_ENDIAN (*(unsigned short *)"\0\xff" < 0x100)
#ifdef WORDS_BIGENDIAN
#define IS_BIG_ENDIAN 1
#else
#define IS_BIG_ENDIAN 0
#endif

#define BYTE_SWAP16(n) ((((unsigned short)n)>>8) | (((unsigned short)n)<<8))
#define BYTE_SWAP32(n) (((n>>24)&0x000000FF) | ((n<<8)&0x00FF0000) | ((n>>8)&0x0000FF00) | ((n<<24)&0xFF000000))
Expand Down
3 changes: 3 additions & 0 deletions tests/ttk/scrollbar.test
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ test scrollbar-10.1.1 {<MouseWheel> event on scrollbar} -setup {
pack [ttk::scrollbar .s -command {.t yview}] -fill y -expand 1 -side left
update
focus -force .s
event generate .s <Enter>
event generate .s <MouseWheel> -delta -120
after 200 {set eventprocessed 1} ; vwait eventprocessed
.t index @0,0
Expand All @@ -94,6 +95,7 @@ test scrollbar-10.2.1 {<Shift-MouseWheel> event on horizontal scrollbar} -setup
pack [ttk::scrollbar .s -command {.t xview} -orient horizontal] -fill x -expand 1 -side top
update
focus -force .s
event generate .s <Enter>
event generate .s <Shift-MouseWheel> -delta -120
after 200 {set eventprocessed 1} ; vwait eventprocessed
.t index @0,0
Expand All @@ -108,6 +110,7 @@ test scrollbar-10.2.2 {<MouseWheel> event on horizontal scrollbar} -setup {
pack [ttk::scrollbar .s -command {.t xview} -orient horizontal] -fill x -expand 1 -side top
update
focus -force .s
event generate .s <Enter>
event generate .s <MouseWheel> -delta -120
after 200 {set eventprocessed 1} ; vwait eventprocessed
.t index @0,0
Expand Down

0 comments on commit 2e2802d

Please sign in to comment.