Bugzilla – Attachment 549 Details for
Bug 5111
Issues with fltk win32 clipboard patches
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Complete patch that fixes 3 problems with clipboard monitoring on windows platform.
b5111.patch (text/plain), 2.07 KB, created by
Henrik Andersson
on 2014-05-28 11:34:38 CEST
(
hide
)
Description:
Complete patch that fixes 3 problems with clipboard monitoring on windows platform.
Filename:
MIME Type:
Creator:
Henrik Andersson
Created:
2014-05-28 11:34:38 CEST
Size:
2.07 KB
patch
obsolete
>diff -up ./Fl.cxx.b5111 ./Fl.cxx >diff -up ./Fl_win32.cxx.b5111 ./Fl_win32.cxx >--- ./Fl_win32.cxx.b5111 2014-05-23 13:11:10.341222221 +0200 >+++ ./Fl_win32.cxx 2014-05-28 11:28:36.791545786 +0200 >@@ -652,9 +652,20 @@ static HWND clipboard_wnd = 0; > static HWND next_clipboard_wnd = 0; > > static bool initial_clipboard = true; >+void fl_clipboard_notify_target(HWND wnd); > > void fl_clipboard_notify_change() { >- // No need to do anything here... >+ // untarget clipboard monitor if no handlers are registered >+ if (clipboard_wnd != NULL && fl_clipboard_notify_empty()) >+ { >+ fl_clipboard_notify_untarget(clipboard_wnd); >+ return; >+ } >+ >+ // if there are clipboard notify handlers but no window targeted >+ // target first window if available >+ if (clipboard_wnd == NULL && Fl::first_window()) >+ fl_clipboard_notify_target(fl_xid(Fl::first_window())); > } > > void fl_clipboard_notify_target(HWND wnd) { >@@ -983,8 +994,7 @@ static LRESULT CALLBACK WndProc(HWND hWn > > case WM_CLOSE: // user clicked close box > Fl::handle(FL_CLOSE, window); >- PostQuitMessage(0); >- return 0; >+ break; > > case WM_SYNCPAINT : > case WM_NCPAINT : >@@ -1367,12 +1377,11 @@ static LRESULT CALLBACK WndProc(HWND hWn > return 0; > > case WM_CHANGECBCHAIN: >- if ((hWnd == clipboard_wnd) && >- (next_clipboard_wnd == (HWND)wParam)) { >+ if ((hWnd == clipboard_wnd) && (next_clipboard_wnd == (HWND)wParam)) > next_clipboard_wnd = (HWND)lParam; >- return 0; >- } >- break; >+ else >+ SendMessage(next_clipboard_wnd, WM_CHANGECBCHAIN, wParam, lParam); >+ return 0; > > case WM_DRAWCLIPBOARD: > // When the clipboard moves between two FLTK windows, >@@ -1847,7 +1856,10 @@ Fl_X* Fl_X::make(Fl_Window* w) { > x->next = Fl_X::first; > Fl_X::first = x; > >- fl_clipboard_notify_target(x->xid); >+ // Setup clipboard monitor target if there are registered handlers and >+ // no window is targeted. >+ if (!fl_clipboard_notify_empty() && clipboard_wnd == NULL) >+ fl_clipboard_notify_target(x->xid); > > x->wait_for_expose = 1; > if (fl_show_iconic) {showit = 0; fl_show_iconic = 0;}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 5111
:
533
|
546
| 549