Jump to: navigation, search

Mouse Lock Implementation FAQ

5,315 bytes added, 14:56, 6 December 2011
Blur a window on a mochitest
'''Answer 3''': Before cloning the repository, set the core.autocrlf to false input (which always checks things out with LF line endings) by using the following line.
git config --global core.autocrlf falseinput
Afterwards, you can freely clone the repository and the build should now work.
===How do I resolve the error where CL cannot be found?===
===How do I resolve the error where CL cannot be found?===this This is the error that comes up:
'''checking whether the C compiler (cl ) works... no
===How do I resolve the atlbase.h being missing?===
While running the make command, you get an error saying that atlbase.h file is missing!
After you install it close and open the bat file again and rerun the make file.
==Discussion=After building a debug version of Firefox on Windows, should I be seeing a lot of WARNING messages?===After a successful build, I launched Firefox Nightly, I got a command prompt screen that started outputting messages. Many of them are warning messages, should I be worried? Also, certain warnings (assertions) causes pop ups that need to be dealt with, is there a way to get rid of that? '''Answer 1''': No, the warning messages are normal. If you're using command prompt to start firefox.exe, you can type:<pre>set XPCOM_DEBUG_BREAK=warn</pre>NOTE: in a BASH shell you usually have to do it this way:<pre>export XPCOM_DEBUG_BREAK=warn</pre>That should suppress all pop ups. This is only necessary for windows. Mac and Linux machines should be set to this by default. ===Can't find header GL/glx.h for WebGL=== While running make, the following error presents itself:<blockquote>configure: error: Can't find header GL/glx.h for WebGL (install mesa-common-dev (Ubuntu), mesa-libGL-devel (Fedora), or Mesa-devel (openSUSE))) </blockquote>'''Answer 1''': This error is most likely caused by an error in your .mozconfig file. Make sure that all commands are prefixed properly with their correct add command (mk_add... or ac_add...) ===LNK 1210 Error=== While running make, the following error presents itself:<blockquote>LINK : fatal error LNK1210: exceeded internal ILK size limit; link with /INCREMENTAL:NO</blockquote>'''NorthWind87Answer 1''':This error is most likely caused by VC's incremental linking reaching its hard coded limit. To fix the problem, edit your '' With regard '''' and locate the line #2505 find the following section of code, and insert '''-INCREMENTAL:NO''' options into LDFLAGS flag. <pre>if test $_MSC_VER -ge 1400; then LDFLAGS=”$LDFLAGS -LARGEADDRESSAWARE -NXCOMPAT -INCREMENTAL:NO“ dnl For profile-guided optimization PROFILE_GEN_CFLAGS=”-GL” PROFILE_GEN_LDFLAGS=”-LTCG:PGINSTRUMENT”</pre> ===How to pull new changes for mouselock===1. Copy the "windows line error" questionrepo URL in git hub <br />2. git remote add <repo name> git://<url> <br />3. git checkout master, pull to master first to avoid conflict <br />4. git pull <repo name>/master <br />5. git checkout mouselock, change to mouse lock to merge with our up to date master. <br />6. git merge master <br /><br />To fix a merge conflict <br />1. git status, to see what files have an issue <br />2. git add <file>, fix then add those files <br />3. git commit ===Fixing rename errors in github===One problem that users can run into when trying to merge large number of files in github is the inability of renaming those files. The merge command on github have a limit to how much files can be renamed (not sure the exact limit, but I believe it not enough is O^n limit). To increase the limit for large merge, users can re-set the upper limit with the help of the following command:<blockquote><pre>git config merge.renameLimit 999999</pre></blockquote>If you wish to simply re-set core.autocrlf to false and corethe default limit afterwards, then do this:<blockquote><pre>git config --unset merge.eol to lfrenameLimit</pre></blockquote> ===How do I get a Document (nsIDocument) from a Window (nsIDOMWindow)?=== Answer: Given aWindow, an nsIDOMWindow*
git config nsCOMPtr<nsPIDOMWindow> win = do_QueryInterface(aWindow);nsCOMPtr<nsIDocument> doc;if (win) { doc = do_QueryInterface(win--unset core.autocrlf>GetExtantDocument());}// doc is now an nsIDocument</pre>git config --global --unset core.autocrlfgit config --global core.autocrlf false===How do I get from a Window (nsIDOMWindow) to a Widget (nsIWidget, nsBaseWidget, nsWindow, etc)?===
git config --unset coreAnswer: Given aWindow, see http://dxr.mozilla.eolgit config --global -org/mozilla/mozilla-unset corecentral/toolkit/xre/nsNativeAppSupportUnix.eolgit config --global corecpp.eol lfhtml#l201
git ls<pre> nsCOMPtr<nsPIDOMWindow> domWindow(do_QueryInterface(aWindow)); if (!domWindow) return NULL;  nsCOMPtr<nsIBaseWindow> baseWindow = do_QueryInterface(domWindow-files -z | xargs >GetDocShell()); if (!baseWindow) return NULL;  nsCOMPtr<nsIWidget> widget; baseWindow-0 rm>GetMainWidget(getter_AddRefs(widget));git checkout . // widget is now your widget
That should be enough ===How can I stack trace events in Firefox in Windows using Visual Studio?=== '''Answer 1:''' The answer is going to assume you know the basics of debugging on Visual Studio, like how to avoid checking start debugging, step into, step out crlf in , step over, etc. If you haven't already follow the instructions on this [ site]. You don't have to do the optional part. Make sure you build your debug version of Firefox before this. Once you've completed the future tasks, find out where you want to put your break point, (use [ mxr] or [ dxr]), and then hit debug. When you rebuild Firefox, you won't need to checkout do the repo steps all over again , your solution explorer will automatically update itself. See also, which is old, but likely still helpful. ===How do I programatically set the mouse cursor position?=== '''Answer:''' See how SynthesizeNativeMouseEvent does it on Windows: <pre>5941 nsresult5942 nsWindow::SynthesizeNativeMouseEvent(nsIntPoint aPoint,5943 PRUint32 aNativeMessage,5944 PRUint32 aModifierFlags)5945 {5946 RECT r;5947 ::GetWindowRect(mWnd, &r);5948 ::SetCursorPos(r.left + aPoint.x, + aPoint.y);5949 5950 INPUT input;5951 memset(&input, 0, sizeof(input));5952 5953 input.type = INPUT_MOUSE;5954 input.mi.dwFlags = aNativeMessage;5955 ::SendInput(1, &input, sizeof(INPUT));5956 5957 return NS_OK;5958 }</pre> ===How do I work with lf line endings for all filesPreferences in Mozilla?=== '''Answer:''' See  ===Blur a window on a mochitest=== Instead of window.blur(), will blur the focused window.

Navigation menu