Module: wine
Branch: master
Commit: c95d2de3dd41d1da6fb96191dfb74b7a412ba362
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c95d2de3dd41d1da6fb96191d…
Author: Ken Thomases <ken(a)codeweavers.com>
Date: Thu Feb 2 14:51:45 2017 -0600
winemac: Ignore clipboard updates provoked by our own call to GetClipboardData().
During a call to GetClipboardData(), the app may be asked to render the data
for a promised format. This will cause us to receive WM_CLIPBOARDUPDATE.
Almost always, the app will have just rendered the requested format and not
made any other changes. Therefore, we don't need to rebuild the Mac pasteboard
from the Win32 clipboard. Doing so can cause a race with the other Mac app
which is querying the pasteboard (for a paste operation, for example). We
basically delete the data we _just_ added and rebuild the list of available
types. The symptom is that the other Mac app sees the available types change
and maybe be incomplete.
In theory, the Windows app could make other changes to the clipboard and this
change would cause us to fail to convey them to the Mac pasteboard. I consider
that very unlikely and the tradeoff to improve the common case is worth it.
Signed-off-by: Ken Thomases <ken(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
dlls/winemac.drv/clipboard.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/dlls/winemac.drv/clipboard.c b/dlls/winemac.drv/clipboard.c
index 7115c3b..53f01d5 100644
--- a/dlls/winemac.drv/clipboard.c
+++ b/dlls/winemac.drv/clipboard.c
@@ -200,6 +200,7 @@ static BOOL is_clipboard_owner;
static macdrv_window clipboard_cocoa_window;
static UINT rendered_formats;
static ULONG64 last_clipboard_update;
+static DWORD last_get_seqno;
static WINE_CLIPFORMAT **current_mac_formats;
static unsigned int nb_current_mac_formats;
static WCHAR clipboard_pipe_name[256];
@@ -1819,6 +1820,7 @@ static LRESULT CALLBACK clipboard_wndproc(HWND hwnd, UINT msg, WPARAM wp, LPARAM
return TRUE;
case WM_CLIPBOARDUPDATE:
if (is_clipboard_owner) break; /* ignore our own changes */
+ if ((LONG)(GetClipboardSequenceNumber() - last_get_seqno) <= 0) break;
set_mac_pasteboard_types_from_win32_clipboard();
break;
case WM_RENDERFORMAT:
@@ -2220,6 +2222,8 @@ BOOL query_pasteboard_data(HWND hwnd, CFStringRef type)
}
}
+ last_get_seqno = GetClipboardSequenceNumber();
+
CloseClipboard();
return ret;
Module: appdb
Branch: master
Commit: c364568a9e53ff09c45f327b6b556b12dc6c43e4
URL: http://source.winehq.org/git/appdb.git/?a=commit;h=c364568a9e53ff09c45f327b…
Author: Jeremy Newman <jnewman(a)codeweavers.com>
Date: Fri Feb 3 11:05:58 2017 -0600
remove xinha editor loader
---
include/util.php | 217 -------------------------------------------------------
1 file changed, 217 deletions(-)
diff --git a/include/util.php b/include/util.php
index 367179d..6626027 100644
--- a/include/util.php
+++ b/include/util.php
@@ -603,223 +603,6 @@ function Simplify($dirs, $idx)
}
// End of snippet of code copied from php.net
-// Use the directory of PHP_SELF and BASE and the relative path
-// to get a simplified path to an appdb directory or file
-// Used for the Xinha _editor_url because some plugins like SpellChecker
-// won't work with relative paths like ../xinha
-function GetSimplifiedPath($relative)
-{
- return "/".SimplifyPath(dirname($_SERVER['PHP_SELF'])."/".BASE.$relative);
-}
-
-function HtmlAreaLoaderScript($aTextareas)
-{
- static $outputIndex = 0;
-
- /* Check if the user wants to display the HTML editor (always, for supported browsers or never) */
- switch($_SESSION['current']->getPref('htmleditor', 'for supported browsers'))
- {
- case 'never':
- return;
- case 'for supported browsers':
- // Xinha 0.96.1 tested fine in Opera 11.6 & Konqueror 4.7.2
- break;
- case 'always':
- break;
- }
-
- echo '
- <script type="text/javascript">';
- // You must set _editor_url to the URL (including trailing slash) where
- // where xinha is installed, it's highly recommended to use an absolute URL
- // eg: _editor_url = "/path/to/xinha/";
- // You may try a relative URL if you wish]
- // eg: _editor_url = "../";
- // in this example we do a little regular expression to find the absolute path.
- // NOTE: we use GetSimplifiedPath() because we cannot use a relative path and have
- // all of the plugins work correctly. Specifically the SpellChecker plugin
- // requires a absolute url path to the xinha directory
- echo '
- _editor_url = "'.GetSimplifiedPath("xinha/").'", \'\';
- _editor_lang = "en"; // And the language we need to use in the editor.
- </script>';
-
- echo '
- <!-- Load up the actual editor core -->
- <script type="text/javascript" src="'.BASE.'xinha/XinhaCore.js"></script>
-
- <script type="text/javascript">
- xinha_editors_'.$outputIndex.' = null;
- xinha_init_'.$outputIndex.' = null;';
-
- /* only need to nll out the first set of config and plugins */
- /* as we will reuse these for additional htmlareas */
- if($outputIndex == 0)
- {
- echo '
- xinha_config_'.$outputIndex.' = null;
- xinha_plugins_'.$outputIndex.' = null;';
- }
-
- echo '
- // This contains the names of textareas we will make into Xinha editors
- xinha_init_'.$outputIndex.' = xinha_init_'.$outputIndex.' ? xinha_init_'.$outputIndex.' : function()
- {';
-
- /** STEP 1 ***************************************************************
- * First, what are the plugins you will be using in the editors on this
- * page. List all the plugins you will need, even if not all the editors
- * will use all the plugins.
- ************************************************************************/
- if($outputIndex == 0)
- {
- echo '
- xinha_plugins_'.$outputIndex.' = xinha_plugins_'.$outputIndex.' ? xinha_plugins_'.$outputIndex.' :
- [
- \'CharacterMap\',
- \'CharCounter\',
- \'ContextMenu\',
- \'FullPage\',
- \'ListType\',
- \'SpellChecker\',
- \'Stylist\',
- \'SuperClean\',
- \'TableOperations\',
- \'DynamicCSS\',
- \'FindReplace\'
- ];
-
- // THIS BIT OF JAVASCRIPT LOADS THE PLUGINS, NO TOUCHING :)
- if(!HTMLArea.loadPlugins(xinha_plugins_'.$outputIndex.', xinha_init_'.$outputIndex.')) return;';
- } else
- {
- echo '
- // THIS BIT OF JAVASCRIPT LOADS THE PLUGINS, NO TOUCHING :)
- if(!HTMLArea.loadPlugins(xinha_plugins_0, xinha_init_'.$outputIndex.')) return;';
- }
-
- /** STEP 2 ***************************************************************
- * Now, what are the names of the textareas you will be turning into
- * editors?
- ************************************************************************/
-
- // NOTE: we generate the editor names here so we can easily have any number of htmlarea editors
- // and can reuse all of this code
- echo '
- xinha_editors_'.$outputIndex.' = xinha_editors_'.$outputIndex.' ? xinha_editors_'.$outputIndex.' :
- [';
-
- $firstEntry = true;
- foreach($aTextareas as $key=>$value)
- {
- if($firstEntry)
- {
- echo "'$value'";
- $firstEntry = false;
- } else
- {
- echo ", '$value'";
- }
- }
-
- echo '
- ];';
-
- /** STEP 3 ***************************************************************
- * We create a default configuration to be used by all the editors.
- * If you wish to configure some of the editors differently this will be
- * done in step 5.
- *
- * If you want to modify the default config you might do something like this.
- *
- * xinha_config = new HTMLArea.Config();
- * xinha_config.width = \'640px\';
- * xinha_config.height = \'420px\';
- *
- *************************************************************************/
- /* We only need the configuration output for the first htmlarea on a given page */
- if($outputIndex == 0)
- {
- echo '
- xinha_config_'.$outputIndex.' = new HTMLArea.Config();
-
- xinha_config_'.$outputIndex.'.toolbar = [
- ["popupeditor"],
- ["separator","fontsize","bold","italic","underline","strikethrough"],
- ["separator","forecolor","hilitecolor","textindicator"],
- ["separator","subscript","superscript"],
- ["linebreak","separator","justifyleft","justifycenter","justifyright","justifyfull"],
- ["separator","insertorderedlist","insertunorderedlist","outdent","indent"],
- ["separator","inserthorizontalrule","createlink","inserttable"],
- ["separator","undo","redo","selectall"], (HTMLArea.is_gecko ? [] : ["cut","copy","paste","overwrite","saveas"]),
- ["separator","killword","removeformat","toggleborders","lefttoright", "righttoleft","separator","htmlmode","about"]
- ];
-
- xinha_config_'.$outputIndex.'.pageStyle = "@import url('.BASE."application.css".');";
- ';
- }
-
- /** STEP 4 ***************************************************************
- * We first create editors for the textareas.
- *
- * You can do this in two ways, either
- *
- * xinha_editors = HTMLArea.makeEditors(xinha_editors, xinha_config, xinha_plugins);
- *
- * if you want all the editor objects to use the same set of plugins, OR;
- *
- * xinha_editors = HTMLArea.makeEditors(xinha_editors, xinha_config);
- * xinha_editors['myTextArea'].registerPlugins(['Stylist','FullScreen']);
- * xinha_editors['anotherOne'].registerPlugins(['CSS','SuperClean']);
- *
- * if you want to use a different set of plugins for one or more of the
- * editors.
- ************************************************************************/
-
- echo '
- xinha_editors_'.$outputIndex.' = HTMLArea.makeEditors(xinha_editors_'.$outputIndex.',
- xinha_config_0, xinha_plugins_0);';
-
- /** STEP 5 ***************************************************************
- * If you want to change the configuration variables of any of the
- * editors, this is the place to do that, for example you might want to
- * change the width and height of one of the editors, like this...
- *
- * xinha_editors.myTextArea.config.width = '640px';
- * xinha_editors.myTextArea.config.height = '480px';
- *
- ************************************************************************/
-
-
- /** STEP 6 ***************************************************************
- * Finally we "start" the editors, this turns the textareas into
- * Xinha editors.
- ************************************************************************/
- echo '
- HTMLArea.startEditors(xinha_editors_'.$outputIndex.');
- }';
-
- if($outputIndex != 0)
- {
- echo '
- var old_on_load_'.$outputIndex.' = window.onload;
- window.onload = function() {
- if (typeof old_on_load_'.$outputIndex.' == "function") old_on_load_'.$outputIndex.'();
- xinha_init_'.$outputIndex.'();
- }';
- } else
- {
- echo '
- window.onload = xinha_init_'.$outputIndex.';';
- }
-
- echo '
- </SCRIPT>
- ';
-
- $outputIndex++; /* increment the output index */
-}
-
/**
* Cuts the link text to the specified number of chars if it's longer,
* and adds an ellipsis