Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mouse cursor will disappear after double click the pdf viewer #31

Closed
xfdywy opened this issue Feb 5, 2018 · 29 comments
Closed

Mouse cursor will disappear after double click the pdf viewer #31

xfdywy opened this issue Feb 5, 2018 · 29 comments
Labels

Comments

@xfdywy
Copy link

xfdywy commented Feb 5, 2018

Hello, usually I will double-click the pdf viewer and a magnifying glass will appear. After that, the mouse cursor will disappear. Close the pdf viewer and reopen it will solve this problem. But it is inconvenient.

@sunderme
Copy link
Member

sunderme commented Feb 5, 2018

which OS ? which version of txs ?

@xfdywy
Copy link
Author

xfdywy commented Feb 6, 2018

TeXstudio 2.12.6 (hg 6632:7777b2b8a906)
Using Qt Version 5.9.1, compiled with Qt 5.9.1 R

windows10 version 1709

@sunderme sunderme added the bug label Feb 6, 2018
@sunderme
Copy link
Member

sunderme commented Feb 7, 2018

I assume that you are using the windowed pdf viewer from txs ?

@xfdywy
Copy link
Author

xfdywy commented Feb 8, 2018

Exactly! By the way, I upgrade the txs recently, and the previous version does not have the bug. I can not remember the previous version number exactly.

@anilyesilkaya
Copy link

I am experiencing the exact same problem. My temporary solution is to click on the "Scroll" button (hand icon) in the pdf viewer.

@CsatiZoltan
Copy link

Same issue for me. But it also appears when the Viewer is docked.

TeXstudio 2.12.8 (hg 2.12.8-1-g68cd350)
Using Qt Version 5.8.0, compiled with Qt 5.8.0 R

Windows 7

@derekwolfson
Copy link

I am also having this issue... docked or windowed.

Windows 10
TeXstudio 2.12.8 (hg 2.12.8-1-g68cd350)
Using Qt Version 5.8.0, compiled with Qt 5.8.0 R

@vingt-2
Copy link

vingt-2 commented Jun 25, 2018

Same issue here, TeXstudio 2.12.8 (hg 2.12.8-1-g68cd350) on windows 10.

@YifanQ
Copy link

YifanQ commented Oct 10, 2018

the same issue for me. it appears when the Viewer is docked.

Windows 10 (1703)
TeXstudio 2.12.10 (git 2.12.10)
Using Qt Version 5.8.0, compiled with Qt 5.8.0 R

@alexshtf
Copy link

alexshtf commented Nov 6, 2018

Same here. Happens also when the viewer is floating.

Windows 10 (1803)
TeXstudio 2.12.10 (git 2.12.10)
Using Qt Version 5.8.0, compiled with Qt 5.8.0 R

@hofingermarkus
Copy link

Still exists with Windows 10.0.17134 Qt 5.12.1 and TexStudio 2.12.16
However, manually selecting the scroll button as suggested by anilyesilkaya also still works as temporary workaround.

@jonasstein
Copy link
Contributor

This bug does not show up on Linux. Tested with

TeXstudio 2.12.16 (git n/a)
Using Qt Version 5.12.5, compiled with Qt 5.12.3 R

Could you please merge the messages in this ticket? I suggest to add Windows as tag, or in the title.

@gfroessilva
Copy link

Happens to me on:
TeXstudio 2.12.22 (git 2.12.22)
Using Qt Version 5.12.1, compiled with Qt 5.12.1 R

@rdecharette
Copy link

rdecharette commented Jun 5, 2020

Same bug for me TeXstudio 2.12.4, Qt Version 5.6.2 (compile Qt 5.6.2 R), Win 10.

My current workaround: ESC (closes the viewer), then F7 (opens it again).
The scroll button workaround also works.

@ishank-juneja
Copy link

Bug still present in Linux variant.

TeXstudio 2.12.22 (2.12.22+debian-1build1)

The workaround suggested by @rdecharette is what I am working with for now.

@ghost
Copy link

ghost commented Mar 19, 2021

@sunderme

I found a way to reproduce a similar state using 3.1.2 on linux.

Steps to reproduce:

  1. switch to presentation mode (i.e. switch to windowed viewer then hit F5).
  2. double click for magnifier then release mouse button. cursor disappears.
  3. exit presentation mode, cursor still missing
  4. switch back to embedded viewer, cursor still missing
  5. double click magnifier, cursor still missing
  6. activate one of the tools from the toolbar, cursor comes back.

Two issues come to mind:

  1. The point of presentation mode seems to be always hiding the cursor, but double click still activates the magnifier. Entering presentation mode forgets the previously active tool which then can't be restored when exiting presentation mode, so you get no cursor.
  2. Concretely, when exiting presentation mode PDFDocument::toggleFullScreen is called:
    if (!presentation) { //disable presentation things that are neither used in fullscreen nor normal mode
    menuBar()->show();
    actionPresentation->setChecked(false);
    pdfWidget->setTool(toolButtonGroup->checkedId());

    at this point toolButtonGroup has no checked button, so checkedId() returns -1, which doesn't correspond to any cursor enum. PDFWidget::setTool doesn't validate its input and sets the globals to -1, and PDFWidget::updateCursor has a switch with no default case, so the invalid value results in no visible cursor.

none of the reporters mentioned presentation mode being needed to trigger this, but this is probably pretty near the mark.

If you set Preview\EditTool=5 (anything except 1 or 2, really) in texstudio.ini, you get the missing cursor on startup, as others described. One way to end up in this state is to fire up presentation mode, then close the viewer and exit the program.

It might be worth asking the others to report the value of Preview\EditTool in their texstudio.ini and see what's there, that might be the root cause.

@sunderme
Copy link
Member

I think I have found a solution, please check latest version

@ghost
Copy link

ghost commented Mar 20, 2021

works for me, but previous reporters described different symptoms to my case - there may be more than one bug. I suggest you confirm with others before closing.

Presentation mode has a cursor now, that's a significant change. I personally have no preference either way. I've never used it.

@ghost
Copy link

ghost commented Mar 22, 2021

with the new commit, I find that when first starting presentation mode, double clicking for the magnifier and than dragging it, the "scroll" cursor appears in the middle of the magnifier. If you release and try again, it happens again.. If you release and try a third time, no cursor appears.

I don't think the fix addressed the real problems with the code.

@sunderme
Copy link
Member

I don't see anything fault, screencast ?

@ghost
Copy link

ghost commented Mar 23, 2021

Could reproduce reliably yesterday, after recompiling, but I can't get it today. I'll see if it pops up again in the next few days.

Different issue: on a multi-page document in presentation mode, can you trigger the magnifier with a double-click without the first click triggering a "next page" action?

@sunderme
Copy link
Member

It seems not to be possible to separate click/double click events. I would actually disable the zoom in presentation mode, if nobody objects.

@ghost
Copy link

ghost commented Mar 29, 2021

It seems not to be possible to separate click/double click events.

That seems unlikely.

I have no opinion on removing double-click-to-zoom, except that if activating it flips the page - it's useless.

@Remi-Boutin
Copy link

Hello,
I have the same issue with the new version of text studio. Let me know if you need more infos.

OS : Windows 10

TeXstudio 3.1.1 (git 3.1.1)
Using Qt Version 5.15.2, compiled with Qt 5.15.2 R

@ghost
Copy link

ghost commented Apr 29, 2021

@Remi-Boutin, can you check and report the value of Preview\EditTool=5 in your texstudio.ini file? you can find its location with "Help/Check Latex Installation" if you don't know where it is.

@Remi-Boutin
Copy link

Remi-Boutin commented Apr 30, 2021

Thanks JonathanLevine657 . Mine is Preview\EditTool=-1.

@sunderme
Copy link
Member

try to use 3.1.2beta

@ghost
Copy link

ghost commented Apr 30, 2021

Thanks @Remi-Boutin, that's consistent with what I thought triggers this bug. As sunderme said, there's a fix for this already committed, which will be in the next minor version (currently in beta).

@Remi-Boutin
Copy link

The fix seems to do it ! Thanks guys, appreciate it !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests