Git Product home page Git Product logo

Comments (14)

Monirzadeh avatar Monirzadeh commented on September 21, 2024 1

this call not happen (sessionBus created without problem)

QDBusConnection sessionBus = QDBusConnection::sessionBus();
checkDBusConnection(sessionBus);
sessionBus.call(m);

we can use this

QClipboard* clipboard = QGuiApplication::clipboard();
clipboard->setText(text);

but i am not sure this will be best approach. will this affect other platform or not etc..

from flameshot.

ffcruz85 avatar ffcruz85 commented on September 21, 2024 1

@Monirzadeh stable release installed with apt here's output of flameshot --version:
Flameshot v12.1.0 (Debian 12.1.0-2)
Compiled with Qt 5.15.8
I will clone from git and try your fix - from main branch right?

from flameshot.

ffcruz85 avatar ffcruz85 commented on September 21, 2024 1

@Monirzadeh I had replaced instead of added, but yes, in either case, it worked and the URL was in the clipboard

from flameshot.

bbnolauv avatar bbnolauv commented on September 21, 2024

same problem here.
Can not copy URL after uploading to Imgur. Actually it already displays "URL copied to clipboard" but empty when i paste.

OS: Arch Linux x86_64
Kernel: 6.6.10-arch1-1
Shell: zsh 5.9
DE: Hyprland
WM: sway
Theme: Numix [GTK2], Dracula [GTK3]
Terminal: kitty
CPU: Intel i5-9300H (8) @ 4.100GHz
GPU: NVIDIA GeForce GTX 1650 Mobile / Max-Q
GPU: Intel CoffeeLake-H GT2 [UHD Graphics 630]

from flameshot.

ffcruz85 avatar ffcruz85 commented on September 21, 2024

Same here, running flatpak versio on onKubuntu 23.10, wayland session - although the URLs are stored in the history in flameshot itself, so they are retrievable that way

from flameshot.

Monirzadeh avatar Monirzadeh commented on September 21, 2024

@bbnolauv @ffcruz85 can you test this and report if it work for you?
#3453 (comment)

from flameshot.

bbnolauv avatar bbnolauv commented on September 21, 2024

@Monirzadeh it works. But now I encountered another problem. The "flameshot gui" runs normally and no errors are reported, but the clipboard is empty with no pictures. I have no idea why. (This bug is not due to your modification. Maybe I should not continue to reply to this issue but open a new issue.)

Nonetheless, thank you.

from flameshot.

Monirzadeh avatar Monirzadeh commented on September 21, 2024

@Monirzadeh it works. But now I encountered another problem. The "flameshot gui" runs normally and no errors are reported, but the clipboard is empty with no pictures. I have no idea why. (This bug is not due to your modification. Maybe I should not continue to reply to this issue but open a new issue.)

Nonetheless, thank you.

@bbnolauv with copy selection to clipboard?
can you send me the issue you open for that?
i am not sure but some sort of problem in dbus functionally in flameshot i can see that too. maybe and just maybe i can found the root of problem and send a PR to fix both of them.

from flameshot.

ffcruz85 avatar ffcruz85 commented on September 21, 2024

@Monirzadeh I am sorry, I did not understand what you meant with the test comment - make those changes and build it myself?
Also - I actually have more information, I just realized that's only happening in Wayland - it worked in fine X11. If I remember correctly, Flameshot doesn't fully support wayland anyway right? I get other issues there, like when I have 3 monitors and when I activate flameshot, it only shows a screenshot selection area in the main monitor, with the image of 2 monitors (but not the third one) squished there

from flameshot.

Monirzadeh avatar Monirzadeh commented on September 21, 2024

@ffcruz85 i just want sure this change work fine in other enviroments.
if it possible for you please clone the project and build that with that change i mention and report if it not working in your machine.
it work for me on wayland (some bugs still exist)
i test that on my build from source and it work fine on wayland with external monitor.
do you use git version or last stable release?

from flameshot.

Monirzadeh avatar Monirzadeh commented on September 21, 2024

yes.

from flameshot.

ffcruz85 avatar ffcruz85 commented on September 21, 2024

@Monirzadeh Ok, I just tried - and just to be clear, you meant replace those lines 154-156 with the two you provided, not add below them right?
It worked and copied to clipboard! It also popped up a preview screen with options to copy URL, delete, etc screen - which wasn't happening before but maybe that was a setting I had disabled? I am adding the console output below, as well as all the requested info under the issue reporting page in case that helps in any way. Oh, regarding the wayland issue I mentioned, where it's essentially squishing all my 3 monitors into the main one but clipping them off, it's showing all of DP-4, half of DP-3, and none of DP-2 -- per the output below

Console output:

QSocketNotifier: Can only be used with threads started with QThread
libEGL warning: egl: failed to create dri2 screen
Unable to get current screen, starting to use primary screen. It may be a cause of logical error and working with a wrong screen.
QLayout: Attempting to add QLayout "" to SidePanelWidget "", which already has a layout
Unable to get current screen, starting to use primary screen. It may be a cause of logical error and working with a wrong screen.
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
Unable to get current screen, starting to use primary screen. It may be a cause of logical error and working with a wrong screen.
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
flameshot: info: URL copied to clipboard.
QLayout: Attempting to add QLayout "" to SidePanelWidget "", which already has a layout
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
QPainter::begin: Paint device returned engine == 0, type: 2
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::setCompositionMode: Painter not active
QPainter::translate: Painter not active
QPainter::setPen: Painter not active
QPainter::setBrush: Painter not active
QPainter::setBrush: Painter not active

./flameshot --version

Flameshot v12.1.0 (3d21e496)
Compiled with Qt 5.15.10

inxi --width 80 --system --graphics

System:
  Host: HAL9000 Kernel: 6.5.0-14-generic arch: x86_64 bits: 64
    Desktop: KDE Plasma v: 5.27.8 Distro: Ubuntu 23.10 (Mantic Minotaur)
Graphics:
  Device-1: NVIDIA TU104 [GeForce RTX 2070 SUPER] driver: nvidia v: 535.146.02
  Device-2: AMD Raphael driver: amdgpu v: kernel
  Device-3: Logitech Webcam C930e driver: snd-usb-audio,uvcvideo type: USB
  Display: wayland server: X.org v: 1.21.1.7 with: Xwayland v: 23.2.0
    compositor: kwin_wayland driver: X: loaded: amdgpu,nvidia
    unloaded: fbdev,modesetting,nouveau,vesa dri: radeonsi gpu: nvidia,amdgpu
    resolution: 1: 1050x1680 2: 3840x2160 3: 1920x1080
  API: OpenGL v: 4.5 Mesa 23.2.1-1ubuntu3.1 renderer: llvmpipe (LLVM 15.0.7
    256 bits)

xrandr | grep -v " disconnected "

DP-2 connected 1050x1680+5760+91 right (normal left inverted right x axis y axis) 430mm x 270mm
   1680x1050     59.85*+
   1400x1050     59.86  
   1280x1024     59.89  
   1280x960      59.94  
   1152x864      59.78  
   1024x768      59.68  
   800x600       59.86  
   640x480       59.38  
   320x240       59.52  
   1440x900      59.89  
   1280x800      59.81  
   1152x720      59.75  
   960x600       59.63  
   928x580       59.88  
   800x500       59.50  
   768x480       59.38  
   720x480       59.71  
   640x400       59.20  
   320x200       58.96  
   1600x900      59.82  
   1368x768      59.88  
   1280x720      59.86  
   1024x576      59.90  
   864x486       59.92  
   720x400       59.55  
   640x350       59.77  
DP-3 connected primary 3840x2160+1920+0 (normal left inverted right x axis y axis) 600mm x 340mm
   3840x2160     59.98*+
   2048x1536     59.95  
   1920x1440     59.90  
   1600x1200     59.87  
   1440x1080     59.99  
   1400x1050     59.98  
   1280x1024     59.89  
   1280x960      59.94  
   1152x864      59.96  
   1024x768      59.92  
   800x600       59.86  
   640x480       59.38  
   320x240       59.52  
   2560x1600     59.94  
   1920x1200     59.88  
   1680x1050     59.95  
   1440x900      59.89  
   1280x800      59.81  
   1152x720      59.75  
   960x600       59.63  
   928x580       59.88  
   800x500       59.50  
   768x480       59.90  
   720x480       59.71  
   640x400       59.95  
   320x200       58.96  
   3200x1800     59.96  
   2880x1620     59.96  
   2560x1440     59.96  
   2048x1152     59.90  
   1920x1080     59.96  
   1600x900      59.95  
   1368x768      59.88  
   1280x720      59.86  
   1024x576      59.90  
   864x486       59.92  
   720x400       59.55  
   640x350       59.77  
DP-4 connected 1920x1080+0+391 (normal left inverted right x axis y axis) 480mm x 270mm
   1920x1080     59.96*+
   1440x1080     59.99  
   1400x1050     59.98  
   1280x1024     59.89  
   1280x960      59.94  
   1152x864      59.96  
   1024x768      59.92  
   800x600       59.86  
   640x480       59.38  
   320x240       59.52  
   1680x1050     59.95  
   1440x900      59.89  
   1280x800      59.81  
   1152x720      59.97  
   960x600       59.63  
   928x580       59.88  
   800x500       59.50  
   768x480       59.90  
   720x480       59.71  
   640x400       59.95  
   320x200       58.96  
   1600x900      59.95  
   1368x768      59.88  
   1280x720      59.86  
   1024x576      59.90  
   864x486       59.92  
   720x400       59.55  
   640x350       59.77

lshw -class display

  *-display                 
       description: VGA compatible controller
       product: TU104 [GeForce RTX 2070 SUPER]
       vendor: NVIDIA Corporation
       physical id: 0
       bus info: pci@0000:01:00.0
       version: a1
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
       configuration: driver=nvidia latency=0
       resources: iomemory:fc0-fbf iomemory:fc0-fbf irq:131 memory:fb000000-fbffffff memory:fcc0000000-fccfffffff memory:fcd0000000-fcd1ffffff ioport:f000(size=128) memory:fc000000-fc07ffff
  *-display
       description: VGA compatible controller
       product: Raphael
       vendor: Advanced Micro Devices, Inc. [AMD/ATI]
       physical id: 0
       bus info: pci@0000:0d:00.0
       version: c2
       width: 64 bits
       clock: 33MHz
       capabilities: pm pciexpress msi msix vga_controller bus_master cap_list
       configuration: driver=amdgpu latency=0
       resources: iomemory:fc0-fbf iomemory:fc0-fbf irq:69 memory:fce0000000-fcefffffff memory:fcf0000000-fcf01fffff ioport:d000(size=256) memory:fc500000-fc57ffff
  *-graphics
       product: EFI VGA
       physical id: 1
       logical name: /dev/fb0
       capabilities: fb
       configuration: depth=32 resolution=3840,2160

uname -a
Linux HAL9000 6.5.0-14-generic #14-Ubuntu SMP PREEMPT_DYNAMIC Tue Nov 14 14:59:49 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

from flameshot.

Monirzadeh avatar Monirzadeh commented on September 21, 2024

i want just add

QClipboard* clipboard = QGuiApplication::clipboard();
clipboard->setText(text);

after

checkDBusConnection(sessionBus); 

i think it should solve problem to have url in clipboard. upload selection ask you for upload capture and than press yes.
if everything work fine it should show you a notification that url add to clipboard.

from flameshot.

bbnolauv avatar bbnolauv commented on September 21, 2024

@Monirzadeh it works. But now I encountered another problem. The "flameshot gui" runs normally and no errors are reported, but the clipboard is empty with no pictures. I have no idea why. (This bug is not due to your modification. Maybe I should not continue to reply to this issue but open a new issue.)
Nonetheless, thank you.

@bbnolauv with copy selection to clipboard? can you send me the issue you open for that? i am not sure but some sort of problem in dbus functionally in flameshot i can see that too. maybe and just maybe i can found the root of problem and send a PR to fix both of them.

Sorry, i cannot reproduce this now. Dont know whats wrong within it

from flameshot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.