KivyMD icon indicating copy to clipboard operation
KivyMD copied to clipboard

Detecting events outside of the kivymd application screen!

Open ramayanbindas opened this issue 10 months ago • 1 comments

Code_link: https://github.com/ramayanbindas/ClassConnect You could try to run the ClassConnect.py file.

What I am doing? -> While I am trying to develop the application, at first I have developing it in a windows machine, this code runs smoothly and fine. But after switching the OS to the federo version 36. And try to set up all my code. I found the issue of it detecting touches/inputs of mouse clicks outside of the boundary of the kivymd application screen, even if the screen is not get focused. Besides all the code suddenly begun to act wired it doesn't act like in the window system. As my knowledge I have doesn't make error my code bases. Because I have run and test this codes in window 10 OS multiple times.

What I have tried?

  • I had tried to test is there may be problem in my code. So I develop a test prototype like my code base just added multiple inputs fields inside the Boxlayout with in the same script file. Loaded by the :method Builder.load_string:. But it acts the same.

  • I have see or search the bug it was reported previously by some one in the Ubuntu machine link (https://github.com/kivy/kivy/issues/7960). But he had figure out the issue somehow but I can't understand well. If some one give a time to solve my issue than I well be very much appreciate it.

What I am expecting? -> I am expecting that while opening the application it can detect the button, events, and everything as other application does.

-> Minimum Code:

---Code--

from kivymd.app import MDApp
from kivymd.uix.boxlayout import MDBoxLayout
from kivy.lang import Builder

Builder.load_string('''

<MyBoxLayout>:
    orientation: "vertical"
    spacing: "20dp"
    md_bg_color: "#D934BD"

    MDTextField:
        mode: "rectangle"
        on_text: mylabel.text = self.text

    MDTextField:
        mode: "rectangle"
        on_text: mylabel.text = self.text
    
    MDTextField:
        mode: "rectangle"
        on_text: mylabel.text = self.text


    MDLabel:
        id: mylabel
''')


class MyBoxLayout(MDBoxLayout):
    pass


class TestApp(MDApp):
    def build(self):
        return MyBoxLayout()


if __name__ == '__main__':
    TestApp().run()

If any more information needed than fell free to give me a message.

ramayanbindas avatar Oct 09 '23 06:10 ramayanbindas